mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-23 17:29:05 +01:00
✌️
This commit is contained in:
parent
77d5720dc5
commit
3aff8179c5
@ -8,7 +8,7 @@ const riot = require('riot');
|
|||||||
const boot = require('../boot');
|
const boot = require('../boot');
|
||||||
const mixins = require('./mixins.ls');
|
const mixins = require('./mixins.ls');
|
||||||
const route = require('./router');
|
const route = require('./router');
|
||||||
const fuckAdBlock = require('./scripts/fuck-ad-block.ls');
|
const fuckAdBlock = require('./scripts/fuck-ad-block');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Boot
|
* 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 New Issue
Block a user