Created
March 16, 2023 08:01
-
-
Save liao02x/173d594ada77985c7b4aa4f8f2b67d91 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Remove Ad | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.iyf.tv/play/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=iyf.tv | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const remove = (selectors) => { | |
const style = document.createElement('style'); | |
// add the CSS as a string using template literals | |
selectors.forEach(selector => { | |
style.appendChild( | |
document.createTextNode(`${selector} { display: none !important;}`) | |
)}) | |
// add it to the head | |
const head = document.getElementsByTagName('head')[0]; | |
head.appendChild(style); | |
} | |
remove(["vg-pause-ads", "vg-pause-ads *", "app-gg-block", "app-gg-block *"]) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment