MediaWiki:Gadget-dark-mode-toggle.js
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
if (!mw.messages.get('darkmode-turn-on-label')) {
mw.messages.set({
'darkmode-turn-on-label': '黑暗模式',
'darkmode-turn-on-tooltip': '开启黑暗模式',
'darkmode-turn-off-label': '明亮模式',
'darkmode-turn-off-tooltip': '关闭黑暗模式',
});
}
mw.loader.load( 'https://en.wikipedia.org/w/load.php?modules=ext.gadget.dark-mode-toggle&only=scripts' );