2023年政策修订增补工作正在进行中,欢迎参与!
User:GuoPC/common.js
跳转到导航
跳转到搜索
注意:在保存之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
- Firefox/Safari:按住“Shift”的同时单击“刷新”,或按“Ctrl-F5”或“Ctrl-R”(Mac为“⌘-R”)
- Google Chrome:按“Ctrl-Shift-R”(Mac为“⌘-Shift-R”)
- Internet Explorer:按住“Ctrl”的同时单击“刷新”,或按“Ctrl-F5”
- Opera:在“工具→首选项”中清除缓存
- 如果您已登录但该页面出现未登录状态,请尝试在地址栏的地址最后添加代码
?_=1
来访问最新页面。 - 添加代码后的本页地址如下:
-{R|https://moegirl.icu/User:GuoPC/common.js?_=1}-
// 监视列表时段选项自定义
if (mw.config.get('wgCanonicalSpecialPageName') == 'Watchlist') {
var days = ['1', '3', '7', '14', '30'];
var limits = ['50', '100', '250', '500'];
var dayLinks = '';
var limitLinks = '';
for (var i = 0; i < days.length; i++) {
dayLinks += '<a href="/index.php?title=Special:%E7%9B%91%E8%A7%86%E5%88%97%E8%A1%A8&days=' + days[i] + '&from=" title="Special:监视列表" data-params="{"days":' + days[i] + ',"from":""}" data-keys="days,from">' + days[i] + '</a>';
dayLinks += i == days.length - 1 ? '天的最后' : ' | ';
}
for (var j = 0; j < limits.length; j++) {
limitLinks += '<a href="/index.php?title=Special:%E7%9B%91%E8%A7%86%E5%88%97%E8%A1%A8&limit=' + limits[j] + '" title="Special:监视列表" data-params="{"limit":' + limits[j] + '}" data-keys="limit">' + limits[j] + '</a>';
limitLinks += j == limits.length - 1 ? '个更改' : ' | ';
}
$('.wlinfo').after('<br><span class="wllinks">显示过去' + dayLinks + limitLinks + '</span>');
$('.cldays.cloption').hide();
}
// No lang="zh" for translation in LyricsKai
if ($('.Lyrics-translated > span').attr('lang') == 'zh') {
$('.Lyrics-translated > span').removeAttr('lang');
}
$('.Lyrics-column-zh > span').removeAttr('lang');
// Decode free links
if ($('a.free').length > 0) {
$('a.free').each(function() {
var text = $(this).text();
var decodedText = decodeURIComponent(text);
if (decodedText == text) {
return;
} else {
$(this).addClass('decoded');
$(this).text(decodedText);
}
});
}
// Popups小工具
window.popupStructure = 'menus';
window.popupShortcutKeys = true;
window.popupFixRedirs = true;
window.popupFixDabs = true;
window.popupRedlinkRemoval = true;
window.popupThumbAction = "sizetoggle";
window.popupCategoryMembers = false;
// 未巡查
if ($.inArray(mw.config.get('wgCanonicalSpecialPageName'), ['Watchlist', 'Recentchanges', 'Recentchangeslinked']) >= 0) {
$('.unpatrolled').each(function() {
$(this).text("喵");
});
}
// mwPanel
mw.loader.load('/index.php?title=User:AnnAngela/js/mwPanel.js&action=raw&ctype=text/javascript');
// watchlist-toggle
mw.loader.load('/index.php?title=User:AnnAngela/js/watchlist-toggle.js&action=raw&ctype=text/javascript');
// upload-log-toggle
mw.loader.load('/index.php?title=User:AnnAngela/js/upload-log-toggle.js&action=raw&ctype=text/javascript');
// watchlist-log
mw.loader.load('/index.php?title=User:AnnAngela/js/watchlist-log.js&action=raw&ctype=text/javascript');
// OneKeyPurge
mw.loader.load('/index.php?title=User:BearBin/js/OneKeyPurge.js&action=raw&ctype=text/javascript');
// code-prettify
mw.loader.load('https://cdn.jsdelivr.net/gh/bhsd-harry/[email protected]/otherwiki/gadget-code-prettify.min.js');
mw.loader.load('https://cdn.jsdelivr.net/gh/bhsd-harry/[email protected]/otherwiki/gadget-code-prettify.min.css', 'text/css');
// PreLangMark
mw.loader.load('/index.php?title=User:Bhsd/js/PreLangMark.js&action=raw&ctype=text/javascript');
// Wikiplus-replace
mw.loader.load('/index.php?title=User:東東君/js/Wikiplus-replace.js&action=raw&ctype=text/javascript');
// sortableTableAnimation
mw.loader.load('/index.php?title=User:鬼影233/sortableTableAnimation.js&action=raw&ctype=text/javascript');
// disambigHelper
mw.loader.load('/index.php?title=User:Iehcni/js/disambigHelper.js&action=raw&ctype=text/javascript');
// Wordcount
mw.loader.load('/index.php?title=User:星海子/js/Wordcount.js&action=raw&ctype=text/javascript');
// BgInfo
mw.loader.load('/index.php?title=User:GuoPC/js/BgInfo.js&action=raw&ctype=text/javascript');
// MouseRippleToggle
mw.loader.load('/index.php?title=User:GuoPC/js/MouseRippleToggle.js&action=raw&ctype=text/javascript');
// TSIndicator
mw.loader.load('/index.php?title=User:GuoPC/js/TSIndicator.js&action=raw&ctype=text/javascript');
// ULCount
mw.loader.load('/index.php?title=User:GuoPC/js/ULCount.js&action=raw&ctype=text/javascript');
// WatchlistNoRed
mw.loader.load('/index.php?title=User:GuoPC/js/WatchlistNoRed.js&action=raw&ctype=text/javascript');
// Yaku Han JP
mw.loader.load('https://cdn.jsdelivr.net/npm/[email protected]/dist/css/yakuhanjp.min.css', 'text/css');
mw.loader.load('https://cdn.jsdelivr.net/npm/[email protected]/dist/css/yakuhanmp.min.css', 'text/css');
mw.loader.load('https://cdn.jsdelivr.net/npm/[email protected]/dist/css/yakuhanrp.min.css', 'text/css');