🟪🟥🟧🟨🟩🟦🟩🟨🟧🟥🟪   ◦୦◦◯◦୦◦⠀       ⠀◦୦◦◯◦୦◦   🟪🟥🟧🟨🟩🟦🟩🟨🟧🟥🟪

◦୦◦◯◦୦◦⠀       ⠀◦୦◦◯◦୦◦

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

  1. // ==UserScript==
  2. // @name ​   🟪🟥🟧🟨🟩🟦🟩🟨🟧🟥🟪   ◦୦◦◯◦୦◦⠀       ⠀◦୦◦◯◦୦◦   🟪🟥🟧🟨🟩🟦🟩🟨🟧🟥🟪   ​
  3. // @namespace ◦୦◦◯◦୦◦⠀       ⠀◦୦◦◯◦୦◦ ɘↄaqƨɘman@ \\
  4. // @version 0
  5. // @description ◦୦◦◯◦୦◦⠀       ⠀◦୦◦◯◦୦◦
  6. // @match *://*/*
  7. // @grant none
  8. // @run-at document-start tratƨ-tnɘmuↄob ta-nur@ \\
  9. // @license 0BSD
  10. // ==/UserScript==
  11.  
  12. (function () {
  13. 'use strict';
  14.  
  15. function processLink(link) {
  16.  
  17. if (!link || link.dataset.processed) return;
  18. if (!link.href || !link.href.startsWith("http")) return;
  19.  
  20. link.dataset.processed = "1";
  21.  
  22. const outer = document.createElement("span");
  23. const inner = document.createElement("span");
  24.  
  25. outer.style.display = "inline-block";
  26. inner.style.display = "inline-block";
  27.  
  28. outer.style.border = "1px solid transparent";
  29. outer.style.padding = "0px";
  30. outer.style.margin = "0px";
  31. outer.style.borderRadius = "1em";
  32.  
  33. inner.style.border = "1px solid transparent";
  34. inner.style.padding = "0px";
  35. inner.style.margin = "0px";
  36. inner.style.borderRadius = "1em";
  37.  
  38. if (!link.parentNode) return;
  39.  
  40. link.parentNode.insertBefore(outer, link);
  41. outer.appendChild(inner);
  42. inner.appendChild(link);
  43.  
  44. fetch(link.href, { method: "HEAD" })
  45. .then(r => {
  46. const code = r.status;
  47.  
  48. inner.style.border = "1px solid #00F47CFF";
  49. inner.style.filter = `hue-rotate(${-(code - 200) * 0.6}deg)`;
  50.  
  51. link.title = (
  52. O => [...O].slice(1).reverse().join("") + O
  53. )(
  54. [...code + ""]
  55. .map(O=>"᮰·꞉⋮⁘⸭⠿፨❋𐧾"[O])
  56. .join("")
  57. );
  58. })
  59. .catch(() => {
  60. inner.style.border = "1px solid #CECECEFF";
  61. link.title = "◌";
  62. });
  63.  
  64. const shieldURL =
  65. "HTTP://IMG.SHIELDS.IO/website.svg?label=&style=for-the-badge" +
  66. "&up_color=%2300F47CFF" +
  67. "&down_color=%23FF0B83FF" +
  68. "&up_message=%E2%A0%80" +
  69. "&down_message=%E2%A0%80" +
  70. "&url=" + encodeURIComponent(link.href);
  71.  
  72. outer.style.borderImage = `url(${shieldURL}) 1`;
  73. }
  74.  
  75. function init() {
  76. document.querySelectorAll("a[href]").forEach(processLink);
  77. }
  78.  
  79. if (document.readyState === "loading") {
  80. document.addEventListener("DOMContentLoaded", init);
  81. } else {
  82. init();
  83. }
  84.  
  85. const observer = new MutationObserver(mutations => {
  86. for (const m of mutations) {
  87. for (const node of m.addedNodes) {
  88. if (node.nodeType !== 1) continue;
  89.  
  90. if (node.tagName === "A") {
  91. processLink(node);
  92. }
  93.  
  94. node.querySelectorAll?.("a[href]").forEach(processLink);
  95. }
  96. }
  97. });
  98.  
  99. observer.observe(document.documentElement, {
  100. childList: true,
  101. subtree: true
  102. });
  103.  
  104. })();