MediaWiki:Common.js:修订间差异

添加818字节 、​ 2022年8月27日 (星期六)
无编辑摘要
无编辑摘要
无编辑摘要
第132行: 第132行:
     // 导入OOUI库
     // 导入OOUI库
     mw.loader.using(['oojs-ui-core', 'oojs-ui-windows']);
     mw.loader.using(['oojs-ui-core', 'oojs-ui-windows']);
    if (categories.indexOf('敏感内容') !== -1) {
if (!$('body').hasClass('mcbbswiki-user-online')) {
var messageDialog = new OO.ui.MessageDialog();
var windowManager = new OO.ui.WindowManager();
$('body').append(windowManager.$element);
windowManager.addWindows([messageDialog]);
windowManager.openWindow(messageDialog, {
title: '敏感内容警告',
message: '该页面包含敏感内容,可能不受某些人欢迎。MCBBS Wiki 仅记录此类现象,不代表对条目中描述的内容或行为表示支持。如果您并非特别需要,我们不建议您阅读此页面,可能会破坏您今天的美好心情。编辑者须以中立、客观、慎重为要编写内容,MCBBS Wiki 不支持编辑者贸然写入偏激内容、进行编辑战甚至破坏。',
size: 'large',
actions: [
{
action: 'ok',
label: '确认',
flags: 'primary'
}
]
});
}
    }
     // --------------------------------
     // --------------------------------
     // ------------ 分割线 ------------
     // ------------ 分割线 ------------
第193行: 第213行:
     console.time(prefix + 'CommonJS加载完毕');
     console.time(prefix + 'CommonJS加载完毕');
     main();
     main();
    if (jQuery) {
        console.log("jQuery已加载!")
    } else {
        console.log("jQuery未加载!")
    }
     // 计时完毕
     // 计时完毕
     console.timeEnd(prefix + 'CommonJS加载完毕');
     console.timeEnd(prefix + 'CommonJS加载完毕');
})();
})();