This commit is contained in:
2024-03-09 16:19:02 +08:00
parent 8f0074dd88
commit 958aa9f79f

View File

@@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name EH Gallery Script // @name EH Gallery Script
// @namespace https://github.com/lifegpc/userscript // @namespace https://github.com/lifegpc/userscript
// @version 0.1.12 // @version 0.1.13
// @description :( // @description :(
// @author lifegpc // @author lifegpc
// @match https://*.e-hentai.org/g/*/* // @match https://*.e-hentai.org/g/*/*
@@ -460,7 +460,7 @@ function popMsg(msg, type = "ok") {
setTimeout(() => { $msg.remove() }, type == 'ok' ? 2500 : 5500) setTimeout(() => { $msg.remove() }, type == 'ok' ? 2500 : 5500)
} }
const instances = {}; const instances = {};
let insid = 0; let insid = 1;
function set_instance(ins) { function set_instance(ins) {
instances[insid] = ins; instances[insid] = ins;
return insid++; return insid++;
@@ -548,6 +548,7 @@ let observer = new MutationObserver(async (data) => {
e.children[0].innerHTML = name; e.children[0].innerHTML = name;
} else { } else {
e.innerHTML = name; e.innerHTML = name;
e.title = '';
} }
let html = ""; let html = "";
if (value.intro) { if (value.intro) {
@@ -576,6 +577,7 @@ let observer = new MutationObserver(async (data) => {
e.children[0].innerText = otag; e.children[0].innerText = otag;
} else { } else {
e.textContent = otag; e.textContent = otag;
e.title = otag;
} }
e.removeAttribute('otag'); e.removeAttribute('otag');
let id = e.getAttribute("tippy-id"); let id = e.getAttribute("tippy-id");
@@ -679,6 +681,7 @@ async function handle_tags() {
i.children[0].innerHTML = name; i.children[0].innerHTML = name;
} else { } else {
i.innerHTML = name; i.innerHTML = name;
i.title = '';
} }
let html = ""; let html = "";
if (value.intro) { if (value.intro) {
@@ -707,6 +710,7 @@ async function handle_tags() {
i.children[0].innerText = otag; i.children[0].innerText = otag;
} else { } else {
i.textContent = otag; i.textContent = otag;
i.title = otag;
} }
i.removeAttribute('otag'); i.removeAttribute('otag');
let id = i.getAttribute("tippy-id"); let id = i.getAttribute("tippy-id");