Last active
July 17, 2023 13:39
-
-
Save dizys/856f9929db5f5d9316339403a7d955e5 to your computer and use it in GitHub Desktop.
Browser user script for blocking ads on IYF.tv
This file contains hidden or 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 IYF Ads Blocker | |
// @namespace https://dizy.cc | |
// @version 0.2 | |
// @description Ads blocker for iyf.tv | |
// @author Dizy | |
// @include /^https:\/\/(.*?)\.iyf\.tv\// | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=iyf.tv | |
// @grant GM_log | |
// @grant unsafeWindow | |
// @grant GM_addStyle | |
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js | |
// @require https://git.io/waitForKeyElements.js | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
GM_log("hello"); | |
GM_addStyle(` | |
vg-pause-ads, app-gg-block, | |
.block-center.ng-star-inserted, .player-side.player-right, | |
.app-download-block, .publicbox.ng-star-inserted, | |
.use-coin-box, #main-player > .caption, | |
#preloader, .overlap, | |
dn-floatads { | |
display: none !important; | |
opacity: 0; | |
pointer-events: none; | |
} | |
.page-container.video-player { | |
width: 100% !important; | |
} | |
.playPageTop { | |
min-height: auto !important; | |
} | |
.playPageBottom { | |
margin-top: 80px; | |
} | |
vg-controls { | |
pointer-events: initial !important; | |
} | |
`); | |
setInterval(() => { | |
if($("#main-player").hasClass('publicplay')) { | |
$("#main-player").removeClass('publicplay'); | |
$("#video_player").get(0).play(); | |
} | |
}, 1000) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment