window.JE_PLUGINS.remember = () => { if (window.location.href.startsWith("https://forums.mangadex.org/")) { let z0 = false; document.body.addEventListener("click", a1 => { const b2 = a1.target.closest('a[href^="/posts/"][href$="/edit"][data-xf-click="quick-edit"]'); if (b2) z0 = true; }); document.body.addEventListener("click", c3 => { const d4 = c3.target.closest('button.button--icon--save, button.js-cancelButton'); if (d4) { z0 = false; setTimeout(() => g9(), 100); } }); const e5 = () => { let f6 = window.location.href.split("#")[0]; let g7 = f6.match(/^(https:\/\/forums\.mangadex\.org\/threads\/[^\/]+?\.\d+)(?:\/page-\d+)?$/); return g7 ? g7[1] : f6; }; const h8 = (i9, j0, k1, l2) => { const m3 = () => { if (z0) return; let n4 = j0.textContent.trim(); document.querySelectorAll('.fr-element.fr-view').forEach(o5 => { if (o5 !== j0 && o5.textContent.trim() !== n4) o5.textContent = n4; }); let p6; if (n4.length === 0) { p6 = l2.filter(q7 => q7.link !== i9); } else { p6 = l2.map(q7 => q7.link === i9 ? { ...q7, text: j0.innerHTML } : q7); } localStorage.setItem("mangadex_saved", JSON.stringify(p6)); }; j0.addEventListener("input", m3); j0.addEventListener("keyup", m3); }; const r8 = s9 => { document.querySelectorAll('.formButtonGroup .button--icon--reply[type="submit"]').forEach(t0 => { if (!t0.dataset._wipeBound) { t0.addEventListener("click", () => { let u1 = JSON.parse(localStorage.getItem("mangadex_saved") || "[]"); let v2 = u1.filter(w3 => w3.link !== s9); localStorage.setItem("mangadex_saved", JSON.stringify(v2)); }); t0.dataset._wipeBound = "true"; } }); }; const g9 = () => { if (z0) return; const x4 = e5(); let y5 = JSON.parse(localStorage.getItem("mangadex_saved") || "[]"); let z6 = y5.find(a7 => a7.link === x4); let b8 = z6 ? z6.id : (y5.length ? Math.max(...y5.map(c9 => c9.id)) + 1 : 1); if (!z6) { y5.push({ id: b8, link: x4, text: "" }); localStorage.setItem("mangadex_saved", JSON.stringify(y5)); } document.querySelectorAll('.fr-element.fr-view').forEach(d0 => { if (!d0.dataset._bound) { if (z6 && z6.text && z6.text.trim()) d0.innerHTML = z6.text; h8(x4, d0, b8, y5); d0.dataset._bound = "true"; } }); r8(x4); }; const e0 = new MutationObserver(() => g9()); e0.observe(document.body, { childList: true, subtree: true }); g9(); } };
window.JE_PLUGINS.html = () => { document.querySelectorAll('.message-body.js-selectToQuote .bbWrapper').forEach(wrapper => { let rawHTML = wrapper.innerHTML; const match = rawHTML.match(/openthineeyes([\s\S]*?)openthineeyes/); if (match) { const enclosed = match[1]; const pattern = /<(style|table|thead|tbody|tfoot|tr|td|th)[\s\S]*?\/\1>/gi; const decoded = enclosed.replace(pattern, m => m.replace(/</g, '<').replace(/>/g, '>')); wrapper.innerHTML = rawHTML.replace(match[0], decoded); } }); };
window.JE_PLUGINS.white = () => { (() => { const z0 = document.createElement('style'); z0.id = 'dꜽmode-style'; z0.textContent = "*,*::before,*::after{border-right-color:#f0f0f0!important;}svg,svg *{fill:#111111!important;stroke:#111111!important;}.p-nav-list .p-navEl.is-selected{color:#222222!important;}.p-nav-list .p-navEl{color:#444444!important;}.node-description{color:rgba(80,80,80,0.76)!important;}*{border-color:#e5e7eb!important;}html[data-theme=\"light\"],html.dꜽmode-light{--theme-foreground:#111111;--theme-background:#f0f0f0;}.message-userArrow{position:absolute;top:20px;right:-17px;border:15px solid transparent!important;border-right:20px solid white!important;transform:rotate(-90deg);}img[src$=\".svg\"]{filter:invert(0%) brightness(100%);}svg,svg *{color:var(--theme-foreground)!important;fill:currentColor!important;stroke:currentColor!important;}.contentRow-fader{background:linear-gradient(to bottom, rgba(33,35,40,0) 0%, #f0f0f0 80%) !important;}"; document.head.appendChild(z0); const a1 = () => { const b2 = document.querySelectorAll('*'); b2.forEach(c3 => { if (c3.classList.contains('message-userArrow')) { c3.style.borderRight = '20px solid white'; return; } const d4 = getComputedStyle(c3); if (d4.backgroundColor === 'rgb(18, 19, 24)') c3.style.backgroundColor = 'white'; if (d4.backgroundColor === 'rgb(33, 35, 40)') c3.style.backgroundColor = '#f0f1f2'; if (d4.backgroundColor === 'rgb(40, 42, 48)') c3.style.backgroundColor = 'white'; if (d4.color === 'rgba(175, 175, 175, 0.76)') c3.style.color = 'rgba(80, 80, 80, 0.76)'; if (d4.color === 'rgb(222, 239, 239)') c3.style.color = '#111111'; if (d4.borderColor === 'rgb(45, 47, 51)') c3.style.borderColor = '#e5e7eb'; if (d4.borderRightColor === 'rgb(18, 19, 24)') c3.style.borderRightColor = '#e5e7eb'; if (d4.borderColor === 'rgb(52, 55, 59)') c3.style.borderColor = '#e5e7eb'; if (d4.color === 'rgb(17, 17, 17)') c3.style.color = '#333333'; if (d4.borderTopColor === 'rgb(52, 55, 59)') c3.style.borderTopColor = '#e5e7eb'; if (d4.borderBottomColor === 'rgb(52, 55, 59)') c3.style.borderBottomColor = '#e5e7eb'; if (d4.borderLeftColor === 'rgb(52, 55, 59)') c3.style.borderLeftColor = '#e5e7eb'; }); }; a1(); const e5 = new MutationObserver(() => a1()); e5.observe(document.body, { childList: true, subtree: true }); })(); };
window.JE_PLUGINS.terti = () => { document.querySelectorAll('*').forEach(a => { const b = getComputedStyle(a); if (!b.fontFamily.includes('nullpunktsenergiefont')) { a.style.fontFamily = `${b.fontFamily},'nullpunktsenergiefont'`; } }); };
window.JE_PLUGINS.logo = () => { const newSrc = 'https://files.catbox.moe/ij5u2h.svg'; const newHref = 'https://forums.mangadex.org'; const img = document.querySelector('img.logoText'); if (img) { img.src = newSrc; let style = img.getAttribute('style') || ''; if (!/width\s*:\s*\d+px/.test(style)) { style = style.trim().replace(/;?$/, ';') + 'width: 120px;'; } img.setAttribute('style', style); const parentAnchor = img.closest('a'); if (parentAnchor) { parentAnchor.href = newHref; } } };
window.JE_PLUGINS.katex = () => { (function () { function injectKaTeX() { var head = document.head; var link = document.createElement("link"); link.rel = "stylesheet"; link.href = "https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css"; head.appendChild(link); var style = document.createElement("style"); style.textContent = ".katex { font-size: 1lh !important; }"; document.head.appendChild(style); var script1 = document.createElement("script"); script1.src = "https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.js"; script1.onload = function () { var script2 = document.createElement("script"); script2.src = "https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/contrib/auto-render.min.js"; script2.onload = function () { if (typeof renderMathInElement === "function") { renderMathInElement(document.body, { delimiters: [{ left: "\\(", right: "\\)", display: false }, { left: "\\[", right: "\\]", display: true }] }); } }; head.appendChild(script2); }; head.appendChild(script1); } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", injectKaTeX); } else { injectKaTeX(); } })(); };