Page 1 of 1
Deny Google JS on www.google.com only
Posted: Fri Nov 28, 2014 1:24 am
by Guest
I recently tried disabling all JS from
www.google.com and along with "Remove Google Tracking" and "No Google Analytics", search is fast like the good old days.
But I need to sometimes allow js from google.com for other other google apps. How do I?
Not working:
Code: Select all
Site *.google.com
Accept from *.google.com
Deny INC(SCRIPT, OBJ, FONT, XHR, MEDIA)
Sandbox INC
Site www.google.com
Deny ALL
Re: Deny Google JS on www.google.com only
Posted: Fri Nov 28, 2014 1:39 am
by barbaz
I'm not sure of exactly what you want to do?
Assuming you want to allow google active content only on all google domains other than www.google.com:
allow google.com, gstatic.com, & googleapis.com, then use this ABE rule
Code: Select all
Site .google.com .googleapis.com .gstatic.com
Accept from ^https?://(?!www\.google\.com[/:])(?:[^/:]+\.)?google\.com[/:] .googleapis.com .gstatic.com
Deny INC(SCRIPT, OBJ, FONT, XHR, MEDIA)
Sandbox
(Side note: you don't need No Google Analytics, because NoScript blocks Google Analytics completely if it isn't (Temp)Allowed.)
Re: Deny Google JS on www.google.com only
Posted: Sat Nov 29, 2014 7:34 am
by Guest
barbaz wrote:I'm not sure of exactly what you want to do?
Assuming you want to allow google active content only on all google domains other than
www.google.com:
allow google.com, gstatic.com, & googleapis.com, then use this ABE rule
Code: Select all
Site .google.com .googleapis.com .gstatic.com
Accept from ^https?://(?!www\.google\.com[/:])(?:[^/:]+\.)?google\.com[/:] .googleapis.com .gstatic.com
Deny INC(SCRIPT, OBJ, FONT, XHR, MEDIA)
Sandbox
This works but unfortunately prevents me from using this site, which requires google code for the captcha (why?).
How can I also disable Google cookies while using Google search?
I disabled the Google search tracking hiddens via user script:
Code: Select all
[].forEach.call(document.querySelectorAll("input[type=hidden]"),(e,d)=>{e.disabled=1})
barbaz wrote:
(Side note: you don't need No Google Analytics, because NoScript blocks Google Analytics completely if it isn't (Temp)Allowed.)
The GA code was downloaded and run, so I got the extra plugin.
Re: Deny Google JS on www.google.com only
Posted: Sat Nov 29, 2014 8:15 am
by barbaz
Guest wrote:this site, which requires google code for the captcha (why?).
Add
to the Accept line
There are several threads here explaining what the deal is with google code and this board's recaptcha. Here's one
viewtopic.php?f=8&t=12429
Guest wrote:How can I also disable Google cookies while using Google search?
I disabled the Google search tracking hiddens via user script:
Code: Select all
[].forEach.call(document.querySelectorAll("input[type=hidden]"),(e,d)=>{e.disabled=1})
Don't know if this will work but try
Code: Select all
Site www.google.com
Anonymize from about: chrome: file: SELF++
Guest wrote:barbaz wrote:
(Side note: you don't need No Google Analytics, because NoScript blocks Google Analytics completely if it isn't (Temp)Allowed.)
The GA code was downloaded and run, so I got the extra plugin.
On a site that has google analytics, go NoScript menu -> Forbid google-analytics.com, then NoScript menu > Untrusted > Mark google-analytics.com as Untrusted
Does that stop it from downloading?
Re: Deny Google JS on www.google.com only
Posted: Sat Nov 29, 2014 3:55 pm
by Guest
I was able to block cookies from Google web search by the following:
Firefox->Preferences->Privacy->Cookies->Exceptions
Re: Deny Google JS on www.google.com only
Posted: Sun Nov 30, 2014 4:41 am
by Guest
Now I realize that I need JavaScript for Google Maps, which starts with the same hostname.
https://www.google.com/maps?q=Nicaragua+map
I want to block
www.google.com/[b]search[/b].
But the NoScript strategy given prevents the map from loading. Please show me how can I allow maps js work, but not search.
Re: Deny Google JS on www.google.com only
Posted: Sun Nov 30, 2014 4:48 am
by barbaz
try
Code: Select all
Site .google.com .googleapis.com .gstatic.com
Accept from .google.com/maps?* ^https?://(?!www\.google\.com[/:])(?:[^/:]+\.)?google\.com[/:] .googleapis.com .gstatic.com
Deny INC(SCRIPT, OBJ, FONT, XHR, MEDIA)
Sandbox
Re: Deny Google JS on www.google.com only
Posted: Sun Nov 30, 2014 5:27 am
by Guest
Google maps won't load. But it isn't just necessarily maps that I want. I want to block js from Google websearch. I've created a user script to filter out the hiddens, so the URL looks like this:
Code: Select all
https://www.google.com/search?q=P%26G&btnG=
— where `P%26G` can be anything
Code: Select all
"https://www.google.com/search?q=P%26G&btnG=".match(/(\?q=[^&]+)&/)[1]
"?q=P%26G"
Re: Deny Google JS on www.google.com only
Posted: Mon Dec 01, 2014 12:59 am
by Thrawn
Guest wrote:I want to block js from Google websearch.
You could just block that, then?
Code: Select all
Site ^https?://www\.google\.com/search.*
Deny
Re: Deny Google JS on www.google.com only
Posted: Tue Dec 02, 2014 2:37 pm
by Guest
No that doesn't work, Thrawn. That blocks the site itself. How can I search google without javascript?
I also tried:
Code: Select all
Site ^https?://www\.google\.com/search?q=[^&]+&btnG
Deny INC(SCRIPT, OBJ, FONT, XHR, MEDIA)
More guesswork.
I want to have "block/allow google.com
for this site"
Re: Deny Google JS on www.google.com only
Posted: Tue Dec 02, 2014 2:57 pm
by Giorgio Maone
Just
Code: Select all
Site ^https?://www\.google\.com/search
Sandbox
Should do the trick