From cb25c3472a034376303d71cdebceefc5d73bb833 Mon Sep 17 00:00:00 2001 From: Frank Lyder Bredland Date: Sun, 26 May 2024 19:21:03 +0200 Subject: [PATCH] Remove old Witchcraft scripts This was used to automatically load JS stuff into the browser. It was a good idea, but a subpar implementation. And given that crunchyroll updated their website layout my script stopped working, and I never got around to updating it... --- setup | 1 - witchcraft-scripts/crunchyroll.com.js | 1 - 2 files changed, 2 deletions(-) delete mode 100644 witchcraft-scripts/crunchyroll.com.js diff --git a/setup b/setup index 05b2494..5d48dc5 100755 --- a/setup +++ b/setup @@ -60,7 +60,6 @@ setup_link "$HOME/.zshrc" "zshrc" setup_link "$HOME/.ctags" "ctags" setup_link "$HOME/.oh-my-zsh" "oh-my-zsh" setup_link "$HOME/.gitconfig" "gitconfig" -setup_link "$HOME/.witchcraft-scripts" "witchcraft-scripts" setup_link "$HOME/.config/yabai/yabairc" "yabairc" setup_link "$HOME/.config/skhd/skhdrc" "skhdrc" setup_link "$HOME/.bin" "bin" diff --git a/witchcraft-scripts/crunchyroll.com.js b/witchcraft-scripts/crunchyroll.com.js deleted file mode 100644 index 8c7a438..0000000 --- a/witchcraft-scripts/crunchyroll.com.js +++ /dev/null @@ -1 +0,0 @@ -const H=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerpolicy&&(i.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?i.credentials="include":l.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}};H();let K=I;const A={},g=1,S=2,v={owned:null,cleanups:null,context:null,owner:null};var r=null;let C=null,p=null,y=null,u=null,h=null,E=0;function V(e,t){t&&(r=t);const n=p,s=r,l=e.length===0?v:{owned:null,cleanups:null,context:null,owner:s};r=l,p=null;let i;try{T(()=>i=e(()=>P(l)),!0)}finally{p=n,r=s}return i}function N(e,t,n){const s=J(e,t,!1,g);U(s)}function W(e){if(y)return e();let t;const n=y=[];try{t=e()}finally{y=null}return T(()=>{for(let s=0;s{for(let l=0;l1e6)throw u=[],new Error},!1),t}function U(e){if(!e.fn)return;P(e);const t=r,n=p,s=E;p=r=e,j(e,e.value,s),p=n,r=t}function j(e,t,n){let s;try{s=e.fn(t)}catch(l){_(l)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?O(e,s):e.value=s,e.updatedAt=n)}function J(e,t,n,s=g,l){const i={fn:e,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:r,context:null,pure:n};return r===null||r!==v&&(r.owned?r.owned.push(i):r.owned=[i]),i}function D(e){const t=C;if(e.state!==g)return e.state=0;if(e.suspense&&q(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;s--)if(e=n[s],e.state===g||t)U(e);else if(e.state===S||t){const l=u;u=null,M(e),u=l}}function T(e,t){if(u)return e();let n=!1;t||(u=[]),h?n=!0:h=[],E++;try{e()}catch(s){_(s)}finally{X(n)}}function X(e){u&&(I(u),u=null),!e&&(h.length?W(()=>{K(h),h=null}):h=null)}function I(e){for(let t=0;te(t))}function $(e,t,n){let s=n.length,l=t.length,i=s,o=0,f=0,m=t[l-1].nextSibling,a=null;for(;oc-f){const Q=t[o];for(;f{s=l,F(t,e(),t.firstChild?null:void 0,n)}),()=>{s(),t.textContent=""}}function k(e,t,n){const s=document.createElement("template");s.innerHTML=e;let l=s.content.firstChild;return n&&(l=l.firstChild),l}function F(e,t,n,s){if(n!==void 0&&!s&&(s=[]),typeof t!="function")return x(e,t,s,n);N(l=>x(e,t(),l,n),s)}function x(e,t,n,s,l){for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,o=s!==void 0;if(e=o&&n[0]&&n[0].parentNode||e,i==="string"||i==="number")if(i==="number"&&(t=t.toString()),o){let f=n[0];f&&f.nodeType===3?f.data=t:f=document.createTextNode(t),n=w(e,n,s,f)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;else if(t==null||i==="boolean")n=w(e,n,s);else{if(i==="function")return N(()=>{let f=t();for(;typeof f=="function";)f=f();n=x(e,f,n,s)}),()=>n;if(Array.isArray(t)){const f=[];if(L(f,t,l))return N(()=>n=x(e,f,n,s,!0)),()=>n;if(f.length===0){if(n=w(e,n,s),o)return n}else Array.isArray(n)?n.length===0?G(e,f,s):$(e,n,f):n==null||n===""?G(e,f):$(e,o&&n||[e.firstChild],f);n=f}else if(t instanceof Node){if(Array.isArray(n)){if(o)return n=w(e,n,s,t);w(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function L(e,t,n){let s=!1;for(let l=0,i=t.length;l=0;o--){const f=t[o];if(l!==f){const m=f.parentNode===e;!i&&!o?m?e.replaceChild(l,f):e.insertBefore(l,n):m&&e.removeChild(f)}else i=!0}}else e.insertBefore(l,n);return[l]}const z=k("
Queue:
"),ee=()=>{const e=document.querySelectorAll(".queue-item-wrapper");return(()=>{const t=z.cloneNode(!0),n=t.firstChild;return n.firstChild,t.style.setProperty("padding","20px"),t.style.setProperty("background","black"),t.style.setProperty("color","white"),t.style.setProperty("font-size","22px"),t.style.setProperty("font-family","sans-serif"),t.style.setProperty("margin","20px 0"),F(n,()=>e.length,null),t})()};window.addEventListener("load",()=>{const e=document.createElement("div");document.querySelector("#tabs").parentElement.insertBefore(e,tabs.nextSibling),Z(()=>Y(ee,{}),e)});