-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtools.js
More file actions
40 lines (37 loc) · 832 Bytes
/
tools.js
File metadata and controls
40 lines (37 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
function $(id) {return document.getElementById(id)}
function cssStyles(ss, selector) {
var a = [];
ss = ss.styleSheets;
for (var j in ss)
if (ss[j].rules)
for (var i in ss[j].rules)
if (ss[j].rules[i].selectorText)
if (ss[j].rules[i].selectorText == selector)
a[a.length] = ss[j].rules[i].style;
return a;
}
function callback(func) {
return function() {
var self = this;
var args = arguments;
return function() {
self[func].apply(self, args);
}
}
}
if( !window.System ) {
window.System = {
Gadget:{
docked:true,
Flyout:{
show:false,
document:null
},
Settings:{
read:function(name){var tmp = this.data[name]; return (tmp ? tmp : '')},
write:function(name, value){this.data[name] = value},
data: {}
}
}
};
}