User:A2569875/common.js
外观
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
//藍桌圖書館
importScript("user:bluedeck/serve/blib-inverse.js"); /* 藍桌圖書館獲取源碼 */
importScript("User:A2569875-sandbox/blib-preview.js"); /* 藍桌圖書館預覽 */
importScript("User:Bluedeck/serve/blib-link.js"); /*藍桌圖書館快線*/
//測試User:小躍的函式
importScript('User:小躍/Text-animated.js');
importScript('User:A2569875-sandbox/js沙盒.js');
importScript('User:A2569875/Tools/PreviewWithVariant.js');
//mw.loader.load('https://commons.wikimedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions.js&action=raw&ctype=text/javascript');
importScript('User:A2569875/JSONCAT.js');
importScript('User:A2569875/圖表沙盒.js');
importScript( 'User:燃灯/NAC_Display.js' );
$.cookie('dismissASN', 0, {
expires: 30,
path: '/',
secure: false
});
mw.loader.load('https://zh.wikipedia.org/w/index.php?title=User:A2569875/AutoDesktop.js&action=raw&ctype=text/javascript');
mw.loader.load('//zh.wikipedia.org/w/index.php?title=User:Vozhuo/Tool/MOSNUM dates.js&action=raw&ctype=text/javascript');
mw.hook( 've.activationComplete' ).add( function ( $content ) {
//
} );
/*$('body').one('click', '.oo-ui-buttonElement-button', function () {
alert( 'active' );
});*/
if($(".toc").length > 0){
var $tocFloatLink = $(mw.util.addPortletLink('p-tb','#', "目錄懸浮", 't-tocfloat',"目錄懸浮"));
$tocFloatLink.click(function (e) {
e.preventDefault();
if($(".toc").hasClass("floating-toc")){
$(".toc")
.css("position", "relative")
.css("top", "auto")
.css("left", "auto")
.css("height", "auto")
.css("display", "table")
.css("overflow", "auto")
.removeClass("floating-toc");
}else{
$(".toc")
.css("position", "fixed")
.css("top", "20vh")
.css("left", "50px")
.css("height", "70vh")
.css("display", "block")
.css("overflow", "scroll")
.addClass("floating-toc");
}
});
}
var ua = navigator.userAgent.toLowerCase();
var isMobile = ua.indexOf("mobile") > -1;
if(!isMobile){//手機版不使用的腳本
//mw.loader.load('https://zh.wikipedia.org/w/index.php?title=User:A2569875/svg沙盒.js&action=raw&ctype=text/javascript');
//importScript('User:A2569875/svg沙盒.js');
}
$(function() {
$pt_sandbox = $('#pt-sandbox');
$pt_sandbox_link = $("<span></span>").append($pt_sandbox.find('a')
.attr("href", "/wiki/" + encodeURIComponent("Special:MyPage/沙盒"))
.css("display", "inline")
).append(' ').append($('<a>', {
href: '/w/index.php?title=' + encodeURIComponent('WP:沙盒') + '&action=edit',
title: '編輯公用沙盒'
}).html('公用').css("display", "inline")).append(' ').append($('<a>', {
href: '/w/index.php?title=' + encodeURIComponent('WP:沙盒') + '&veaction=edit',
title: '視覺化編輯公用沙盒'
}).html('視覺').css("display", "inline")
)
.css("display", "flex");
$pt_sandbox.append($pt_sandbox_link);
});