jm-remove-ad

JM漫画去广告

Verze ze dne 21. 06. 2025. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name        jm-remove-ad
// @namespace   Violentmonkey Scripts
// @match       https://18comic.vip/*
// @grant       GM_addStyle
// @version     1.0
// @author      mesimpler
// @require     https://cdn.jsdelivr.net/npm/@violentmonkey/dom@2
// @description JM漫画去广告
// @description 2025/6/21 08:57:06
// ==/UserScript==

function applyToElement(selector, callback) {
  const element = document.querySelector(selector)
  if (element) callback(element);
}
function applyToAllElements(selector, callback) {
  const elements = document.querySelectorAll(selector);
  if(elements) {
     elements.forEach(callback)
  }
}

applyToElement('.div-bf-pv', (el) => el.remove())
applyToElement('.top-nav', (el) => el.remove())
applyToElement('#Comic_Top_Nav', (el) => el.style.top = 0)
applyToElement('img[src*="float-right-close.png"]', (el) => el.parentElement.remove())
applyToElement('div[class*="sticky"]', (el) => el.remove())

applyToAllElements('.meun-game', (el) => el.parentElement.remove())
applyToAllElements('.meun-video', (el) => el.parentElement.remove())

GM_addStyle(`
  .ph-bottom li {
    width: 100% !important;
  }
`)

setInterval(() => {
  applyToAllElements('div[data-show="ok"]', (el) => el.parentElement.parentElement.remove())
}, 3000)

// const targetNode = document.querySelector("#wrapper");
// const disconnect = VM.observe(targetNode, () => {
//   applyToAllElements('div[data-show="ok"]', (el) => el.parentElement.parentElement.remove())
// });