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

19 lines
343 B
TypeScript
Raw Normal View History

2018-02-20 11:53:34 -06:00
declare const fuckAdBlock: any;
export default ($root: any) => {
require('fuckadblock');
2018-02-20 11:53:34 -06:00
function adBlockDetected() {
2018-11-14 01:30:58 -06:00
$root.alert({
2018-11-11 04:15:08 -06:00
title: $root.$t('@.adblock.detected'),
2018-11-14 01:30:58 -06:00
text: $root.$t('@.adblock.warning')
2018-02-20 11:53:34 -06:00
});
}
if (fuckAdBlock === undefined) {
adBlockDetected();
} else {
fuckAdBlock.onDetected(adBlockDetected);
}
};