Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. // <footer class="black">
  2. // <div id="consoleLog" class="hide black darken-1 orange-text" />
  3. // </footer>
  4.  
  5. (function () {
  6. var old = console.log;
  7. console.log = function () {
  8. for (var i = 0; i < arguments.length; i++) {
  9. if (document.getElementById("consoleLog")) {
  10. if (typeof arguments[i] == "object") {
  11. document.getElementById("consoleLog").innerHTML += (JSON && JSON.stringify ? JSON.stringify(arguments[i], undefined, 2) : arguments[i]) + "<br />";
  12. } else {
  13. document.getElementById("consoleLog").innerHTML += arguments[i] + "<br />";
  14. }
  15. }
  16. old(arguments[i]);
  17. }
  18. };
  19. })();
  20.  
  21. document.addEventListener("keydown", (e) => {
  22. if (!e.altKey && e.ctrlKey && !e.shiftKey) {
  23. if (e.code === "F12") {
  24. if (document.querySelector("#consoleLog.hide") === null) {
  25. document.getElementById("consoleLog").classList.add("hide");
  26. } else {
  27. document.getElementById("consoleLog").classList.remove("hide");
  28. }
  29. }
  30. }
  31. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement