User:Irukaza/common.js:修订间差异
跳到导航
跳到搜索
imported>=海豚= 无编辑摘要 |
imported>=海豚= ([InPageEdit] 没有编辑摘要 (编辑自Special:Diff/38450)) |
||
(未显示同一用户的1个中间版本) | |||
第9行: | 第9行: | ||
try { | try { | ||
var link = new mw.Uri(this.href); | var link = new mw.Uri(this.href); | ||
if (link.host !== ' | if (link.host !== 'commons.moegirl.org') return; | ||
if (/^\/api\.php/i.test(link.path)) return; | if (/^\/api\.php/i.test(link.path)) return; | ||
if (!link.query.title && /\.php$/i.test(link.path)) return; | if (!link.query.title && /\.php$/i.test(link.path)) return; |
2020年4月9日 (四) 08:53的版本
//Explanations for this javaScript code in http://zh.moegirl.org/User:AnnAngela/js
(function(mw) {
mw.loader.implement('AnnToolsPersonalLabel', function($, jQuery) {
$('#pt-watchlist').after('<li id="pt-backlog"><a href="//www.hmoegirl.com/分类:积压工作">积压工作</a></li><li id="pt-sandbox"><a href="//www.hmoegirl.com/User:=海豚=/沙盒">我的沙盒</a></li>');
});
})(mediaWiki);
$('#mw-content-text a').each(function() {
try {
var link = new mw.Uri(this.href);
if (link.host !== 'commons.moegirl.org') return;
if (/^\/api\.php/i.test(link.path)) return;
if (!link.query.title && /\.php$/i.test(link.path)) return;
if (link.query && (link.query.action || link.query.diff)) return;
var href = ((link.query.title || decodeURI(link.path.substring(1))).match(/^user:[^\/]+|^user[ _]talk:[^\/]+/i) || [null])[0];
if (href) $(this).after('<sub>[<a target="_blank" title="主站上的用户 ' + href.replace(/user(_talk)?\:/i, '') + '" href="https://zh.moegirl.org/' + href + '">主</a>]</sub>');
} catch (e) {
return;
}
});