Restore volumn deleted by the detector
当前为
// ==UserScript==
// @name linovelib restore volumn
// @namespace http://tampermonkey.net/
// @license MIT
// @version 0.4.0
// @description Restore volumn deleted by the detector
// @author gwsl
// @match https://*.linovelib.com/novel/*/catalog
// @match https://*.bilinovel.com/novel/*/catalog
// @match https://*.linovelib.com/download/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=linovelib.com
// @grant none
// @run-at document-end
// ==/UserScript==
(function () {
'use strict';
var ele = document.querySelector('#volume-list,#volumes');
if(ele == null) return;
var config = { attributes: true };
var observer = new MutationObserver((mutationsList, observer) => {
for (let record of mutationsList) {
if (record.type == 'attributes') {
/** @type {HTMLElement} */
var target = record.target;
if (target.style.getPropertyValue('display') == 'none') {
target.style.setProperty('display', 'block');
target.previousElementSibling?.remove();
}
}
}
});
observer.observe(ele, config);
})();