Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // <footer class="black">
- // <div id="consoleLog" class="hide black darken-1 orange-text" />
- // </footer>
- (function () {
- var old = console.log;
- console.log = function () {
- for (var i = 0; i < arguments.length; i++) {
- if (document.getElementById("consoleLog")) {
- if (typeof arguments[i] == "object") {
- document.getElementById("consoleLog").innerHTML += (JSON && JSON.stringify ? JSON.stringify(arguments[i], undefined, 2) : arguments[i]) + "<br />";
- } else {
- document.getElementById("consoleLog").innerHTML += arguments[i] + "<br />";
- }
- }
- old(arguments[i]);
- }
- };
- })();
- document.addEventListener("keydown", (e) => {
- if (!e.altKey && e.ctrlKey && !e.shiftKey) {
- if (e.code === "F12") {
- if (document.querySelector("#consoleLog.hide") === null) {
- document.getElementById("consoleLog").classList.add("hide");
- } else {
- document.getElementById("consoleLog").classList.remove("hide");
- }
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement