-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme-thief-minify.js
1 lines (1 loc) · 5.59 KB
/
theme-thief-minify.js
1
javascript:void%20function(){javascript:(function(){function%20a(a){%22%22===a||void%200===a||navigator.clipboard.writeText(a).then(()=%3E{console.log(a),b()})}function%20b(){let%20a=document.createElement(%22div%22);a.textContent=%22Copied%20to%20clipboard%22,a.style.position=%22fixed%22,a.style.top=%2220px%22,a.style.left=%2250%25%22,a.style.transform=%22translateX(-50%25)%22,a.style.backgroundColor=%22rgba(0,%200,%200,%200.7)%22,a.style.color=%22white%22,a.style.padding=%2210px%22,a.style.borderRadius=%225px%22,a.style.zIndex=%221000%22,a.style.transition=%22opacity%200.5s%20ease%22,document.body.appendChild(a),setTimeout(()=%3E{a.style.opacity=%220%22},1e3),setTimeout(()=%3E{a.remove()},1500)}function%20c(){let%20a=document.createElement(%22div%22);return%20a.style.backgroundColor=%22white%22,a.style.padding=%2210px%22,a.style.border=%221px%20solid%20black%22,a.style.maxHeight=%22400px%22,a.style.maxWidth=%22220px%22,a.style.overflowY=%22auto%22,a.style.overflowX=%22auto%22,a}function%20d(a){let%20b=document.createElement(%22h2%22);return%20b.textContent=a,b.style.fontFamily=%22Arial,%20Helvetica,%20sans-serif%22,b.style.fontSize=%2220px%22,b.style.color=%22black%22,b}function%20e(b){let%20c=document.createElement(%22div%22);return%20c.style.height=%2220px%22,c.style.marginBottom=%225px%22,c.style.backgroundColor=b,c.title=%22Click%20to%20copy%20%22+b,c.style.border=%221px%20solid%20black%22,c.onclick=()=%3Ea(b),c.setAttribute(%22class%22,%22color-swatch%22),l%26%26(c.style.fontSize=%2212px%22,c.style.fontFamily=%22Arial,%20Helvetica,%20sans-serif%22,c.style.lineHeight=%2212px%22,c.style.textAlign=%22center%22,c.style.color=%22black%22,c.style.textShadow=%221px%201px%200px%20white,%20-1px%20-1px%200px%20white,%201px%20-1px%200px%20white,%20-1px%201px%200px%20white%22,c.innerHTML=b),c.onmouseover=()=%3E{c.style.cursor=%22pointer%22},c}function%20f(b){if(%22%22===b)return;let%20c=document.createElement(%22div%22);return%20c.style.fontFamily=b,c.style.fontSize=%2220px%22,c.style.marginBottom=%225px%22,c.textContent=b,c.title=%22Click%20to%20copy%20%22+b,c.style.border=%221px%20solid%20black%22,c.onclick=()=%3Ea(b),c.style.color=%22black%22,c.onmouseover=()=%3E{c.style.cursor=%22pointer%22},c}function%20g(a,b,c,d,e,f){let%20g=document.createElement(%22button%22);return%20g.textContent=a,g.style.position=%22absolute%22,g.style.top=b,g.style.bottom=c,g.style.left=d,g.style.right=e,g.style.zIndex=%2210000%22,g.style.height=%2230px%22,g.style.backgroundColor=f,g.style.border=%221px%20solid%20black%22,g.style.borderRadius=%225px%22,g.style.color=%22white%22,g.style.fontFamily=%22Arial,%20Helvetica,%20sans-serif%22,g.style.fontSize=%2216px%22,g.style.padding=%220px%2010px%22,g.onmouseover=()=%3E{g.style.cursor=%22pointer%22},g}function%20h(){let%20a={backgroundColors:Array.from(i),textColors:Array.from(j),fontFamilies:Array.from(k)},b=JSON.stringify(a,null,4),c=%22data:text/json;charset=utf-8,%22+encodeURIComponent(b),d=document.createElement(%22a%22);d.setAttribute(%22href%22,c),d.setAttribute(%22download%22,%22theme.json%22),d.click()}const%20i=new%20Set,j=new%20Set,k=new%20Set;let%20l=!1;document.getElementById(%22color-container%22)%26%26(document.getElementById(%22color-container%22).remove(),i.clear(),j.clear(),k.clear()),document.querySelectorAll(%22*%22).forEach(a=%3E{let%20b=window.getComputedStyle(a),c=b.getPropertyValue(%22color%22),d=b.getPropertyValue(%22background-color%22),e=b.getPropertyValue(%22font-family%22);j.add(c),i.add(d),k.add(e)});let%20m=c(),n=c(),o=c(),p=function(){let%20a=document.createElement(%22div%22);return%20a.style.position=%22fixed%22,a.style.top=%2210px%22,a.style.right=%2210px%22,a.style.zIndex=%229999%22,a.style.backgroundColor=%22%23a9b9d1%22,a.style.padding=%2210px%22,a.style.border=%221px%20solid%20black%22,a.style.maxHeight=%22480px%22,a.style.maxWidth=%22720px%22,a.style.display=%22flex%22,a.style.flexDirection=%22row%22,a.style.paddingBottom=%2230px%22,a.setAttribute(%22id%22,%22color-container%22),a.style.fontFamily=%22Arial,%20Helvetica,%20sans-serif%22,a.style.fontSize=%2220px%22,a}();m.appendChild(d(%22Background%20colors%22)),n.appendChild(d(%22Other%20colors%22)),o.appendChild(d(%22Font%20families%22)),i.forEach(a=%3E{m.appendChild(e(a))}),j.forEach(a=%3E{n.appendChild(e(a))}),k.forEach(a=%3E{o.appendChild(f(a))}),p.appendChild(m),p.appendChild(n),p.appendChild(o),containerCloseButton=g(%22Close%22,%22auto%22,%220px%22,%22auto%22,%2210px%22,%22%23cf0502%22),containerDownloadButton=g(%22Download%20as%20JSON%22,%22auto%22,%220px%22,%2210px%22,%22auto%22,%22%230273cf%22),containerTextModeButton=g(%22Text%20mode%22,%22auto%22,%220px%22,%22240px%22,%22auto%22,%22%23d3d618%22),containerDownloadButton.onclick=()=%3Eh(),containerCloseButton.onclick=()=%3Ep.remove(),containerTextModeButton.onclick=()=%3E{l=!l,l%3Fdocument.querySelectorAll(%22.color-swatch%22).forEach(a=%3E{a.style.fontSize=%2212px%22,a.style.fontFamily=%22Arial,%20Helvetica,%20sans-serif%22,a.style.lineHeight=%2212px%22,a.style.textAlign=%22center%22,a.style.color=%22black%22,a.style.textShadow=%221px%201px%200px%20white,%20-1px%20-1px%200px%20white,%201px%20-1px%200px%20white,%20-1px%201px%200px%20white%22;let%20b=a.title.split(%22%20%22).slice(3).join(%22%20%22);a.innerHTML=b}):document.querySelectorAll(%22.color-swatch%22).forEach(a=%3E{a.style.fontSize=%2220px%22,a.style.fontFamily=%22Arial,%20Helvetica,%20sans-serif%22,a.style.lineHeight=%2220px%22,a.style.textAlign=%22left%22,a.style.color=a.style.backgroundColor,a.style.textShadow=%22none%22,a.innerHTML=%22%22})},p.appendChild(containerCloseButton),p.appendChild(containerDownloadButton),p.appendChild(containerTextModeButton),document.body.appendChild(p)})()}();