// ==UserScript== // @name Radio prevent hide // @namespace radio-prevent // @include http://player.radioloyalty.com/* // @include https://player.radioloyalty.com/* // @version 1 // @grant none // ==/UserScript== (function() { window.addEventListener('load', function(){ if (document.getElementById('mainDisplayAd').children.length === 0){ setTimeout(function(){ if (document.getElementById('mainDisplayAd').children.length === 0){ window.location.reload(true); } }, 10000); } if (!playerManager.get("session").get("uuid")){ setTimeout(function(){ if (!playerManager.get("session").get("uuid")){ window.location.reload(true); } }, 10000); } var css = '.modal-backdrop{z-index: 0 !important; }'; css += '#player{visibility: hidden !important;}'; css += '#player{pointer-events: none !important;}'; css += '#captchaModal{display: block !important}'; css += '#modal .modal{opacity: 1 !important;}'; var head = document.head || document.getElementsByTagName('head')[0]; var style = document.createElement('style'); style.type = 'text/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } head.appendChild(style); }); })();