Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How to configure AdBlock or NoScript to make Google Search scriptless, but not to break multitude of pages that use Google's scripts (like if I "forbid google.com" in NoScipt)

@related http://webapps.stackexchange.com/questions/13566/how-to-turn-off-googles-page-preview-in-search/13626#13626

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

NoScript's base functionality works domain-by-domain, but the Application Boundaries Enforcer (ABE) can work on specific URLs and it's flexible enough to do what you want.

Here's the USER rule I used to get decent searching without breaking the rest:

Site ^https://encrypted.google.com/(s|search)(\?.*|$)
Deny INC(SCRIPT,XHR)
Sandbox

Just add it at the end in NoScript Options > Advanced > ABE > User.

The Site line matches both the page you load and the URL used under the hood for Google Instant updates, so whether the combination of Site and INC() matches on the URL of the top-level request or the request being judged (NoScript's ABE docs aren't clear on this), it'll cause requests for new results without pressing Enter to fail.

The SCRIPT in the INC() may or may not ever get fired (see my comment about the lack of detail in the ABE docs) but, if it does, it explicitly blocks any external Javascript they may be pulling in.

Finally, the Sandbox line tells ABE to allow the request for the page itself... but to do it with Javascript disabled. It and the Site line may be the only ones you need, but I thought I'd play it safe.

If you want more details, the aforementioned docs are at http://noscript.net/abe/abe_rules.pdf

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.