sh.st - Lite

Helps to deal with sh.st easier

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         sh.st - Lite
// @namespace    x4_shst
// @version      0.1
// @description  Helps to deal with sh.st easier
// @author       x4fab
// @match        http://sh.st/*
// @grant        none
// @license      CC0
// ==/UserScript==

var _setInterval = setInterval;
setInterval = function (a, b){
    return _setInterval(a, b == 1000 ? 600 : b);
};

/*var _c = 0;
_setInterval(() => {
    _c || console.log(document.querySelectorAll('.skip-btn.show')) || [].forEach.call(document.querySelectorAll('.skip-btn.show'), x => { console.log(x, x.click); x.click(); _c = 1; });
}, 500);*/

document.__defineGetter__('hidden', () => false);
document.__defineGetter__('mozHidden', () => false);
document.__defineGetter__('webkitHidden', () => false);

document.body.appendChild(document.createElement('style')).innerHTML = `
iframe, #footer, .advert, .skip-advert, .skip-logo { display: none !important }
#skip-top-bar { height: 100%; z-index: 1000 }
#timer { display: block; top:10%; left:50%; width: 200px; margin-left: -100px; color: black; font-weight: 400; }
#skip_button { top:10%; left:50%; width: 200px; margin-left: -100px; float: none; position: absolute; z-index:100; background: #57f; color: white; }
.skip-add .skip-top-bar .skip-add-container .skip-btn:after{ border-left-color: white; }
.skip-add .skip-top-bar .skip-add-container { background: white; z-index: 1000; position: fixed; height: auto; top:0;left:0;right:0;bottom:0; }`;

new MutationObserver(() => {
	[].forEach.call(document.querySelectorAll('iframe, #footer, .skip-advert'), x => x.parentNode.removeChild(x));
}).observe(document.body, {
	childList: true
});