Grumblerbear

Web-tycoon.com UX Rework

Feb 8th, 2019
252
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function() {
  2. // ==UserScript==
  3. // @name Web-tycoon.com UX Rework
  4. // @namespace http://tampermonkey.net/
  5. // @version 1.2
  6. // @author Grumbler Bear
  7. // @description Переработка пользовательского интерфейса
  8. // @match https://game.web-tycoon.com/*
  9. // @updateURL https://lacony.ru/web-tycoon/tampermonkey.js
  10. // @downloadURL https://lacony.ru/web-tycoon/tampermonkey.js
  11. // ==/UserScript==
  12. var createLink, createScript, fragment;
  13.  
  14. createLink = function(href, integrity) {
  15. var link;
  16. link = document.createElement('link');
  17. link.rel = 'stylesheet';
  18. link.href = href;
  19. if (integrity !== void 0) {
  20. link.integrity = integrity;
  21. link.setAttribute('crossorigin', 'anonymous');
  22. }
  23. return link;
  24. };
  25.  
  26. createScript = function(src) {
  27. var script;
  28. script = document.createElement('script');
  29. script.type = 'text/javascript';
  30. script.async = true;
  31. script.src = src;
  32. return script;
  33. };
  34.  
  35. fragment = document.createDocumentFragment();
  36.  
  37. fragment.insertBefore(createScript('https://lacony.ru/web-tycoon/web-tycoon.min.js'), null);
  38.  
  39. fragment.insertBefore(createLink('https://use.fontawesome.com/releases/v5.6.3/css/all.css', 'sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/'), null);
  40.  
  41. fragment.insertBefore(createLink('https://lacony.ru/web-tycoon/web-tycoon.min.css'), null);
  42.  
  43. document.head.insertBefore(fragment, null);
  44.  
  45. }).call(this);
RAW Paste Data