-
Notifications
You must be signed in to change notification settings - Fork 0
/
DumpScriptsUpdate.js
81 lines (69 loc) · 2.61 KB
/
DumpScriptsUpdate.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
var scripts = document.scripts;
var scriptPaths = [];
// ASCII art as a JS variable
var asciiArt = `
░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
░▒▓███████▓▒░░▒▓██████▓▒░
░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░
`;
for (var i = 0; i < scripts.length; i++) {
if (scripts[i].src) { // Check if the script has a src attribute
scriptPaths.push(scripts[i].src);
}
}
// Create a container div
var container = document.createElement('div');
container.style.position = 'fixed';
container.style.top = '50%';
container.style.left = '50%';
container.style.transform = 'translate(-50%, -50%)';
container.style.width = '600px';
container.style.height = '400px';
container.style.backgroundColor = 'rgba(0, 0, 0, 0.66)';
container.style.color = 'white';
container.style.overflowY = 'scroll';
container.style.padding = '10px';
container.style.boxSizing = 'border-box';
container.style.zIndex = '1000';
// Create the close button
var closeButton = document.createElement('button');
closeButton.textContent = 'X';
closeButton.style.position = 'absolute';
closeButton.style.top = '10px';
closeButton.style.right = '10px';
closeButton.style.color = 'white';
closeButton.style.background = 'transparent';
closeButton.style.border = 'none';
closeButton.style.fontSize = '20px';
closeButton.style.cursor = 'pointer';
// Append the close button to the container
container.appendChild(closeButton);
// Display ASCII art
var asciiArtElement = document.createElement('pre');
asciiArtElement.textContent = asciiArt;
container.appendChild(asciiArtElement);
// Create a list to hold the script paths
var list = document.createElement('ul');
scriptPaths.forEach(function(path) {
var listItem = document.createElement('li');
listItem.textContent = path;
list.appendChild(listItem);
});
container.appendChild(list);
document.body.appendChild(container);
// Function to hide the container
function hideContainer() {
container.style.display = 'none';
}
// Add click event listener to the close button
closeButton.addEventListener('click', hideContainer);
// Add event listener for the ESC key
document.addEventListener('keydown', function(event) {
if (event.key === 'Escape') {
hideContainer();
}
});