-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathsheep3.js
More file actions
2 lines (2 loc) · 3.48 KB
/
sheep3.js
File metadata and controls
2 lines (2 loc) · 3.48 KB
1
2
// Source code at /all/sheep3/sheep3.ts
"use strict";(()=>{(()=>{var e={logo:"o",homeLink:"a",blockScreen:"t",screenBlockerWrapper:"s",screenBlocker:"i","block-screen":"e",screenBlockerCircle:"n","block-screen-circle":"r"},s=new CSSStyleSheet;s.replaceSync(':host{all:initial;color-scheme:dark;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol}.o{width:45px;height:45px;stroke:#fff;stroke-opacity:.7;stroke-width:20;fill:none}.a{font-size:0;display:block;position:fixed;z-index:1000;height:50px;width:50px;border-radius:50%;background-color:#0006;box-shadow:0 0 2px #00000080;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:all .2s;right:10px;bottom:10px;transform:translateZ(0);&:hover{background-color:#fffc;box-shadow:0 0 4px #00000080}&:active{box-shadow:0 0 2px #00000080;transform:translateZ(0) scale(.9)}&:focus{outline:none;box-shadow:0 0 4px #00000080,0 0 0 5px #4fa1a74d}.o{position:absolute;left:50%;top:50%;transform:translate(-50%,-46.667%);transition:all .2s}&.t{right:50%;bottom:50%;width:142vmax;height:142vmax;margin:-71vmax;background-color:#000;box-shadow:none;pointer-events:none;transition:all .5s;svg{transform:scale(2) translate(-50%,-50%)}}}.a:not(.t):hover .o{stroke:#000}.s{position:fixed;bottom:0;right:0;width:100vw;height:100vh;z-index:1001}.i{position:absolute;offset-path:ellipse(calc(50% - 35px) calc(50% - 35px) at calc(100% - 35px) 50%);offset-rotate:0deg;animation:e .5s forwards;.o{position:absolute;animation:o .5s forwards}}.n{position:absolute;width:50px;height:50px;margin:-25px;border-radius:50%;background-color:#000;animation:r .5s forwards}@keyframes e{0%{offset-distance:25%}to{offset-distance:50%}}@keyframes r{0%{scale:1}to{scale:var(--max-scale)}}@keyframes o{0%{transform:translate(-50%,-46.667%) scale(1)}to{transform:translate(-50%,-50%) scale(2)}}');var d=class extends HTMLElement{constructor(){super();let t=this.attachShadow({mode:"open"});t.adoptedStyleSheets=[s];let n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttributeNS(null,"viewBox","0 0 480 480"),n.setAttributeNS(null,"class",e.logo);let o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttributeNS(null,"d","M90 90a50 50 0 0 0 0 100H98.579A150 150 0 1 0 381.421 190H390a50 50 0 0 0 0 -100a50 50 0 1 1 -100 0a50 50 0 1 1 -100 0a50 50 0 1 1 -100 0z");let a=Object.assign(document.createElement("a"),{href:"/",textContent:"Go to SheepTester directory",className:e.homeLink});a.addEventListener("click",l=>{l.preventDefault();let i=Math.max(window.innerWidth,window.innerHeight);document.body.inert=!0;let r=Object.assign(document.createElement("div"),{className:e.screenBlockerWrapper}),c=Object.assign(document.createElement("div"),{className:e.screenBlocker});c.style.setProperty("--max-scale",`${i*Math.SQRT2/50}`),c.append(Object.assign(document.createElement("div"),{className:e.screenBlockerCircle}),n.cloneNode(!0)),c.addEventListener("animationend",()=>{setTimeout(()=>{r.remove(),document.body.inert=!1},500),window.location.href="/?from=sheep3"}),r.append(c),t.append(r)}),n.append(o),a.append(n),t.append(a)}};customElements.define("sheep-btn",d),document.addEventListener("DOMContentLoaded",()=>document.body.append(document.createElement("sheep-btn")),{once:!0}),Object.assign(window,{dataLayer:[["js",new Date],["config","G-9NWSPRKVS1"]].map(t=>function(){return arguments}(...t))}),document.head.append(Object.assign(document.createElement("script"),{src:"/pensive.js"}))})();})();