Sharkey/src/client/app/common/scripts/fuck-ad-block.ts

22 lines
410 B
TypeScript
Raw Normal View History

2018-02-20 19:53:34 +02:00
declare const fuckAdBlock: any;
export default ($root: any) => {
require('fuckadblock');
2018-02-20 19:53:34 +02:00
function adBlockDetected() {
$root.$dialog({
2018-08-02 13:03:31 +03:00
title: '%fa:exclamation-triangle%%i18n:common.adblock.detected%',
text: '%i18n:common.adblock.warning%',
2018-02-20 19:53:34 +02:00
actins: [{
text: 'OK'
}]
});
}
if (fuckAdBlock === undefined) {
adBlockDetected();
} else {
fuckAdBlock.onDetected(adBlockDetected);
}
};