Created
January 7, 2025 23:06
-
-
Save tanaydin/026228cea9f35852274f6137f1408a6b to your computer and use it in GitHub Desktop.
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 Dizipal video oncesi reklam gecici | |
// @version 2024-02-03 | |
// @namespace https://dizipal845.com/ | |
// @description Dizipal video oncesi reklamlari gecmek icin bir user script | |
// @author You | |
// @include https://dizipal*.com/* | |
// @icon https://dizipal845.com/favicon-32x32.png | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function dizipalClean() { | |
removeElementsByClass("bb"); | |
let skipButton = document.getElementById("skipButton"); | |
if (skipButton) { | |
if (skipButton.style.display == "none") { | |
window.setTimeout(dizipalClean, 1000); | |
} else { | |
skipButton.removeAttribute("disabled"); | |
skipButton.click(); | |
window.setTimeout(dizipalClean, 250); | |
} | |
} | |
} | |
function removeElementsByClass(className){ | |
const elements = document.getElementsByClassName(className); | |
while(elements.length > 0){ | |
elements[0].parentNode.removeChild(elements[0]); | |
} | |
} | |
if (document.readyState === "loading") { | |
document.addEventListener("DOMContentLoaded", dizipalClean); | |
} else { | |
dizipalClean(); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment