-
Notifications
You must be signed in to change notification settings - Fork 0
/
zapanim.js
21 lines (20 loc) · 1.14 KB
/
zapanim.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
javascript: (function () {
function zapanim(doc) {
var st = doc.createElement("STYLE");
var csstxt = "* { animation-name: none !important; animation-play-state: paused !important; } ";
csstxt += "* { -webkit-animation-name: none !important; -webkit-animation-play-state: paused !important; } ";
csstxt += "*:before { animation-name: none !important; animation-play-state: paused !important; } ";
csstxt += "*:before { -webkit-animation-name: none !important; -webkit-animation-play-state: paused !important; } ";
csstxt += "*:after { animation-name: none !important; animation-play-state: paused !important; } ";
csstxt += "*:after { -webkit-animation-name: none !important; -webkit-animation-play-state: paused !important; } ";
var t = doc.createTextNode(csstxt);
st.appendChild(t);
doc.head.appendChild(st);
var elems = doc.getElementsByTagName("IFRAME");
for (var i = 0; i < elems.length; i++) {
var innerDoc = elems[i].contentDocument || elems[i].contentWindow.document;
zapanim(innerDoc);
}
}
zapanim(document);
})()