Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fbcbf628e | ||
|
|
4a467e3ced | ||
|
|
c386dfb481 | ||
|
|
b1946441c3 | ||
|
|
502cc74fa5 | ||
|
|
e1b133b74d | ||
|
|
bd37751df1 | ||
|
|
ceea9bc889 | ||
|
|
91ad144bb5 | ||
|
|
4beda5872d | ||
|
|
adf484f165 | ||
|
|
b35f5befe8 | ||
|
|
193e5ede30 | ||
|
|
00122e9bc1 | ||
|
|
fc5c37373c | ||
|
|
b7e6d32dab | ||
|
|
1d2edaa85d | ||
|
|
b925491449 | ||
|
|
9ee3e19814 | ||
|
|
b8675f53aa | ||
|
|
99d2abb69e | ||
|
|
0b76394671 | ||
|
|
c919666a09 | ||
|
|
07c6b21631 |
0
about.html
Normal file
0
about.html
Normal file
@@ -2,6 +2,7 @@ body {
|
||||
background-color: rgb(100, 100, 100);
|
||||
color: chartreuse;
|
||||
font-family: monospace;
|
||||
|
||||
}
|
||||
|
||||
.header {
|
||||
@@ -59,3 +60,10 @@ a.github {
|
||||
padding: 2px 1px 0;
|
||||
color:#0ed1f8;
|
||||
}
|
||||
|
||||
.license_S {
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
padding: 2px 1px 0;
|
||||
color:chartreuse;
|
||||
}
|
||||
15
index.html
15
index.html
@@ -59,6 +59,7 @@
|
||||
<footer class="text-center" style="padding-top: 35px; padding-bottom: 15px; padding-left: 10%; padding-right: 10%;">
|
||||
<p class="card" style="background-color: inherit; padding-top: 15px; padding-bottom: 15px; padding-left: 25px; padding-right: 25px; --bs-card-border-color: chartreuse;">Все права защищены и принадлежат поням.</p>
|
||||
<div class="card text-center" style="background-color: inherit; padding-top: 15px; padding-bottom: 15px; padding-left: 25px; padding-right: 25px; --bs-card-border-color: chartreuse; "><a href="https://github.com/DarkShyMW/darkshy.bronyfurry.com" class="github" rel="follow">Source code at GitHub</a></div>
|
||||
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Лицензия Creative Commons" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><p class="card text-center" style="background-color: inherit; padding-top: 15px; padding-bottom: 15px; padding-left: 25px; padding-right: 25px; --bs-card-border-color: chartreuse; ">Это произведение доступно по <a rel="license" class="license_S" href="http://creativecommons.org/licenses/by-sa/4.0/">лицензии Creative Commons «Attribution-ShareAlike» («Атрибуция-СохранениеУсловий») 4.0 Всемирная.</p></a>
|
||||
</footer>
|
||||
</body>
|
||||
<script async>
|
||||
@@ -88,4 +89,18 @@
|
||||
</script>
|
||||
<noscript><div><img src="https://mc.yandex.ru/watch/80486719" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
|
||||
<!-- /Yandex.Metrika counter -->
|
||||
|
||||
<!-- AD BLOCK NEED FOR WE CAN WORKS -->
|
||||
<!-- Yandex.RTB -->
|
||||
<script>window.yaContextCb=window.yaContextCb||[]</script>
|
||||
<script src="https://yandex.ru/ads/system/context.js" async></script>
|
||||
<!-- Yandex.RTB R-A-1591105-2 -->
|
||||
<script>window.yaContextCb.push(()=>{
|
||||
Ya.Context.AdvManager.render({
|
||||
type: 'fullscreen',
|
||||
platform: 'touch',
|
||||
blockId: 'R-A-1591105-2'
|
||||
})
|
||||
})</script>
|
||||
<!-- AD BLOCK NEED FOR WE CAN WORKS -->
|
||||
</html>
|
||||
250
js/fuckbad.js
Normal file
250
js/fuckbad.js
Normal file
@@ -0,0 +1,250 @@
|
||||
/*
|
||||
* FuckAdBlock 3.2.1
|
||||
* Copyright (c) 2015 Valentin Allaire <valentin.allaire@sitexw.fr>
|
||||
* Released under the MIT license
|
||||
* https://github.com/sitexw/FuckAdBlock
|
||||
*/
|
||||
|
||||
(function(window) {
|
||||
var FuckAdBlock = function(options) {
|
||||
this._options = {
|
||||
checkOnLoad: false,
|
||||
resetOnEnd: false,
|
||||
loopCheckTime: 50,
|
||||
loopMaxNumber: 5,
|
||||
baitClass: 'pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text-ads text-ad-links',
|
||||
baitStyle: 'width: 1px !important; height: 1px !important; position: absolute !important; left: -10000px !important; top: -1000px !important;',
|
||||
debug: false
|
||||
};
|
||||
this._var = {
|
||||
version: '3.2.1',
|
||||
bait: null,
|
||||
checking: false,
|
||||
loop: null,
|
||||
loopNumber: 0,
|
||||
event: { detected: [], notDetected: [] }
|
||||
};
|
||||
if(options !== undefined) {
|
||||
this.setOption(options);
|
||||
}
|
||||
var self = this;
|
||||
var eventCallback = function() {
|
||||
setTimeout(function() {
|
||||
if(self._options.checkOnLoad === true) {
|
||||
if(self._options.debug === true) {
|
||||
self._log('onload->eventCallback', 'A check loading is launched');
|
||||
}
|
||||
if(self._var.bait === null) {
|
||||
self._creatBait();
|
||||
}
|
||||
setTimeout(function() {
|
||||
self.check();
|
||||
}, 1);
|
||||
}
|
||||
}, 1);
|
||||
};
|
||||
if(window.addEventListener !== undefined) {
|
||||
window.addEventListener('load', eventCallback, false);
|
||||
} else {
|
||||
window.attachEvent('onload', eventCallback);
|
||||
}
|
||||
};
|
||||
FuckAdBlock.prototype._options = null;
|
||||
FuckAdBlock.prototype._var = null;
|
||||
FuckAdBlock.prototype._bait = null;
|
||||
|
||||
FuckAdBlock.prototype._log = function(method, message) {
|
||||
console.log('[FuckAdBlock]['+method+'] '+message);
|
||||
};
|
||||
|
||||
FuckAdBlock.prototype.setOption = function(options, value) {
|
||||
if(value !== undefined) {
|
||||
var key = options;
|
||||
options = {};
|
||||
options[key] = value;
|
||||
}
|
||||
for(var option in options) {
|
||||
this._options[option] = options[option];
|
||||
if(this._options.debug === true) {
|
||||
this._log('setOption', 'The option "'+option+'" he was assigned to "'+options[option]+'"');
|
||||
}
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
FuckAdBlock.prototype._creatBait = function() {
|
||||
var bait = document.createElement('div');
|
||||
bait.setAttribute('class', this._options.baitClass);
|
||||
bait.setAttribute('style', this._options.baitStyle);
|
||||
this._var.bait = window.document.body.appendChild(bait);
|
||||
|
||||
this._var.bait.offsetParent;
|
||||
this._var.bait.offsetHeight;
|
||||
this._var.bait.offsetLeft;
|
||||
this._var.bait.offsetTop;
|
||||
this._var.bait.offsetWidth;
|
||||
this._var.bait.clientHeight;
|
||||
this._var.bait.clientWidth;
|
||||
|
||||
if(this._options.debug === true) {
|
||||
this._log('_creatBait', 'Bait has been created');
|
||||
}
|
||||
};
|
||||
FuckAdBlock.prototype._destroyBait = function() {
|
||||
window.document.body.removeChild(this._var.bait);
|
||||
this._var.bait = null;
|
||||
|
||||
if(this._options.debug === true) {
|
||||
this._log('_destroyBait', 'Bait has been removed');
|
||||
}
|
||||
};
|
||||
|
||||
FuckAdBlock.prototype.check = function(loop) {
|
||||
if(loop === undefined) {
|
||||
loop = true;
|
||||
}
|
||||
|
||||
if(this._options.debug === true) {
|
||||
this._log('check', 'An audit was requested '+(loop===true?'with a':'without')+' loop');
|
||||
}
|
||||
|
||||
if(this._var.checking === true) {
|
||||
if(this._options.debug === true) {
|
||||
this._log('check', 'A check was canceled because there is already an ongoing');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
this._var.checking = true;
|
||||
|
||||
if(this._var.bait === null) {
|
||||
this._creatBait();
|
||||
}
|
||||
|
||||
var self = this;
|
||||
this._var.loopNumber = 0;
|
||||
if(loop === true) {
|
||||
this._var.loop = setInterval(function() {
|
||||
self._checkBait(loop);
|
||||
}, this._options.loopCheckTime);
|
||||
}
|
||||
setTimeout(function() {
|
||||
self._checkBait(loop);
|
||||
}, 1);
|
||||
if(this._options.debug === true) {
|
||||
this._log('check', 'A check is in progress ...');
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
FuckAdBlock.prototype._checkBait = function(loop) {
|
||||
var detected = false;
|
||||
|
||||
if(this._var.bait === null) {
|
||||
this._creatBait();
|
||||
}
|
||||
|
||||
if(window.document.body.getAttribute('abp') !== null
|
||||
|| this._var.bait.offsetParent === null
|
||||
|| this._var.bait.offsetHeight == 0
|
||||
|| this._var.bait.offsetLeft == 0
|
||||
|| this._var.bait.offsetTop == 0
|
||||
|| this._var.bait.offsetWidth == 0
|
||||
|| this._var.bait.clientHeight == 0
|
||||
|| this._var.bait.clientWidth == 0) {
|
||||
detected = true;
|
||||
}
|
||||
if(window.getComputedStyle !== undefined) {
|
||||
var baitTemp = window.getComputedStyle(this._var.bait, null);
|
||||
if(baitTemp && (baitTemp.getPropertyValue('display') == 'none' || baitTemp.getPropertyValue('visibility') == 'hidden')) {
|
||||
detected = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(this._options.debug === true) {
|
||||
this._log('_checkBait', 'A check ('+(this._var.loopNumber+1)+'/'+this._options.loopMaxNumber+' ~'+(1+this._var.loopNumber*this._options.loopCheckTime)+'ms) was conducted and detection is '+(detected===true?'positive':'negative'));
|
||||
}
|
||||
|
||||
if(loop === true) {
|
||||
this._var.loopNumber++;
|
||||
if(this._var.loopNumber >= this._options.loopMaxNumber) {
|
||||
this._stopLoop();
|
||||
}
|
||||
}
|
||||
|
||||
if(detected === true) {
|
||||
this._stopLoop();
|
||||
this._destroyBait();
|
||||
this.emitEvent(true);
|
||||
if(loop === true) {
|
||||
this._var.checking = false;
|
||||
}
|
||||
} else if(this._var.loop === null || loop === false) {
|
||||
this._destroyBait();
|
||||
this.emitEvent(false);
|
||||
if(loop === true) {
|
||||
this._var.checking = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
FuckAdBlock.prototype._stopLoop = function(detected) {
|
||||
clearInterval(this._var.loop);
|
||||
this._var.loop = null;
|
||||
this._var.loopNumber = 0;
|
||||
|
||||
if(this._options.debug === true) {
|
||||
this._log('_stopLoop', 'A loop has been stopped');
|
||||
}
|
||||
};
|
||||
|
||||
FuckAdBlock.prototype.emitEvent = function(detected) {
|
||||
if(this._options.debug === true) {
|
||||
this._log('emitEvent', 'An event with a '+(detected===true?'positive':'negative')+' detection was called');
|
||||
}
|
||||
|
||||
var fns = this._var.event[(detected===true?'detected':'notDetected')];
|
||||
for(var i in fns) {
|
||||
if(this._options.debug === true) {
|
||||
this._log('emitEvent', 'Call function '+(parseInt(i)+1)+'/'+fns.length);
|
||||
}
|
||||
if(fns.hasOwnProperty(i)) {
|
||||
fns[i]();
|
||||
}
|
||||
}
|
||||
if(this._options.resetOnEnd === true) {
|
||||
this.clearEvent();
|
||||
}
|
||||
return this;
|
||||
};
|
||||
FuckAdBlock.prototype.clearEvent = function() {
|
||||
this._var.event.detected = [];
|
||||
this._var.event.notDetected = [];
|
||||
|
||||
if(this._options.debug === true) {
|
||||
this._log('clearEvent', 'The event list has been cleared');
|
||||
}
|
||||
};
|
||||
|
||||
FuckAdBlock.prototype.on = function(detected, fn) {
|
||||
this._var.event[(detected===true?'detected':'notDetected')].push(fn);
|
||||
if(this._options.debug === true) {
|
||||
this._log('on', 'A type of event "'+(detected===true?'detected':'notDetected')+'" was added');
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
FuckAdBlock.prototype.onDetected = function(fn) {
|
||||
return this.on(true, fn);
|
||||
};
|
||||
FuckAdBlock.prototype.onNotDetected = function(fn) {
|
||||
return this.on(false, fn);
|
||||
};
|
||||
|
||||
window.FuckAdBlock = FuckAdBlock;
|
||||
|
||||
if(window.fuckAdBlock === undefined) {
|
||||
window.fuckAdBlock = new FuckAdBlock({
|
||||
checkOnLoad: true,
|
||||
resetOnEnd: true
|
||||
});
|
||||
}
|
||||
})(window);
|
||||
@@ -1,6 +1,6 @@
|
||||
// This is the "Offline copy of pages" service worker
|
||||
|
||||
const CACHE = "darkshy-offline";
|
||||
const CACHE = "new_darkshy_cache";
|
||||
|
||||
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user