linovelib restore volumn

Restore volumn deleted by the detector

// ==UserScript==
// @name         linovelib restore volumn
// @namespace    http://tampermonkey.net/
// @license MIT
// @version      0.3.1
// @description  Restore volumn deleted by the detector
// @author       gwsl
// @match        https://*.linovelib.com/novel/*/catalog
// @match        https://*.bilinovel.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);
})();