Replace Google-supplied javascripts -- How?

General discussion about the NoScript extension for Firefox
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: Replace Google-supplied javascripts -- How?

Post 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).
*Always* check the changelogs BEFORE updating that important software!
-
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Replace Google-supplied javascripts -- How?

Post 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 :D
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0
User avatar
markfilipak
Posts: 14
Joined: Mon Jul 06, 2015 8:38 pm

Re: Replace Google-supplied javascripts -- How?

Post 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.
Mozilla/5.0 (X11; Linux x86_64; rv:25.5) Gecko/20150607 PaleMoon/25.5.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: Replace Google-supplied javascripts -- How?

Post 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?
*Always* check the changelogs BEFORE updating that important software!
-
Post Reply