wip
This commit is contained in:
@@ -16,6 +16,38 @@ declare const _API_URL_: string;
|
||||
declare const _SW_PUBLICKEY_: string;
|
||||
//#endregion
|
||||
|
||||
export type API = {
|
||||
chooseDriveFile: (opts: {
|
||||
title?: string;
|
||||
currentFolder?: any;
|
||||
multiple?: boolean;
|
||||
}) => Promise<any>;
|
||||
|
||||
chooseDriveFolder: (opts: {
|
||||
title?: string;
|
||||
currentFolder?: any;
|
||||
}) => Promise<any>;
|
||||
|
||||
dialog: (opts: {
|
||||
title: string;
|
||||
text: string;
|
||||
actions: Array<{
|
||||
text: string;
|
||||
id?: string;
|
||||
}>;
|
||||
}) => Promise<string>;
|
||||
|
||||
input: (opts: {
|
||||
title: string;
|
||||
placeholder?: string;
|
||||
default?: string;
|
||||
}) => Promise<string>;
|
||||
|
||||
post: () => void;
|
||||
|
||||
notify: (message: string) => void;
|
||||
};
|
||||
|
||||
/**
|
||||
* Misskey Operating System
|
||||
*/
|
||||
@@ -49,6 +81,8 @@ export default class MiOS extends EventEmitter {
|
||||
return localStorage.getItem('debug') == 'true';
|
||||
}
|
||||
|
||||
public apis: API;
|
||||
|
||||
/**
|
||||
* A connection manager of home stream
|
||||
*/
|
||||
|
||||
21
src/web/app/common/scripts/fuck-ad-block.ts
Normal file
21
src/web/app/common/scripts/fuck-ad-block.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
require('fuckadblock');
|
||||
|
||||
declare const fuckAdBlock: any;
|
||||
|
||||
export default (os) => {
|
||||
function adBlockDetected() {
|
||||
os.apis.dialog({
|
||||
title: '%fa:exclamation-triangle%広告ブロッカーを無効にしてください',
|
||||
text: '<strong>Misskeyは広告を掲載していません</strong>が、広告をブロックする機能が有効だと一部の機能が利用できなかったり、不具合が発生する場合があります。',
|
||||
actins: [{
|
||||
text: 'OK'
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
if (fuckAdBlock === undefined) {
|
||||
adBlockDetected();
|
||||
} else {
|
||||
fuckAdBlock.onDetected(adBlockDetected);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user