-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutil.js
More file actions
32 lines (28 loc) · 768 Bytes
/
Copy pathutil.js
File metadata and controls
32 lines (28 loc) · 768 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
Element.prototype.show = function() {
this.style.display = "block"
return this
}
Element.prototype.hide = function() {
this.style.display = "none"
return this
}
if(!Array.prototype.indexOf) {
Array.prototype.indexOf = function(obj) {
for (i = this.length; i > -1; i--) {
if (this[i] === obj) {
return i;
}
}
return -1;
}
}
Array.prototype.contains = function(obj) { return this.indexOf(obj) > -1 }
// Object.prototype.className = function() {
// if (this.constructor && this.constructor.toString) {
// var arr = this.constructor.toString().match(/function\s*(\w+)/);
// if (arr && arr.length == 2) {
// return arr[1];
// }
// }
// return undefined;
// }