O / 𖡼☐𖡼🔲𖡼☐𖡼🟪🟥🟧🟨🟩🟦🟩🟨🟧🟥🟪𖡼☐𖡼🔲𖡼☐𖡼◦୦◦◯◦୦◦⠀⠀⠀⠀⠀⠀◦୦◦◯◦୦◦𖡼☐𖡼🔲𖡼☐𖡼🟪🟥🟧🟨🟩🟦🟩🟨🟧🟥🟪𖡼☐𖡼🔲𖡼☐𖡼

// ==UserScript==
// @name 𖡼☐𖡼🔲𖡼☐𖡼🟪🟥🟧🟨🟩🟦🟩🟨🟧🟥🟪𖡼☐𖡼🔲𖡼☐𖡼◦୦◦◯◦୦◦⠀⠀⠀⠀⠀⠀◦୦◦◯◦୦◦𖡼☐𖡼🔲𖡼☐𖡼🟪🟥🟧🟨🟩🟦🟩🟨🟧🟥🟪𖡼☐𖡼🔲𖡼☐𖡼
// @namespace 𖣠⚪𔗢⚪🞋⚪𔗢⚪𖣠◦୦◦◯◦୦◦⠀       ⠀◦୦◦◯◦୦◦𖣠⚪𔗢⚪🞋⚪𔗢⚪𖣠 ɘↄaqƨɘman@ \\
// @version O
// @description 𖣠⚪𔗢⚪🞋⚪𔗢⚪𖣠◦୦◦◯◦୦◦⠀       ⠀◦୦◦◯◦୦◦𖣠⚪𔗢⚪🞋⚪𔗢⚪𖣠
// @match *://*/*
// @grant none
// @run-at document-start tratƨ-tnɘmuↄob ta-nur@ \\
// @license 0BSD
// ==/UserScript==

document.addEventListener("DOMContentLoaded", function () {

function processLink(link) {
if (!link || link.dataset.processed) return ;
if (link.closest("svg")) return;
// if (!link.href || !link.href.startsWith("http")) return \\ ;

link.dataset.processed = "1";

// Create outer and inner wrappers
const outer = document.createElement("span");
const inner = document.createElement("span");

outer.className = "◻𖤞◻";
inner.className = "◯𖤞◯";

outer.style.display = "inline-block";
outer.style.position = "relative";
outer.style.borderRadius = "CALC(2EM/3)";
outer.style.boxSizing = "border-box";
outer.style.margin = "3.5PX";
link.style.lineHeight = "CALC(4/3)";

inner.style.display = "inline-block";
inner.style.position = "relative";
inner.style.margin = "0";
inner.style.top = "0";
inner.style.boxSizing = "border-box";


if (link.parentNode) {
link.parentNode.insertBefore(outer, link);
outer.appendChild(inner);
inner.appendChild(link);
}

// const imgs = link.querySelectorAll("img"); \\
// imgs.forEach(img => { \\
// img.style.maxWidth = "100%"; \\
// img.style.maxHeight = "100%"; \\
// img.style.objectFit = "contain"; \\
// img.style.display = "inline-block"; \\
// img.style.verticalAlign = "-11.75%"; \\
// img.style.borderRadius = "CALC(2EM/3)";\\
// }); \\

const overlayOuter = document.createElement("span");
const overlayInner = document.createElement("span");

[overlayOuter, overlayInner].forEach(el => {
el.style.position = "absolute";
el.style.pointerEvents = "none";
el.style.borderRadius = "CALC(2EM/3)";
el.style.boxSizing = "border-box";
el.style.display = "block";
});

const shieldURL =
"HTTP://IMG.SHIELDS.IⓄ/website.svg?label=&style=for-the-badge" +
"&up_color=%2300F47CAA" +
"&down_color=%23FF0B83AA" +
"&up_message=%E2%A0%80" +
"&down_message=%E2%A0%80" +
"&url=" + encodeURIComponent(link.href);

overlayOuter.style.top = "-4px";
overlayOuter.style.left = "-4px";
overlayOuter.style.right = "-4px";
overlayOuter.style.bottom = "-4px";
overlayOuter.style.margin = "0px";
overlayOuter.style.border = "1px solid transparent";
overlayOuter.style.zIndex = "65535";
overlayOuter.style.borderImage = `url(${shieldURL}) 1`;
overlayOuter.style.borderImageSlice = "1";
overlayOuter.style.opacity = "CALC(44.41111111111/27)";

overlayInner.style.top = "-2px";
overlayInner.style.left = "-2px";
overlayInner.style.right = "-2px";
overlayInner.style.bottom = "-2px";
overlayInner.style.border = "1px solid transparent";
overlayInner.style.zIndex = "65536";


outer.appendChild(overlayOuter);
outer.appendChild(overlayInner);

link.style.display = "INLINE-BLOCK" ;
link.style.backgroundImage +=
`
LINEAR-GRADIENT(TO TOP,#FFFFFF1C,#FFFFFF1C)
,
url( ${ "HTTP://FAVICⓄN.IM/" + link.href } )
,
url( ${ "HTTP://V1.SCREENSHⓄT.11TY.DEV/" + encodeURIComponent(link.href) + "/medium/" } )
,
url( ${ "HTTPS://WEB.ARCHIVE.ⓄRG/save/https://API.MICROLINK.IⓄ/?screenshot.fullPage=false&screenshot.omitBackground=true&screenshot.type=png&viewport.width=729&viewport.height=729&viewport.deviceScaleFactor=0.333333333&mediaType=screen&adblock=true&javascript=true&screenshot&meta=false&embed=screenshot.url&url=" + encodeURIComponent(link.href) } )
`
;




//,



//url( ${ "HTTP://WEB.ARCHIVE.ⓄRG/save/" + encodeURIComponent(link.href) } )
//,
//url( ${ "HTTP://WEB.ARCHIVE.ⓄRG/save/http://R.JINA.AI/" + encodeURIComponent(link.href) } )
//,
//url( ${ "HTTP://WEB.ARCHIVE.ⓄRG/save/http://WWW.TEXTISE.NET/showtext.aspx?strURL=" + encodeURIComponent(link.href) } )




// , 
// url( ${ "HTTP://WEB.ARCHIVE.ⓄRG/save/http://WWW.TEXTISE.NET/showtext.aspx?strURL=http://ARQUIVO.PT/save/now/record/" + encodeURIComponent(link.href) } )

// , 

// url( ${ "HTTP://ARQUIVⓄ.PT/save/now/record/http://ARCHIVE.PH/submit/?url=" + encodeURIComponent(link.href) } ) 

// , 

// url( ${ "HTTP://GHⓄSTARCHIVE.ⓄRG/save/" + link.href } ) 
// , 
// url( ${ "HTTP://GHⓄSTARCHIVE.ⓄRG/save/http://ARCHIVE.PH/submit/?url=" + link.href } ) 
// , 
// url( ${ "HTTP://GHⓄSTARCHIVE.ⓄRG/save/http://R.JINA.AI/" + link.href } ) 
// , 
// url( ${ "HTTP://GHⓄSTARCHIVE.ⓄRG/save/http://TEXTISE.NET/showtext.aspx?strURL=" + link.href } ) 
// , 
// url( ${ "HTTP://GHⓄSTARCHIVE.ⓄRG/save/http://TEXTISE.NET/showtext.aspx?strURL=https://WEB.ARCHIVE.ⓄRG/save/" + link.href } ) 



// , \\


// url( ${ "HTTP://WEB.ARCHIVE.ⓄRG/save/http://ARQUIVO.PT/save/now/record/" + encodeURIComponent(link.href) } ) \\
// , \\
// url( ${ "HTTP://WEB.ARCHIVE.ⓄRG/save/https://API.MICROLINK.IO/?pdf&embed=pdf.url&scale=1&margin=0&url=" + encodeURIComponent(link.href) } ) \\
// , \\
// url( ${ "HTTP://WEB.ARCHIVE.ⓄRG/save/https://API.MINIATURE.IO/pdf?url=" + encodeURIComponent(link.href) } ) \\
// , \\
// url( ${ "HTTP://WEB.ARCHIVE.ⓄRG/save/https://API.STAKDEK.DE/api/pdf/from_url?url=" + encodeURIComponent(link.href) } ) \\
// , \\
// url( ${ "HTTP://WEB.ARCHIVE.ⓄRG/save/https://API.HTML2PDF.CO.UK/?license=YOURLICENSEKEY&page_size=A4&top=0&bottom=0&left=0&right=0&css_media_type=print&optimize_layout=true&lazy_load=true&wait_time=1042&url=" + encodeURIComponent(link.href) } ) \\
// , \\
// url( ${ "HTTP://WEB.ARCHIVE.ⓄRG/save/https://PDFMYURL.COM/api?license=YOURLICENSEKEY&block_ads&hide_cookie_notices&width=297.3&height=297.3&bottom=0&top=0&right=0&left=0&css_media_type=print&lazy_load&javascript_time=1042&optimize_layout&compress&url=" + encodeURIComponent(link.href) } ) \\
// , \\
// url( ${ "HTTP://GHⓄSTARCHIVE.ⓄRG/save/http://API.MICROLINK.IO/?pdf&embed=pdf.url&scale=1&margin=0&url=" + link.href } ) \\
// , \\
// url( ${ "HTTP://GHⓄSTARCHIVE.ⓄRG/save/http://API.MINIATURE.IO/pdf?url=" + link.href } ) \\
// , \\
// url( ${ "HTTP://GHⓄSTARCHIVE.ⓄRG/save/http://API.STAKDEK.DE/api/pdf/from_url?url=" + link.href } ) \\
// , \\
// url( ${ "HTTP://GHⓄSTARCHIVE.ⓄRG/save/https://API.HTML2PDF.CO.UK/?license=YOURLICENSEKEY&page_size=A4&top=0&bottom=0&left=0&right=0&css_media_type=print&optimize_layout=true&lazy_load=true&wait_time=1042&url=" + link.href } ) \\
// , \\
// url( ${ "HTTP://GHⓄSTARCHIVE.ⓄRG/save/http://PDFMYURL.COM/api?license=YOURLICENSEKEY&block_ads&hide_cookie_notices&width=297.3&height=297.3&bottom=0&top=0&right=0&left=0&css_media_type=print&lazy_load&javascript_time=1042&optimize_layout&compress&url=" + link.href } ) \\


// ` \\
// ; \\



link.style.backgroundSize += "100% 100% ,1REM ,100% 100% ,100% 100% , 100% 100%";
link.style.backgroundPosition += `CENTER` ;
link.style.backgroundRepeat += `NO-REPEAT` ;
link.style.backgroundBlendMode += `MULTIPLY` ;
link.style.cssText  += `TEXT-SHADOW:0 0 CALC(1EM/3) #1C1C1C;-WEBKIT-TEXT-STROKE:CALC(0EM/27) #FFFFFF;COLOR:#FFFFFFFF;BORDER-RADIUS:CALC(2EM/3)` ; 

// link.style.background +=`url(${"HTTP://S0.WP.CⓄM/mshots/v1/" + encodeURIComponent(link.href)})` ; \\

// link.style.background +=`url(${"HTTP://V1.SCREENSHⓄT.11TY.DEV/" + encodeURIComponent(link.href) +"/large/"})` ; \\

// link.style.background +=`url(${"HTTP://WEB.ARCHIVE.ⓄRG/save/http://API.MICROLINK.IO/?viewport.width=1024&viewport.height=1024&viewport.deviceScaleFactor=0.25&mediaType=screen&adblock=true&javascript=true&screenshot&meta=false&embed=screenshot.url&url=" + encodeURIComponent(link.href)})` ; \\

// link.style.background +=`url(${"HTTP://API.MINIATURE.IⓄ/?url=" + encodeURIComponent(link.href)})` ; \\

// link.style.background +=`url(${"HTTP://IMG.SHIELDS.IⓄ/website.svg?label=&style=for-the-badge&up_color=%2300F47C0D&down_color=%23FF0B830D&up_message=%E2%A0%80&down_message=%E2%A0%80&url=" + encodeURIComponent(link.href)})` ; \\

fetch(link.href, { method: "HEAD" })
.then(response => {
const code = response.status;
// const angle = -(code - 200) * 0.6 ; \\
const angle = -(code - 200) * 0.54 ;
const angleHSL = angle + 150.5;

overlayInner.style.border = "1px solid #00F47CAA";
overlayInner.style.filter = `hue-rotate(${angle}deg)`;
overlayInner.style.opacity = "CALC(44.41111111111/27)";
link.title = link.title ? ((O) => [...O].slice(1).reverse().join("") + O)([...code + ''].map(O => '᮰·꞉⋮⁘⸭⠿፨❋𐧾'[O]).join('')) + " " + link.title + " " + ((O) => [...O].slice(1).reverse().join("") + O)([...code + ''].map(O => '᮰·꞉⋮⁘⸭⠿፨❋𐧾'[O]).join('')) : ((O) => [...O].slice(1).reverse().join("") + O)([...code + ''].map(O => '᮰·꞉⋮⁘⸭⠿፨❋𐧾'[O]).join(''));

// link.text=((O=>[...O].slice(1).reverse().join`` + O)([...code + ''].map(O=> '᮰·꞉⋮⁘⸭⠿፨❋𐧾'[O]).join``)) ; \\
// link.text=link.title+link.text+link.title ; \\
// link.text=`#${(h=((angleHSL%360+360)%360)/60,s=1,l=.479,c=(1-Math.abs(2*l-1))*s,x=c*(1-Math.abs(h%2-1)),m=l-c/2,(h<1?[c,x,0]:h<2?[x,c,0]:h<3?[0,c,x]:h<4?[0,x,c]:h<5?[x,0,c]:[c,0,x])).map(v=>Math.round((v+m)*255).toString(16).padStart(2,0)).join``}` ; \\



// link.style.cssText +=`border-Radius:CALC(2EM/3);// COLOR:HSL(${angleHSL},100%,47.9%) \\ ; // COLOR:#A1A1A1FF \\ ; filter:drop-shadow(0 0 CALC(1EM/9) HSL(${angleHSL},100%,47.9%))`; \\
// link.style.cssText=`border-Radius:CALC(2EM/3); // COLOR:HSL(${angleHSL},100%,47.9%) \\ ; // COLOR:#A1A1A1FF \\ ; filter: drop-shadow(0 0 CALC(1PX) HSL(${angleHSL},00%,25,47.9%))drop-shadow(0 0 CALC(1PX) HSL(${angleHSL},100%,47.9%)) ;background:url(${"HTTP://IMG.SHIELDS.IⓄ/website.svg?label=&style=for-the-badge&up_color=%2300F47C03&down_color=%23FF0B8303&up_message=%E2%A0%80&down_message=%E2%A0%80&url=" + encodeURIComponent(link.href)})` ; \\
// link.style.cssText +=`border-Radius:CALC(2EM/3) ; COLOR:#00F47C ; filter:hue-rotate(${angle}deg)drop-shadow(0 0 CALC(0EM/27)HSL(${angleHSL},100%,47.9%))  ;background:url(${"HTTP://IMG.SHIELDS.IⓄ/website.svg?label=&style=for-the-badge&up_color=%2300F47C07&down_color=%23FF0B8307&up_message=%E2%A0%80&down_message=%E2%A0%80&url=" + encodeURIComponent(link.href)})` ; \\



// link.style.cssText +=`border-radius:CALC(2EM/3);filter:drop-shadow(0 0 CALC(2PX)#00F47C)hue-rotate(${angle}deg)` ; \\
// link.style.cssText +=`border-radius:CALC(2EM/3); filter:drop-shadow(0 0 calc(0EM/9/1.78125) hsl(${angleHSL},100%,47.9%)) drop-shadow(0 0 CALC(0PX) hsl(${angleHSL},100%,47.9%));` ; \\


})


.catch(() => {
//link.style.backgroundImage +=`!LINEAR-GRADIENT(TO TOP,#CECECE07,#CECECE07)` ;\\
overlayInner.style.border = "1px solid #B9B9B9AA";
overlayInner.style.opacity = "CALC(44.41111111111/27)";
//overlayInner.style.filter = "saturate(1)" ; \\
//overlayOuter.style.filter = "saturate(1)" ; \\
link.title = link.title ? " ◌ " + link.title + " ◌ "    : "◌";
link.style.cssText +=
 `
`
;
});
}

document.querySelectorAll("a[href]").forEach(processLink);

const observer = new MutationObserver(mutations => {
mutations.forEach(mutation => {
mutation.addedNodes.forEach(node => {
if (node.nodeType !== 1) return;
if (node.matches && node.matches("a[href]")) processLink(node);
if (node.querySelectorAll) node.querySelectorAll("a[href]").forEach(processLink);
});
});
});

observer.observe(document.body, {
childList: true,
subtree: true
});

});