Skip navigation.
Home

Disabling Javascript; A snopes.com Inspiration

Snopes.com, the "Urban Legends Reference Pages" is an excellent site for debunking said material. Email chain-letters particularly annoy me because people simply don't do any verification testing at all; a particularly bigoted and false email circulated prior to the last Australian census is one which particularly annoyed me. Although I was even more annoyed when one person showed complete indifference to the facts and continued circulating said email. Almost made me want to become an imam out of spite towards the vile bigot. But rather than go on to this tangent (it can be saved for another day), urban legends should be checked, and snopes.com is a good place to do it, even if there are conspiracy theories about that as well.

Point being, it is handy to copy the relevant section of a snopes.com page along with the URL and forward it through when receiving such an email. However snopes.com has this horrible feature which prevents one from doing this. Rather than turning of javascript for all sites (which does have some good reasons as well), what is desired is turning off javascript for a specific site, i.e., snopes.com.

The process used here, for Gecko-based webbrowers (e.g., Firefox, Iceweasel, Mozilla, Seamonkey) is relatively simple. Such browsers have a significant number of user options, accessible through about:config in the location bar. This loads what is set in prefs.js (which you really shouldn't edit directly), generated through a number of preference files. In this particular example, the user wants to make modifications in a user.js in their profile. Profiles can be accessed about:support in the location bar. Using a favoured text-editor create a user.js file in said directory with the following content and restart the browser.


user_pref("capability.policy.policynames", "nojs");
user_pref("capability.policy.nojs.sites", "http://www.snopes.com ");
user_pref("capability.policy.nojs.javascript.enabled", "noAccess");

Pay particular attention to the space after snopes.com; capability.policy.nojs.sites is an array and an array must have a space deliminator, even if there is only one item.