-
-
Save irungentootoo/7677b8f68843ff697929dbd299afc547 to your computer and use it in GitHub Desktop.
Filmix Upgrade
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 Filmix Upgrade | |
// @namespace http://tampermonkey.net/ | |
// @version 0.14 | |
// @description small update for Filmix | |
// @author Ant1gon | |
// @match *://filmix.co/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
window.onload = _ => { | |
removeElements(); | |
if (document.querySelector('.players') != null) { document.querySelector('.players').style.width = "auto"; }; | |
if (document.querySelector('.players') != null) { document.querySelector('.players').style.height = "auto"; }; | |
if (document.querySelector('#player') != null) { document.querySelector('#player').style.width = "auto" }; | |
var buttonEl = document.createElement("input"); | |
buttonEl.value = "Показати інформацію"; | |
buttonEl.type = "button"; | |
buttonEl.style.height = "34px"; | |
buttonEl.style.marginLeft = "15px"; | |
buttonEl.className = "m-button"; | |
buttonEl.addEventListener("click", _ => { | |
let x = document.querySelector(".fullstory"); | |
if (x.style.display === "none") { | |
x.style.display = "block"; | |
} else { | |
x.style.display = "none"; | |
} | |
}); | |
if(document.querySelector(".hidden-block") == null){ | |
var hidBlock = document.createElement("div"); | |
hidBlock.className = "hidden-block"; | |
document.querySelector(".player-title").parentElement.appendChild(hidBlock); | |
} | |
document.querySelector(".hidden-block").appendChild(buttonEl); | |
document.querySelectorAll(".translations li").forEach(e => { | |
e.addEventListener("click", _=>{ | |
for(let i=0; i < 3; i++){ | |
setTimeout(removeElements,1500); | |
} | |
}); | |
}) | |
} | |
})(); | |
function removeElements(argument) { | |
document.querySelectorAll("pjsdiv").forEach(e => { | |
if (e.innerText.indexOf("Просмотр без ограничений доступен с отключенным AdBlock!") !== -1) { | |
if (e.id != 'oframeplayer') { | |
e.remove(); | |
} | |
} | |
}) | |
let selectorsToRemove = ['.mgbox', '.fullstory', '.information', '.frames', '.aside-wrap', '.player-title']; | |
selectorsToRemove.forEach(e => { | |
if (document.querySelector(e) != null && e != '.aside-wrap') { | |
document.querySelector(e).style.display = "none"; | |
} else { | |
if (document.querySelector('.aside-wrap') != null) { | |
document.querySelector('.aside-wrap').parentNode.style.display = "none"; | |
}; | |
} | |
}); | |
let selectorsToWidth100 = ['.content', '.player-item']; | |
selectorsToWidth100.forEach(e => { | |
if (document.querySelector(e) != null) { document.querySelector(e).style.width = '100%' }; | |
}); | |
document.querySelectorAll(".information.warning").forEach(e => { | |
e.remove(); | |
}) | |
// body... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment