//https://meta.wikimedia.org/wiki/MediaWiki:Gadget-CurIDLink.js $(function(){ var curid = mw.config.get('wgArticleId'); if (curid !== 0){ var url = mw.config.get('wgServer') + '?curid=' + curid; mw.util.addPortletLink('p-tb', url, '短链接', 't-curlink', '该页面链接以页面ID显示'); } })