2 * (C) Copyright 2009 John J. Foerch
4 * Use, modification, and distribution are subject to the terms specified in the
8 define_variable('selectively_unstyle_alist', [],
9 "Alist mapping url-matching regular expressions to predicates to "+
10 "selectively disable stylesheets. All predicates corresponding to "+
11 "matching regexps will be used. Predicates are functions of one "+
12 "argument. They receive a styleSheet object as their argument, and "+
13 "if they return true, that stylesheet will be disabled.");
16 function selectively_unstyle (buffer) {
17 var uri = buffer.current_uri.spec;
18 for each (let entry in selectively_unstyle_alist) {
21 for each (var sheet in buffer.document.styleSheets) {
28 add_hook("buffer_loaded_hook", selectively_unstyle);
30 provide("selectively-unstyle");