-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
33 lines (33 loc) · 1.19 KB
/
index.js
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
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([], factory);
} else if (typeof module === 'object' && module.exports) {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory();
} else {
// Browser globals (root is window)
root.returnExports = factory();
}
}(this, function () {
return function(){
var blinks = document.getElementsByTagName("blink");
for(i = 0; i < blinks.length; i++) {
(function(i){
var blink = blinks[i];
var interval = blink.getAttribute("data-interval") || 500;
var displayStyle = window.getComputedStyle(blink, null).getPropertyValue("display") || blink.style.display || 'block';
setInterval(function(){
if(blink.style.display && blink.style.display == displayStyle) {
blink.style.display = 'none';
}
else {
blink.style.display = displayStyle;
}
}, interval);
}(i));
}
};
}));