misskey/src/client/app/common/scripts/fuck-ad-block.ts
2018-11-14 16:30:58 +09:00

19 lines
343 B
TypeScript

declare const fuckAdBlock: any;
export default ($root: any) => {
require('fuckadblock');
function adBlockDetected() {
$root.alert({
title: $root.$t('@.adblock.detected'),
text: $root.$t('@.adblock.warning')
});
}
if (fuckAdBlock === undefined) {
adBlockDetected();
} else {
fuckAdBlock.onDetected(adBlockDetected);
}
};