Site Notice

hello, world

Difference between revisions of "User:机智的小鱼君/common.js"

From Project-EPB Commons
m ([InPageEdit] 没有编辑摘要)
m ([InPageEdit] 没有编辑摘要)
Line 21: Line 21:
 
   );
 
   );
 
});
 
});
$('#firstHeading').append('<span style="font-size:10px">'+mw.config.get('wgRevisionId')+'</span>');
+
$('#firstHeading').append('<span style="font-size:10px;float:right">RevisionId: '+mw.config.get('wgRevisionId')+'</span>');

Revision as of 21:40, 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')
          });
        })
      )
    )
  );
});
$('#firstHeading').append('<span style="font-size:10px;float:right">RevisionId: '+mw.config.get('wgRevisionId')+'</span>');