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