mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 16:53:10 +02:00
✌️
This commit is contained in:
parent
a5ece57e3d
commit
4c955557bf
3 changed files with 19 additions and 20 deletions
|
@ -8,7 +8,7 @@ const riot = require('riot');
|
|||
const boot = require('../boot');
|
||||
const mixins = require('./mixins.ls');
|
||||
const route = require('./router');
|
||||
const fuckAdBlock = require('./scripts/fuck-ad-block.ls');
|
||||
const fuckAdBlock = require('./scripts/fuck-ad-block');
|
||||
|
||||
/**
|
||||
* Boot
|
||||
|
|
18
src/web/app/desktop/scripts/fuck-ad-block.js
Normal file
18
src/web/app/desktop/scripts/fuck-ad-block.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
require('fuckadblock');
|
||||
const dialog = require('./dialog');
|
||||
|
||||
module.exports = () => {
|
||||
if (fuckAdBlock === undefined) {
|
||||
adBlockDetected();
|
||||
} else {
|
||||
fuckAdBlock.onDetected(adBlockDetected);
|
||||
}
|
||||
};
|
||||
|
||||
function adBlockDetected() {
|
||||
dialog('<i class="fa fa-exclamation-triangle"></i>広告ブロッカーを無効にしてください',
|
||||
'<strong>Misskeyは広告を掲載していません</strong>が、広告をブロックする機能が有効だと一部の機能が利用できなかったり、不具合が発生する場合があります。',
|
||||
[{
|
||||
text: 'OK'
|
||||
}]);
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
# FUCK AD BLOCK
|
||||
#================================
|
||||
|
||||
require \fuckadblock
|
||||
dialog = require './dialog.ls'
|
||||
|
||||
module.exports = ~>
|
||||
if fuck-ad-block == undefined
|
||||
ad-block-detected!
|
||||
else
|
||||
fuck-ad-block.on-detected ad-block-detected
|
||||
|
||||
function ad-block-detected
|
||||
dialog do
|
||||
'<i class="fa fa-exclamation-triangle"></i>広告ブロッカーを無効にしてください'
|
||||
'<strong>Misskeyは広告を掲載していません</strong>が、広告をブロックする機能が有効だと一部の機能が利用できなかったり、不具合が発生する場合があります。'
|
||||
[
|
||||
text: \OK
|
||||
]
|
Loading…
Reference in a new issue