-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_injection.js
60 lines (49 loc) · 1.45 KB
/
test_injection.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// dep
// IMPORTANT TODO:
// add event param to all functions below
// add some event listeners to the whole window
window.addEventListener('scroll', function(event) {
console.log("scroll captured.");
});
// too loud shhhhh
/*window.addEventListener('message', function(event) {
console.log("\nmessage: "+event.data+"\nfrom: "+event.origin+"/"+event.ports);
});*/
window.addEventListener('click', function(event) {
console.log("\n\nTHERE WAS A CLICK\n\n");
});
window.addEventListener('onresize', function() {
console.log("page size changed.");
});
window.addEventListener('onchange', function() {
console.log("generic page changed.");
});
window.addEventListener('onemptied', function() {
console.log("something happened with media.");
});
window.addEventListener('animationstart', function() {
console.log("animation began.");
});
window.addEventListener('animationend', function() {
console.log("animation ended.");
});
window.addEventListener('resize', function() {
console.log('resize occured.')
});
/*
var getFrames = function () {
// this should be working
// can include a re to filter for disqus iframes
var iframes = [];
var temp = document.getElementsByTagName('iframe');
for (var i=0; i < temp.length; ++i) {
// if scrolling variable is unset or allowed
if (!temp[i].scrolling || temp[i].scrolling !== 'no') {
iframes.push(temp[i]);
}
}
return iframes;
};
*/
// end of script
console.log('\n--------\ntest_injection.js has terminated.');