-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsyseditor.js
More file actions
61 lines (59 loc) · 1.61 KB
/
syseditor.js
File metadata and controls
61 lines (59 loc) · 1.61 KB
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
61
$window({
title: "System Editor",
html: "<button id= 'popup_disabler' onclick='alertsEnabled = !alertsEnabled'>[" + "OFF" + "] Disable Alert Popup</button> <button onclick='procsclose()'>Close All Processess</button><br>"
})
function procsclose() {
for (var i = 0; i < $window.instances.length; ++i) {
if ($window.instances[i] == null) {
console.log("Null window");
} else {
if ($window.instances[i].cfg.title == "System Editor") {
console.log("Found window");
} else {
console.log("Window found");
$window.instances[i].close()
}
}
}
}
var ev = {
alerts: "OFF",
hydra: "OFF",
alerts_: document.getElementById("popup_disabler"),
hydra_: document.getElementById("hydra_protect")
}
var alertsEnabled = true;
var backup1 = $alert;
var hydraProtection = false;
var backup2 = $confirm;
var backup3 = $prompt;
setTimeout(()=>{
setInterval(() => {
if (hydraProtection) {
for (var i = 0; i < $window.instances.length; ++i) {
if ($window.instances[i] == null) {
console.log("Null window");
} else {
if ($window.instances[i].cfg.title == "Hydra.exe") {
console.log("Found window");
alertsEnabled = false;
$window.instances[i].close()
} else {
console.log("Window found");
}
}
}
}
if (alertsEnabled) {
$alert = backup1;
$confirm = backup2;
$prompt = backup3;
ev.alerts = "OFF";
ev.alerts_.innerText = `[${ev.alerts}] Disable Alert Popup`
} else {
$alert = function() {}
ev.alerts = "ON";
ev.alerts_.innerText = `[${ev.alerts}] Disable Alert Popup`
}
});
},100);