Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <script> |
michael@0 | 3 | window.onerror = function(msg, url, line) { |
michael@0 | 4 | var myMsg = JSON.stringify({msg: msg, url: url, line: line, error: true}); |
michael@0 | 5 | opener.postMessage(myMsg, "*"); |
michael@0 | 6 | } |
michael@0 | 7 | |
michael@0 | 8 | var report = false; |
michael@0 | 9 | |
michael@0 | 10 | function g() { |
michael@0 | 11 | if (report) { |
michael@0 | 12 | opener.postMessage("callbackHappened", "*"); |
michael@0 | 13 | } |
michael@0 | 14 | window.mozRequestAnimationFrame(g); |
michael@0 | 15 | } |
michael@0 | 16 | g(); |
michael@0 | 17 | |
michael@0 | 18 | window.onload = function() { |
michael@0 | 19 | opener.postMessage("loaded", "*"); |
michael@0 | 20 | } |
michael@0 | 21 | |
michael@0 | 22 | addEventListener("pagehide", function f(e) { |
michael@0 | 23 | if (!e.persisted && !report) { |
michael@0 | 24 | opener.postMessage("notcached", "*"); |
michael@0 | 25 | } |
michael@0 | 26 | }, false); |
michael@0 | 27 | |
michael@0 | 28 | addEventListener("pageshow", function f(e) { |
michael@0 | 29 | if (e.persisted) { |
michael@0 | 30 | opener.postMessage("revived", "*"); |
michael@0 | 31 | } |
michael@0 | 32 | }, false); |
michael@0 | 33 | |
michael@0 | 34 | window.onmessage = function (e) { |
michael@0 | 35 | if (e.data == "report") { |
michael@0 | 36 | report = true; |
michael@0 | 37 | } |
michael@0 | 38 | }; |
michael@0 | 39 | |
michael@0 | 40 | </script> |