Greasy Fork is available in English.

linovelib restore volumn

Restore volumn deleted by the detector

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
// ==UserScript==
// @name         linovelib restore volumn
// @namespace    http://tampermonkey.net/
// @license MIT
// @version      0.3
// @description  Restore volumn deleted by the detector
// @author       gwsl
// @match        https://*.linovelib.com/novel/*/catalog
// @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 parent = ele.parentElement;
  var html = ele?.outerHTML;

  var div = document.createElement('div');
  div.innerHTML = html;

  var scripts = div.querySelectorAll('script');
  scripts.forEach(it => it.remove());

  console.log(div, div.innerHTML);
  setTimeout(() => {
    parent.removeChild(ele);
    parent.append(div);
  }, 300);
})();