git://git.jankratochvil.net
/
MyWeb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed some (Linux kernel?) compatibility problem of flock(1) of a directory.
[MyWeb.git]
/
css_inherit.js
diff --git
a/css_inherit.js
b/css_inherit.js
index
4afea32
..
bd56707
100644
(file)
--- a/
css_inherit.js
+++ b/
css_inherit.js
@@
-22,6
+22,10
@@
// Be aware: Works only on CSS directly applied by the "class" attribute!
// TODO: Warns on invalid inheritance rules.
// Be aware: Works only on CSS directly applied by the "class" attribute!
// TODO: Warns on invalid inheritance rules.
+// Double-run protection due to the My::Web "text/javascript" compatibility hack.
+if (!window.var_My_css_inherit_done++) {
+ var var_My_css_inherit_done=1;
+
var map;
function map_set(from,to)
var map;
function map_set(from,to)
@@
-65,7
+69,7
@@
function css_inherit()
continue;
var re;
if (!(re=rule.selectorText.toLowerCase()
continue;
var re;
if (!(re=rule.selectorText.toLowerCase()
- .match(/^\s*[.](
\w
+).*\[\s*-lace-inherit\s*=\s*"?([^"]*)"?\s*\]\s*/)))
+ .match(/^\s*[.](
[-\w]
+).*\[\s*-lace-inherit\s*=\s*"?([^"]*)"?\s*\]\s*/)))
continue;
var from_string=re[1];
var to_string=re[2];
continue;
var from_string=re[1];
var to_string=re[2];
@@
-107,3
+111,5
@@
function addLoadEvent(func)
}
addLoadEvent(css_inherit);
}
addLoadEvent(css_inherit);
+
+}