Page 3 of 3
Re: Replace Google-supplied javascripts -- How?
Posted: Thu Jul 23, 2015 1:08 am
by barbaz
Also, some 3rd-party sites that have trackers don't mix the tracking scripts and the "useful" scripts; in those cases you can use
ABE to restrict which JS files are allowed to load/run.
Thrawn wrote:It's a sign of poor coding, but that's life.
Or it could be deliberate, to force people who use blocking software without surrogate functionality (such as adblockers) to allow the 3rd-party script(s)/site(s).
Re: Replace Google-supplied javascripts -- How?
Posted: Thu Jul 23, 2015 2:21 am
by Thrawn
barbaz wrote:
Thrawn wrote:It's a sign of poor coding, but that's life.
Or it could be deliberate, to force people who use blocking software without surrogate functionality (such as adblockers) to allow the 3rd-party script(s)/site(s).
There are more kinds of poverty than just lack of technical skill

Re: Replace Google-supplied javascripts -- How?
Posted: Thu Jul 23, 2015 6:58 am
by markfilipak
Thrawn wrote:barbaz wrote:markfilipak wrote:Are you saying that I will have to craft a suitable replacement based on minified JS that, in many cases, will be provisioning event listeners that are dynamically bound to <div>-elements? Ugh! I can't spend the rest of my life analyzing minified DOM-code just to make someone's web site work.
Yeah, basically...
The good news is, in most cases, the site isn't actually making use of the third-party scripts for anything important; it just expects the script objects to be there, and crashes with a JavaScript error if not. It's a sign of poor coding, but that's life.
That's not the case. I get no errors. I just can't stay logged in because (I assume) cookies aren't updated, and links aren't populated, so they don't work at all.
You also have the option of downloading the real script, editing it, and populating the 'replacement' property with a file: URL that points to it.
Things are even weirder than I thought. I tried a completely clean browser -- total vanilla -- running in Windows 7, which is my Host OS, and running a 'localhost'-only HOSTS file (not a "blocking" HOSTS file). That is about as plain as you can get, but that doesn't work either.
Re: Replace Google-supplied javascripts -- How?
Posted: Thu Jul 23, 2015 3:01 pm
by barbaz
markfilipak wrote:Things are even weirder than I thought. I tried a completely clean browser -- total vanilla -- running in Windows 7, which is my Host OS, and running a 'localhost'-only HOSTS file (not a "blocking" HOSTS file). That is about as plain as you can get, but that doesn't work either.
Did you flush the DNS cache after updating your HOSTS file? If not, does that help at all?