Site Notice
hello, world
Difference between revisions of "User:机智的小鱼君/common.js"
From Project-EPB Commons
(Replaced content with "mw.loader.load('https://common.wjghj.cn/js/InPageEdit-canary');") Tag: Replaced |
([InPageEdit] 没有编辑摘要) |
||
Line 1: | Line 1: | ||
mw.loader.load('https://common.wjghj.cn/js/InPageEdit-canary'); | mw.loader.load('https://common.wjghj.cn/js/InPageEdit-canary'); | ||
+ | $(function(){ | ||
+ | $('#ca-view').after( | ||
+ | $('<li>',{ | ||
+ | id:'ca-quick-edit', | ||
+ | class:'collapsible' | ||
+ | }).append( | ||
+ | $('<span>').append( | ||
+ | $('<a>',{ | ||
+ | href: 'javascript:void(0)' | ||
+ | }) | ||
+ | .text('快速编辑') | ||
+ | .click(function(){ | ||
+ | InPageEdit.edit({ | ||
+ | page: mw.config.get('wgPageName'), | ||
+ | revision: mw.config.get('wgRevisionId') | ||
+ | }); | ||
+ | }) | ||
+ | ) | ||
+ | ) | ||
+ | ); | ||
+ | }); |
Revision as of 11:17, 23 November 2019
mw.loader.load('https://common.wjghj.cn/js/InPageEdit-canary');
$(function(){
$('#ca-view').after(
$('<li>',{
id:'ca-quick-edit',
class:'collapsible'
}).append(
$('<span>').append(
$('<a>',{
href: 'javascript:void(0)'
})
.text('快速编辑')
.click(function(){
InPageEdit.edit({
page: mw.config.get('wgPageName'),
revision: mw.config.get('wgRevisionId')
});
})
)
)
);
});