Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- 'use strict';
- window.addEventListener("load", function(event) {
- if (window.location.pathname == '/') return;
- const node = document.querySelector('.video-player__overlay');
- if (!node) {
- return
- }
- new MutationObserver((mutations) => {
- mutations.forEach(mutation => {
- if (!mutation.addedNodes.length) {
- return
- }
- const div = mutation.addedNodes[0]
- if (!div.classList.contains('content-overlay-gate')) {
- return
- }
- setTimeout(() => {
- div.children[0].children[2].children[0].click()
- })
- })
- }).observe(node, { childList: true, subtree: true })
- });
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement