Advertisement
Guest User

najnowsze / konto

a guest
Oct 16th, 2022
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.08 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Hejto MenuExtender
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Extend your menu today! Grow up to 5 inches(!sic)
  6. // @author pawemie
  7. // @match *://www.hejto.pl/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=hejto.pl
  9. // ==/UserScript==
  10.  
  11. // Add buttons and sections as soon as top menu is loaded
  12.  
  13. let poller = setInterval(function () {
  14. if (document.querySelector("header div div.flex.justify-end.items-start") !== null) {
  15. clearInterval(poller);
  16. addExtendedButtons();
  17. }
  18. }, 50);
  19.  
  20. function addExtendedButtons() {
  21. const handlerEl = document.querySelector("header div div.flex.justify-end.items-start");
  22. handlerEl.insertAdjacentHTML("afterbegin", `
  23. <div id="powerSectionEntries" title="Naj"
  24. class="p-2 relative mr-3 rounded-full transition-colors w-11 h-11 text-grey-500 dark:text-grey-300 focus:bg-grey-200 dark:focus:bg-grey-600 hover:bg-grey-200 dark:hover:bg-grey-600">
  25. <a href="https://www.hejto.pl/najnowsze" title="naj"">
  26. <svg width="24px" height="24px" viewBox="0 -5 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" stroke="currentColor" fill="currentColor">
  27. <title>Wpisy</title>
  28. <desc>Created with Sketch.</desc>
  29. <defs></defs>
  30. <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
  31. <g id="Message-text" sketch:type="MSLayerGroup" transform="translate(1.000000, 1.000000)" stroke="#6B6C6E" stroke-width="2">
  32. <path d="M18.2,39.3 C16.8,38.9 15.4,38.4 14.2,37.8 C5.7,34.2 0.1,27.8 0.1,20.5 C0.1,9.2 13.7,0 30.6,0 C47.5,0 61.1,9.2 61.1,20.5 C61.1,31.8 47.5,41 30.6,41 C29.8,41 28.9,41 28.1,40.9 L28.1,40.9 L8.2,50 L14.2,37.9" id="Shape" sketch:type="MSShapeGroup"></path>
  33. <path d="M16.2,13 L34,13" id="Shape" sketch:type="MSShapeGroup"></path>
  34. <path d="M16.2,20 L44,20" id="Shape" sketch:type="MSShapeGroup"></path>
  35. <path d="M16.2,27 L47,27" id="Shape" sketch:type="MSShapeGroup"></path>
  36. </g>
  37. </g>
  38. </svg>
  39. </a>
  40. </div>
  41. <div id="powerSectionComments" title="Comments panel"
  42. class="p-2 relative mr-3 rounded-full transition-colors w-11 h-11 text-grey-500 dark:text-grey-300 focus:bg-grey-200 dark:focus:bg-grey-600 hover:bg-grey-200 dark:hover:bg-grey-600">
  43. <a href="` + window.location.protocol + `//www.hejto.pl/konto/" title="profil"">
  44. <svg width="24px" height="24px" viewBox="0 -5 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" stroke="currentColor" fill="currentColor">
  45. <title>Koprofilmentarze</title>
  46. <desc>Created with Sketch.</desc>
  47. <defs></defs>
  48. <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
  49. <g id="Message-dot" sketch:type="MSLayerGroup" transform="translate(1.000000, 2.000000)" stroke="#6B6C6E" stroke-width="2">
  50. <path d="M18.1,39.2 C16.7,38.8 15.3,38.3 14.1,37.7 C5.6,34.1 0,27.7 0,20.4 C0,9.1 13.6,-0.1 30.5,-0.1 C47.3,-0.1 61.2,9.1 61.2,20.4 C61.2,31.7 47.4,40.9 30.5,40.9 C29.7,40.9 28.8,40.9 28,40.8 L28,40.8 L8.1,49.9 L14.1,37.8" id="Shape" sketch:type="MSShapeGroup"></path>
  51. <circle id="Oval" sketch:type="MSShapeGroup" cx="20.5" cy="21.5" r="1.5"></circle>
  52. <circle id="Oval" sketch:type="MSShapeGroup" cx="31.5" cy="21.5" r="1.5"></circle>
  53. <circle id="Oval" sketch:type="MSShapeGroup" cx="41.5" cy="21.5" r="1.5"></circle>
  54. </g>
  55. </g>
  56. </svg>
  57. </a>
  58. </div>
  59. `);
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement