3 ms·
I used to do a something similar to this (though less sophisticated) every time a new Chrome update came out, changing a single byte in the binary so that I cou
by chch 13y ago
I used to do a something similar to this (though less sophisticated) every time a new Chrome update came out, changing a single byte in the binary so that I could restore the http:// http:// at the front of URLs.
I considered making a website to publish the proper offset to change for each version, but I got complacent after a while.
- wging 13y agoHow did you figure out which byte to change?
- chch 13y agoI haven't done it in a year or two, so it took me a minute to figure out the basics again. The short version is that I crawled through the source of Chromium for a while until I found the flag that controls it [0]. Then, since FormatUrlType was a uint32, and I assumed the storage of constants would be close together, I did a little trial and error searching through the binary in Hex Fiend until I found the value for kFormatUrlOmitAll. Then I would change this value from a 7 to a 5, which would remove the kFormatUrlOmitHTTP flag (or sometimes to a 1, to see if I liked trailing slashes on bare hostnames). Of course, since Chrome autoupdates, I had to do this every few times I restarted the browser, until I just got too lazy. :) I can't seem to find the offset this time, though, so I very well might be missing a step! [0] https://code.google.com/p/chromium/codesearch#chromium/src/net/base/net_util.h&sq=package:chromium&dr=C&l=67 https://code.google.com/p/chromium/codesearch#chromium/src/n... [1] https://code.google.com/p/chromium/codesearch#chromium/src/net/base/net_util.cc&q=kFormatUrlOmitAll&sq=package:chromium&l=986&type=cs https://code.google.com/p/chromium/codesearch#chromium/src/n...
- coldpie 13y agoI'm so glad Firefox still allows this as an option. I guess it's irrational, but it drives me absolutely nuts to see bare URLs without protocols.