├── Bookmarklet.txt ├── Inject.js ├── README.md └── main.js /Bookmarklet.txt: -------------------------------------------------------------------------------- 1 | javascript:(function()%7B(function()%20%7Bvar%20x%20%3D%20document.createElement(%22script%22)%3Bx.src%20%3D%20%22https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2FSnowLord7%2Fdevconsole%40master%2Fmain.js%22%3Bx.onload%20%3D%20alert(%22Loaded%20Developer%20Console!%22)%3Bdocument.head.appendChild(x)%3B%7D)()%7D)() 2 | -------------------------------------------------------------------------------- /Inject.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var x = document.createElement("script"); 3 | x.src = "https://cdn.jsdelivr.net/gh/SnowLord7/devconsole@master/main.js"; 4 | x.onload = alert("Loaded Developer Console!"); 5 | document.head.appendChild(x); 6 | })() 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Custom Developer Console 2 | - [x] Webpage Direct Editor (Pen) 3 | - [x] Element Inspector (Magnifying Glass) 4 | - [x] Partially Finished Main Console 5 | - [x] Partially Finished HTML Inspector 6 | - [x] Almost Done With Sources Viewer 7 | - [ ] Add Settings - Night Mode 8 | - [ ] Add More Tools 9 | 10 | # Notes 11 | My custom Developer Console isn't perfect, some secure sites disable inline-scripts, which breaks the console. 12 | 13 | # Instructions 14 | **Instructions without Console (Blocked by School, etc)** 15 | 1. Copy the Script from *devconsole/Bookmarklet.txt*. 16 | 1. Add a New Bookmark With the Code From *Bookmarklet.txt* as the URL. 17 | 1. If you don't see your bookmark bar, press *Ctrl + Shift + b*. 18 | 1. For more help see the GIF below. 19 | 1. Click the Bookmark to Start the Developer Console. 20 | ![Adding Bookmark](https://media.discordapp.net/attachments/494518655200002072/557344351253168128/Dev.gif) 21 | 22 | **Basic Instructions /w Console** 23 | 1. Open the Developer Console. 24 | 1. Methods Include: Pressing *f12* 25 | 1. Pressing *Ctrl + Shift + i* 26 | 1. Right Clicking then Pressing '*Inspect*' 27 | 1. Copy the Script from *main.js*. 28 | 1. Paste the Script in the Developer Console. 29 | 1. Press *Enter* to Run the Script. 30 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | (() => { 2 | function downloadSiteInfo(filename, text) { 3 | let elem = document.createElement('a'); 4 | elem.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); 5 | elem.setAttribute('download', filename); 6 | 7 | elem.style.display = 'none'; 8 | document.body.appendChild(elem); 9 | 10 | elem.click(); 11 | elem.remove(); 12 | } 13 | 14 | var html = ` 15 |
16 | ` + "\uD83D\uDD0D" + ` 17 | ` + "\u270E" + ` 18 | Elements 19 | Console 20 | Sources 21 | Tools 22 | Settings 23 | ` + "\uD83D\uDDD9" + ` 24 |
25 | 26 |
27 | 32 | 33 | 44 | 45 |
46 |
47 |

Page ` + "\u21BA" + `

48 |
49 |
    50 |
  • Scripts
  • 51 |
      52 |
    • Main.js
    • 53 |
    • Script.js
    • 54 |
    55 |
56 |
    57 |
  • Styles
  • 58 |
      59 |
    • Main.css
    • 60 |
    • Style.css
    • 61 |
    62 |
63 |
    64 |
  • Meta
  • 65 |
      66 |
    • Index.js
    • 67 |
    • Style.js
    • 68 |
    69 |
70 |
71 | 72 |
73 | 74 |
75 |
76 |
77 | 78 | 82 | 83 | 86 |
87 | `.trim(); 88 | 89 | var javascript = ` 90 | var snowlord_variables = { 91 | listeners: [], 92 | loaded: true, 93 | showing: true, 94 | hijackFunctions: true, 95 | hideLogs: true, 96 | log: console.log, 97 | warn: console.warn, 98 | error: console.error, 99 | tooltip: { 100 | showing : false, 101 | offsetX : 0, 102 | offsetY : 0, 103 | color : "rgba(0, 0, 0, 1)" 104 | } 105 | } 106 | /* 107 | Element.prototype.oldAddEventListener = Element.prototype.addEventListener; 108 | Element.prototype.addEventListener = function(type, handler, capture) { 109 | if (!capture) { 110 | capture = false; 111 | } 112 | this.oldAddEventListener(type, handler, capture); 113 | snowlord_variables.listeners.push({ 114 | type : type, 115 | func : handler, 116 | capture : capture, 117 | elem : this, 118 | enabled : true 119 | }); 120 | } 121 | 122 | function disableListener(index) { 123 | var elem = snowlord_variables.listeners[index].elem; 124 | var type = snowlord_variables.listeners[index].type; 125 | var func = snowlord_variables.listeners[index].func; 126 | snowlord_variables.listeners[index].enabled = false; 127 | var capture = snowlord_variables.listeners[index].capture; 128 | elem.removeEventListener(type, func, capture); 129 | } 130 | 131 | function toggleListener(index) { 132 | if (snowlord_variables.listeners[index].enabled) { 133 | disableListener(index); 134 | } else { 135 | enableListener(index); 136 | } 137 | } 138 | 139 | function enableListener(index) { 140 | var elem = snowlord_variables.listeners[index].elem; 141 | var type = snowlord_variables.listeners[index].type; 142 | var func = snowlord_variables.listeners[index].func; 143 | var capture = snowlord_variables.listeners[index].capture; 144 | snowlord_variables.listeners[index].enabled = true; 145 | elem.oldAddEventListener(type, elem, func, capture); 146 | } 147 | */ 148 | console.log = function(msg) { 149 | var c = document.getElementsByClassName("snowlord-devConsole-container-body-console-text")[0]; 150 | var cHeight = 10; 151 | if (snowlord_variables.hijackFunctions && c) { 152 | try { 153 | msg = msg.replace(/(\?\:\\r\\n|\\r|\\n)/g, "
"); 154 | } catch(e) {} 155 | if (typeof(msg) == "number") { 156 | c.innerHTML += '
` + "\u2705" + `' + new Date().toLocaleTimeString().split(" ")[0] + ' ' + msg +'
'; 157 | } else if (typeof(msg) == "string") { 158 | c.innerHTML += '
` + "\u2705" + `' + new Date().toLocaleTimeString().split(" ")[0] + ' "' + msg +'"
'; 159 | } else if (typeof(msg) == "function") { 160 | c.innerHTML += '
` + "\u2705" + `' + new Date().toLocaleTimeString().split(" ")[0] + ' "' + msg +'"
'; 161 | } else if (typeof(msg) == "undefined") { 162 | c.innerHTML += '
` + "\u2B9E" + `' + new Date().toLocaleTimeString().split(" ")[0] + ' ' + msg +'
'; 163 | } else { 164 | c.innerHTML += '
` + "\u2705" + `' + new Date().toLocaleTimeString().split(" ")[0] + ' ' + msg +'
'; 165 | } 166 | if (c.childElementCount > cHeight) { 167 | c.children[0].remove(); 168 | } 169 | document.getElementById("snowlord-devConsole-container-body-console-input").scrollIntoView(); 170 | } else { 171 | snowlord_variables.log(msg); 172 | } 173 | } 174 | 175 | console.error = function(msg) { 176 | var c = document.getElementsByClassName("snowlord-devConsole-container-body-console-text")[0]; 177 | var cHeight = 10; 178 | if (snowlord_variables.hijackFunctions && c) { 179 | try { 180 | msg = msg.replace(/(\?\:\\r\\n|\\r|\\n)/g, "
"); 181 | } catch(e) {} 182 | if (snowlord_variables.hideLogs) { 183 | // Stop logging 184 | } else if (typeof(msg) == "number") { 185 | c.innerHTML += '
` + "\u274C" + `' + new Date().toLocaleTimeString().split(" ")[0] + ' ' + msg +'
'; 186 | } else if (typeof(msg) == "string") { 187 | c.innerHTML += '
` + "\u274C" + `' + new Date().toLocaleTimeString().split(" ")[0] + ' "' + msg +'"
'; 188 | } else if (typeof(msg) == "function") { 189 | c.innerHTML += '
` + "\u274C" + `' + new Date().toLocaleTimeString().split(" ")[0] + ' "' + msg +'"
'; 190 | } else if (typeof(msg) == "undefined") { 191 | c.innerHTML += '
` + "\u2B9E" + `' + new Date().toLocaleTimeString().split(" ")[0] + ' ' + msg +'
'; 192 | } else { 193 | c.innerHTML += '
` + "\u274C" + `' + new Date().toLocaleTimeString().split(" ")[0] + ' ' + msg +'
'; 194 | } 195 | if (c.childElementCount > cHeight) { 196 | c.children[0].remove(); 197 | } 198 | document.getElementById("snowlord-devConsole-container-body-console-input").scrollIntoView(); 199 | } else { 200 | snowlord_variables.log(msg); 201 | } 202 | } 203 | 204 | console.warn = function(msg) { 205 | var c = document.getElementsByClassName("snowlord-devConsole-container-body-console-text")[0]; 206 | var cHeight = 10; 207 | if (snowlord_variables.hijackFunctions && c) { 208 | try { 209 | msg = msg.replace(/(\?\:\\r\\n|\\r|\\n)/g, "
"); 210 | } catch(e) {} 211 | if (snowlord_variables.hideLogs) { 212 | // Stop logging 213 | } else if (typeof(msg) == "number") { 214 | c.innerHTML += '
` + "\u26A0\uFE0F" + `' + new Date().toLocaleTimeString().split(" ")[0] + ' ' + msg +'
'; 215 | } else if (typeof(msg) == "string") { 216 | c.innerHTML += '
` + "\u26A0\uFE0F" + `' + new Date().toLocaleTimeString().split(" ")[0] + ' "' + msg +'"
'; 217 | } else if (typeof(msg) == "function") { 218 | c.innerHTML += '
` + "\u26A0\uFE0F" + `' + new Date().toLocaleTimeString().split(" ")[0] + ' "' + msg +'"
'; 219 | } else if (typeof(msg) == "undefined") { 220 | c.innerHTML += '
` + "\u2B9E" + `' + new Date().toLocaleTimeString().split(" ")[0] + ' ' + msg +'
'; 221 | } else { 222 | c.innerHTML += '
` + "\u26A0\uFE0F" + `' + new Date().toLocaleTimeString().split(" ")[0] + ' ' + msg +'
'; 223 | } 224 | if (c.childElementCount > cHeight) { 225 | c.children[0].remove(); 226 | } 227 | document.getElementById("snowlord-devConsole-container-body-console-input").scrollIntoView(); 228 | } else { 229 | snowlord_variables.log(msg); 230 | } 231 | } 232 | `.trim(); 233 | 234 | var css = ` 235 | @keyframes slideUp { 236 | 0% { 237 | transform: translateY(100%); 238 | } 239 | 100% { 240 | transform: translateY(0); 241 | } 242 | } 243 | 244 | .tooltip { 245 | display: inline-block; 246 | position: relative; 247 | } 248 | 249 | .tooltip .tooltiptext { 250 | background-color: black; 251 | transition: opacity 1s; 252 | visibility: hidden; 253 | text-align: center; 254 | border-radius: 6px; 255 | position: absolute; 256 | margin-left: -60px; 257 | padding: 5px 0; 258 | bottom: 100%; 259 | width: 120px; 260 | color: #fff; 261 | z-index: 1; 262 | opacity: 0; 263 | left: 50%; 264 | } 265 | 266 | .tooltip:hover .tooltiptext { 267 | visibility: visible; 268 | opacity: 1; 269 | } 270 | 271 | .hidden { 272 | display: none !important; 273 | } 274 | 275 | .showing { 276 | display: block !imporant; 277 | } 278 | 279 | .snowlord-devConsole-container-body-console-messages { 280 | font-family: Consolas, monaco, monospace, serif; 281 | } 282 | 283 | .snowlord-devConsole-container { 284 | box-shaddow: 0 2px 30px 0 rgba(0, 0, 60, 0.045), 0px 1px 3px 0 rgba(0, 0, 80, 0.03); 285 | animation: 1s ease-out 0s 1 slideUp; 286 | background-color: #f9f9f9; 287 | z-index: 9999999999999999; 288 | vertical-align: baseline; 289 | flex-direction: column; 290 | box-sizing: border-box; 291 | transition: 0.2s; 292 | position: fixed; 293 | height: 300px; 294 | display: flex; 295 | width: 100%; 296 | padding: 0; 297 | outline: 0; 298 | margin: 0; 299 | bottom: 0; 300 | left: 0; 301 | } 302 | 303 | .snowlord-devConsole-container-nav { 304 | border-top: 1px solid #848484; 305 | border-bottom: 1px solid #848484; 306 | justify-content: space-between; 307 | -webkit-box-direction: normal; 308 | background-color: #f2f2f2; 309 | -webkit-box-pack: justify; 310 | box-sizing: border-box; 311 | user-select: none; 312 | min-height: 25px; 313 | line-height: 1; 314 | cursor: ns-resize; 315 | color: #000; 316 | width: 100%; 317 | padding: 0; 318 | margin: 0; 319 | } 320 | 321 | .snowlord-devConsole-container-nav a, .snowlord-devConsole-container-nav span { 322 | padding: 3px 5px 0 5px; 323 | min-height: 20px; 324 | } 325 | 326 | .snowlord-devConsole-container-nav a:hover { 327 | background-color: rgba(0, 0, 0, 0.05); 328 | border-bottom: 1px solid #00add8; 329 | transition: background-color 0.25s; 330 | cursor: pointer; 331 | } 332 | 333 | .string, .boolean, .number { font-weight: bold; } 334 | 335 | .string { color: rgb(233, 63, 59); } 336 | 337 | .boolean, .number { color: rgb(85, 106, 242); } 338 | 339 | .null { color: grey; } 340 | 341 | .key { font-style: italic; } 342 | `.trim(); 343 | 344 | var tooltip = ` 345 |
346 | 347 | 348 | 349 |
350 | `.trim(); 351 | 352 | var injectedHtml = document.createElement("div"); 353 | injectedHtml.classList.add("snowlord-devConsole-container"); 354 | injectedHtml.classList.add("showing"); 355 | injectedHtml.innerHTML = html; 356 | document.getElementsByTagName("body")[0] ? document.getElementsByTagName("body")[0].appendChild(injectedHtml) : document.documentElement.appendChild(injectedHtml); 357 | var consoleContainer = document.getElementsByClassName("snowlord-devConsole-container showing")[0]; 358 | 359 | var injectedTooltip = document.createElement("div"); 360 | injectedTooltip.classList.add("snowlord-devConsole-tooltip-container"); 361 | injectedTooltip.style.display = "none"; 362 | injectedTooltip.innerHTML = tooltip; 363 | document.getElementsByTagName("body")[0] ? document.getElementsByTagName("body")[0].appendChild(injectedTooltip) : document.documentElement.appendChild(injectedTooltip); 364 | var tooltipContainer = document.getElementsByClassName("snowlord-devConsole-tooltip-container")[0]; 365 | 366 | var injectedCss = document.createElement("style"); 367 | injectedCss.textContent = css.trim(); 368 | injectedCss.classList.add("snowlord-devConsole-injectedCss"); 369 | document.head ? document.head.appendChild(injectedCss) : document.body.appendChild(injectedCss); 370 | 371 | var injectedJS = document.createElement("script"); 372 | injectedJS.textContent = javascript.trim(); 373 | injectedJS.classList.add("snowlord-devConsole-injectedJS"); 374 | document.head ? document.head.appendChild(injectedJS) : document.body.appendChild(injectedJS); 375 | 376 | function highlightJSON(json) { 377 | if (typeof json != 'string') { 378 | json = JSON.stringify(json, undefined, 2); 379 | } 380 | json = json.replace(/&/g, '&').replace(//g, '>'); 381 | return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) { 382 | var cls = 'number'; 383 | if (/^"/.test(match)) { 384 | if (/:$/.test(match)) { 385 | cls = 'key'; 386 | } else { 387 | cls = 'string'; 388 | } 389 | } else if (/true|false/.test(match)) { 390 | cls = 'boolean'; 391 | } else if (/null/.test(match)) { 392 | cls = 'null'; 393 | } 394 | return '' + match + ''; 395 | }); 396 | } 397 | document.getElementById('snowlord-devConsole-localStorage').innerHTML = highlightJSON(localStorage); 398 | 399 | var consoleInput = document.getElementById("snowlord-devConsole-container-body-console-input"); 400 | consoleInput.addEventListener("keydown", function (e) { 401 | if (e.keyCode == 76 && e.ctrlKey && !e.altKey && !e.shiftKey && snowlord_variables.loaded) { 402 | document.getElementsByClassName("snowlord-devConsole-container-body-console-text")[0].innerHTML = '
⮞' + new Date().toLocaleTimeString().split(" ")[0] + ' Console was cleared
'; 403 | this.value = ''; 404 | } 405 | 406 | if (e.keyCode == 13 && !e.ctrlKey && !e.altKey && !e.shiftKey && snowlord_variables.loaded) { 407 | e.preventDefault(); 408 | var val = this.value.toLowerCase().replace(/\r?\n|\r/g, ""); 409 | if (val == "clear" || val == "clear()" || val == "clear();" || val == "console.clear()" || val == "console.clear();") { 410 | document.getElementsByClassName("snowlord-devConsole-container-body-console-text")[0].innerHTML = '
⮞' + new Date().toLocaleTimeString().split(" ")[0] + ' Console was cleared
'; 411 | this.value = ''; 412 | } else if (val == "info" || val == "info;" || val == "getInfo" || val == "get info") { 413 | downloadSiteInfo('Website Info.txt', ` 414 | Website Location: ${document.location.href} 415 | Screen Width: ${window.innerWidth} 416 | Screen Height: ${window.innerHeight} 417 | HTML Length: ${document.body.innerHTML.length} 418 | Text Length: ${document.body.textContent.length} 419 | Loaded Scripts: ${document.getElementsByTagName('script').length} 420 | Loaded Styles: ${document.getElementsByTagName('link').length} 421 | Meta Tags: ${document.getElementsByTagName('meta').length} 422 | Executed Threads (Intervals & Loops): ${setInterval(';')} 423 | Date Opened: ${new Date()} 424 | Timezone: ${(new Date()).getTimezoneOffset() / 60} 425 | Referrer: ${document.referrer} 426 | Cookies: ${document.cookie} 427 | User-Agent: ${navigator.userAgent} 428 | Language: ${navigator.language} 429 | Local Storage: ${JSON.stringify(localStorage)} 430 | `.trim()); 431 | this.value = ''; 432 | } else if (val == "hidelogs()" || val == "hideLogs();" || val == "hidelogs();" || val == "hideLogs();") { 433 | snowlord_variables.hideLogs = !snowlord_variables.hideLogs; 434 | } else { 435 | try { 436 | console.log(eval(this.value)); 437 | } catch (e) { 438 | console.error(e); 439 | } 440 | this.value = ''; 441 | } 442 | } 443 | }); 444 | 445 | var elementViewer = document.getElementsByClassName("snowlord-devConsole-container-nav-elementViewer")[0]; 446 | elementViewer.addEventListener("click", function () { 447 | 448 | }); 449 | 450 | // Tooltip 451 | document.addEventListener("mousemove", function (e) { 452 | tooltip = snowlord_variables.tooltip; 453 | if (snowlord_variables.loaded) { 454 | if (tooltip.showing) { 455 | // Show tooltip 456 | document.getElementsByClassName("snowlord-devConsole-tooltip-container")[0].style.display = "block"; 457 | document.getElementsByClassName("snowlord-devConsole-tooltip-container")[0].style.backgroundColor = tooltip.color; 458 | 459 | // Does the target have a tag name? 460 | if (e.target.tagName.toLowerCase() != "") { // Yes 461 | document.getElementById("snowlord-devConsole-tooltip-elementType").innerHTML = e.target.tagName.toLowerCase(); 462 | } else { // No 463 | document.getElementById("snowlord-devConsole-tooltip-elementType").innerHTML = ""; 464 | } 465 | 466 | // Does the target have a class name? 467 | if (e.target.className != "") { // Yes 468 | document.getElementById("snowlord-devConsole-tooltip-classType").innerHTML = "." + e.target.className; 469 | } else { // No 470 | document.getElementById("snowlord-devConsole-tooltip-classType").innerHTML = ""; 471 | } 472 | 473 | // Does the target have an ID? 474 | if (e.target.id != "" && e.target.id != "snowlord-devConsole-tooltip-elementType" && e.target.id != "snowlord-devConsole-tooltip-elementType" && e.target.id != "snowlord-devConsole-tooltip-classType" && e.target.id != "snowlord-devConsole-tooltip") { // Yes 475 | document.getElementById("snowlord-devConsole-tooltip-idType").innerHTML = "#" + e.target.id; 476 | } else { // No 477 | document.getElementById("snowlord-devConsole-tooltip-idType").innerHTML = ""; 478 | } 479 | 480 | // Position tooltip 481 | moveToolTip(e); 482 | } else { 483 | document.getElementsByClassName("snowlord-devConsole-tooltip-container")[0].style.display = "none"; 484 | } 485 | } 486 | }); 487 | 488 | document.getElementsByClassName("snowlord-devConsole-container-nav-elementViewer")[0].addEventListener("click", function () { 489 | if (snowlord_variables.loaded) { 490 | snowlord_variables.tooltip.showing = !snowlord_variables.tooltip.showing; 491 | console.log("Tooltip showing: " + snowlord_variables.tooltip.showing); 492 | } 493 | }); 494 | 495 | // Position tooltip function 496 | function moveToolTip(e) { 497 | var tooltip = document.getElementById("snowlord-devConsole-tooltip"); 498 | tooltip.style.left = e.pageX + 8 + 'px'; 499 | tooltip.style.top = e.pageY + 'px'; 500 | tooltip.offsetX = e.pageX + 8 + 'px'; 501 | tooltip.offsetY = e.pageY + 'px'; 502 | } 503 | 504 | var elements = document.getElementsByClassName("snowlord-devConsole-container-nav")[0].getElementsByTagName("a"); 505 | for (let i = 0; i < elements.length; i++) { 506 | if (elements[i].name) { 507 | elements[i].addEventListener("click", function () { 508 | if (snowlord_variables.loaded) { 509 | var elems = document.getElementsByClassName("snowlord-devConsole-container-body")[0].children; 510 | var curElem = document.getElementsByClassName(this.name)[0]; 511 | for (let i = 0; i < elems.length; i++) { 512 | try { 513 | elems[i].classList.remove("hidden"); 514 | elems[i].classList.remove("showing"); 515 | } catch (e) { 516 | console.log(elems[i]); 517 | } 518 | elems[i].classList.add("hidden"); 519 | } 520 | curElem.classList.remove("hidden"); 521 | curElem.classList.add("showing"); 522 | } 523 | }); 524 | } 525 | } 526 | 527 | document.getElementsByClassName("snowlord-devConsole-container-body-exit")[0].addEventListener("click", function () { 528 | if (confirm(atob("QXJlIHlvdSBzdXJlIHlvdSB3b3VsZCBsaWtlIHRvIGNsb3NlIFNub3dMb3JkJ3MgRGV2ZWxvcGVyIENvbnNvbGU/"))) { 529 | document.getElementsByClassName("snowlord-devConsole-container")[0].remove(); 530 | document.getElementsByClassName("snowlord-devConsole-tooltip-container")[0].remove(); 531 | document.getElementsByClassName("snowlord-devConsole-injectedCss")[0].remove(); 532 | document.getElementsByClassName("snowlord-devConsole-injectedJS")[0].remove(); 533 | snowlord_variables.hijackFunctions = false; 534 | snowlord_variables.loaded = false; 535 | snowlord_variables.showing = false; 536 | } 537 | }); 538 | 539 | document.getElementsByClassName("snowlord-devConsole-container-nav-elementEditor")[0].addEventListener("click", function () { 540 | if (document.body.contentEditable != "true" || document.body.designMode != "on") { 541 | console.log("Editing elements: true"); 542 | document.body.contentEditable = "true"; 543 | document.body.designMode = "on"; 544 | } else { 545 | console.log("Editing elements: false"); 546 | document.body.contentEditable = "false"; 547 | document.body.designMode = "off"; 548 | } 549 | }); 550 | 551 | document.getElementsByClassName("snowlord-devConsole-container-body-sources-scripts-reload")[0].addEventListener("click", function () { 552 | var main = document.getElementsByClassName("snowlord-devConsole-container-body-sources-main")[0]; 553 | var styles = document.getElementsByClassName("snowlord-devConsole-container-body-sources-styles")[0]; 554 | var other = document.getElementsByClassName("snowlord-devConsole-container-body-sources-other")[0]; 555 | main.innerHTML = other.innerHTML = styles.innerHTML = ''; 556 | 557 | for (let i = 0; i < document.getElementsByTagName("script").length; i++) { 558 | if (document.getElementsByTagName("script")[i].src) other.innerHTML += '
  • ' + document.getElementsByTagName("script")[i].src.split("/").pop() + '
  • '; 559 | } 560 | 561 | for (let i = 0; i < document.getElementsByTagName("link").length; i++) { 562 | styles.innerHTML += '
  • ' + document.getElementsByTagName("link")[i].href.split("/").pop() + '
  • '; 563 | } 564 | 565 | for (let i = 0; i < document.getElementsByTagName("meta").length; i++) { 566 | main.innerHTML += '
  • ' + (document.getElementsByTagName("meta")[i].name || document.getElementsByTagName("meta").property) + '
  • '; 567 | } 568 | }); 569 | 570 | document.getElementsByClassName("snowlord-devConsole-container-body-sources-scripts-reload")[0].click(); 571 | document.getElementsByClassName('snowlord-devConsole-container-body-elements-container')[0].textContent = document.body.innerHTML.replace(/<\/\w+>/g, (e) => e + '\r\n'); 572 | })(); 573 | --------------------------------------------------------------------------------