add to git

This commit is contained in:
David Meincke
2022-03-21 17:43:17 +01:00
commit bb44e0e92d
33 changed files with 23209 additions and 0 deletions
@@ -0,0 +1,3 @@
window.onerror = function (error) {
parent.document.body.getElementsByTagName("notification-bubbles")[0].add(error, 'syntax-error');
}
@@ -0,0 +1,9 @@
try {
setTimeout(() => {
[replace]
});
}
catch (ex) {
parent.document.body.getElementsByTagName("notification-bubbles")[0].add(ex, 'syntax-error');
}
@@ -0,0 +1,24 @@
// define a new console
var console=(function(oldCons){
return {
log: function(text){
oldCons.log(text);
parent.document.body.getElementsByTagName("notification-bubbles")[0].add(text, 'log');
},
info: function (text) {
oldCons.info(text);
parent.document.body.getElementsByTagName("notification-bubbles")[0].add(text, 'info');
},
warn: function (text) {
oldCons.warn(text);
parent.document.body.getElementsByTagName("notification-bubbles")[0].add(text, 'warn');
},
error: function (text) {
oldCons.error(text);
parent.document.body.getElementsByTagName("notification-bubbles")[0].add(text, 'error');
}
};
}(window.console));
//Then redefine the old console
window.console = console;
@@ -0,0 +1,4 @@
setTimeout(() => {
window.stop();
console.log("window stopped");
}, 4 * 1000);