MediaWiki:Gadget-VisualEditorFixed.js
跳到导航
跳到搜索
注意:这类代码页面在保存之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
- 按住
CTRL+SHIFT+DEL 或 ⌘-Shift-R
来清除缓存! - 或尝试在地址栏的地址最后添加代码
?_=1
来访问最新页面。 - 你还可以在设置中勾选小工具在页面右上角添加清除缓存按钮!
if (mw.config.get('wgUserGroups').indexOf('autoconfirmed') != 1 ) {
mw.hook('ve.activationComplete').add(function () {
document.querySelector(".oo-ui-toolbar-actions > .oo-ui-buttonElement").innerHTML = '<input type="button" value="预览一次后提交" class="oo-ui-buttonElement-button mw-ui-destructive" >';
document.querySelector(".oo-ui-toolbar-actions > .oo-ui-buttonElement").onclick = function(){
mw.notify('您是新用户,必须前往源代码页观看确认您刚才进行的改动,并输入正确的验证码后才能提交编辑!')
document.getElementById("ca-edit").click();
}
});
}