求真百科歡迎當事人提供第一手真實資料,洗刷冤屈,終結網路霸凌。

變更

前往: 導覽搜尋

MediaWiki:Mobile.js

增加 1,394 位元組, 2 年前
创建页面,内容为“这里的任何JavaScript将为使用移动版网站的用户加载: Add some links to the menu: $.when( mw.loader.using(['mediawiki.util', 'oojs-ui.styles…”
/* 这里的任何JavaScript将为使用移动版网站的用户加载 */
/* Add some links to the menu */
$.when( mw.loader.using(['mediawiki.util', 'oojs-ui.styles.icons-interactions']), $.ready ).then( function() {
var styleClasses = ["menu-list-item__button", "mw-ui-icon", "mw-ui-icon-before"];

// Repeat following part for every link you want to add
var helpUrl = mw.util.getUrl( '上傳圖片' ); // Here put the page title to get the valid URL

// pt-preference is a section where add the link, more you find on
// https://en.wikipedia.org/wiki/Help:Customizing_toolbars
var helpNode = mw.util.addPortletLink( 'pt-preferences', helpUrl, 'https://factpedia.org/wiki/Special:%E4%B8%8A%E5%82%B3%E6%AA%94%E6%A1%88').getElementsByTagName("a")[0];

// Here you decide which icon to use. You can select any from the page below:
// https://doc.wikimedia.org/oojs-ui/master/demos/?page=icons&theme=wikimediaui&direction=ltr&platform=mobile
// In this example, I choose "helpNotice" from section "interactions".
// To use it, I needed to load "oojs-ui.styles.icons-interactions"
// in the first line of the script, and build the class name as below.
// As an alternative, use icons referenced in previous solutions (links at the end).
helpNode.classList.add("mw-ui-icon-helpNotice");
styleClasses.map(function(x) {helpNode.classList.add(x)});
} );
行政員使用者查核員拒收員巡檢員管理員、water、waterc、waterh、waterm、waterp、waters、watert、waterv、waterw、waterz
10,318
次編輯