Last active
June 27, 2021 09:51
-
-
Save iniznet/92ace83513352aa7f70e52109b7909c6 to your computer and use it in GitHub Desktop.
Gomunime Auto Popup Close & Auto 720p Player
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 Gomunime Auto Popup Close & Auto 720p Player | |
// @namespace https://niznet.my.id/ | |
// @version 1.0.1 | |
// @description Tutup 5 detik pop up / float ads & auto 720p Player | |
// @author niznet | |
// @match https://gomunime.online/* | |
// @icon https://www.google.com/s2/favicons?domain=gomunime.online | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var i = 1; | |
const retry = 15; | |
var ads = false; | |
var player = false; | |
var clickEvt = new MouseEvent("click", { | |
view: window, | |
bubbles: true, | |
cancelable: true, | |
clientX: 20, | |
}); | |
var timer = setInterval( () => { | |
if ( i > retry || ( ads && player ) ) { | |
clearInterval( timer ); | |
} | |
const gomunime_ads = document.querySelector("#promoContainer"); | |
if ( gomunime_ads && !ads ) { | |
ads = true; | |
gomunime_ads.style.display = "none"; | |
} | |
if ( !player ) { | |
player = true; | |
jwplayer().on('ready', function(e) { | |
jwplayer().play(); | |
jwplayer().on('play', function(e) { | |
setTimeout( () => jwplayer().pause(), 200 ); | |
// 1 = 360p, 2 = 480p, 3 = 720p, 4 = 1080p (jarang ada) | |
jwplayer().setCurrentQuality(3); | |
setTimeout( () => jwplayer().play(), 200 ); | |
}); | |
}); | |
} | |
i++; | |
}, 800 ); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment