Skip to content

Instantly share code, notes, and snippets.

@liao02x
Created March 16, 2023 08:01
Show Gist options
  • Save liao02x/173d594ada77985c7b4aa4f8f2b67d91 to your computer and use it in GitHub Desktop.
Save liao02x/173d594ada77985c7b4aa4f8f2b67d91 to your computer and use it in GitHub Desktop.
// ==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