注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google ChromeFirefoxMicrosoft EdgeSafari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
////////// Links to some languages on the top
//Reference: http://meta.wikimedia.org/wiki/User:Fristu/monobook.js

function morelangs() {
  if (document.getElementById('p-lang')) {
    var langs = document.getElementById('p-lang').getElementsByClassName('body')[0].cloneNode(true);
    // don't use the same ids twice
    langs.id = 'mylangs';

    // visible interwiki
    var listitems = langs.getElementsByTagName('LI');
    for (i=0;i<listitems.length;i++) {
      if (listitems[i].classList.contains('interwiki-de')
        || listitems[i].classList.contains('interwiki-en')
        || listitems[i].classList.contains('interwiki-fr')
        || listitems[i].classList.contains('interwiki-ja')
        || listitems[i].classList.contains('interwiki-ko')
        || listitems[i].classList.contains('interwiki-zh')) {
        listitems[i].className = 'mylangs-show';
        listitems[i].style = '';
      }
      else {
      	listitems[i].className = 'mylangs-none';
      }
    }
    
    var buttonitem = langs.getElementsByTagName('BUTTON');
    buttonitem[0].className = 'mylangs-none';
    
    var edititem = langs.getElementsByClassName('wb-langlinks-edit wb-langlinks-link');
    edititem[0].className = 'mylangs-none';

    // drop them at the bottom of the content area
    if (document.getElementById('column-content') !== null) {
      document.getElementById('column-content').appendChild(langs);
    } // monobook version
    if (document.getElementById('content') !== null) {
      document.getElementById('content').appendChild(langs);
    } // vector version

  }
}
//if (window.addEventListener) window.addEventListener("load",morelangs,false);
//else if (window.attachEvent) window.attachEvent("onload",morelangs);
$(morelangs);



////////// Decoded page name in Chinese (for old Firefox)

//function decodeName() {
//    var URLtext = document.createTextNode(decodeURI(document.URL));
//    // drop them at the bottom of the content area
//    document.getElementById('globalWrapper').appendChild(URLtext);
//}
//if (window.addEventListener) window.addEventListener("load",decodeName,false);
//else if (window.attachEvent) window.attachEvent("onload",decodeName);



////////// Navigation popups (now in [[Special:参数设置]])
//Reference: [[Wikipedia:辅助工具/popups]]
//Reference: [[:en:User:Lupin/popups.js]]

//document.write('<script type="text/javascript" src="'
//             + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
//             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

// popupStructure='fancy2';
popupImages=false;
popupAdminLinks=true;
popupQueriedRevertSummary = '使用[[WP:POPUP]]恢复至$2的修订版本$1';



////////// Edit the first paragraph (now in [[Special:参数设置]])
// Reference: [[MediaWiki:Gadget-edit0.js]]

//JSConfig.edit0Pos="top";



////////// Friendly (now in [[Special:参数设置]] and replaced by [[Wikipedia:Twinkle/参数设置]])
// Reference: [[Wikipedia:維基百科工具/Friendly]]

//if( typeof( FriendlyConfig) == 'undefined' ) FriendlyConfig= {}; // 不要删除本行!所有设置都在其下 FriendlyConfig.key = value;
//FriendlyConfig.enableClock = false;
//FriendlyConfig.showRollbackLinks = [ 'diff', 'others' ];



////////// Edit tools (for old Monobook)
// Reference: [[Wikipedia:維基百科工具/編輯工具]]

//addDropdownMenu("templateShortcut",wgULS('模板快捷','模板快捷'),[
//	{
//		id         : "templateBd",
//		text       : wgULS("bd","bd"),
//		tagOpen    : "{\{bd|" ,
//		sampleText : "生卒日期" ,
//		tagClose   : "}\}"
//	},
//	{
//		id         : "templateFact",
//		text       : wgULS("fact","fact"),
//		tagOpen    : "{\{subst:fact/auto|" ,
//		sampleText : "请求来源的内容" ,
//		tagClose   : "}\}"
//	}
//]);



////////// Edit tools (for old Monobook)
// Reference: http://usability.wikimedia.org/wiki/Toolbar_customization
// Reference: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js?view=markup

// Check that the toolbar is available
if ( typeof $j != 'undefined' && typeof $.fn.wikiEditor != 'undefined' ) {
	// Execute on load
	$( document ).ready( function() {
		// General format: 
                // $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { configuration object here } );
 
		// To add a toolbar section:
		$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'sections': {
				'sectionTemplateShortcut': {
					'type': 'toolbar', // Can also be 'booklet'
					'label': '模板快捷'
					// or 'labelMsg': 'section-emoticons-label' for a localized label
				}
			}
		} );
 

 		// To add a group to an existing toolbar section:
		$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'sectionTemplateShortcut',

		groups: {
			'groupTemplateShortcut': {
				tools: {
					'toolTemplateShortcut': {
						label: '模板',
						type: 'select',
						list: {
							'templateBd' : {
								label: 'bd',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{bd|',
										peri: '生年|生日|卒年|卒日|排序',
										post: '}\}',
										ownline: true
									}
								}
							},
							'templateFact' : {
								label: 'fact',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{subst:fact/auto|',
										peri: '请求来源的内容',
										post: '}\}',
										ownline: true
									}
								}
							}
						}
					}
				}
			}
		}

		} );
 
 	} );
}



////////// Category Page Form

importScript("User:Isnow/CategoryPageForm.js");



////////// Test

//importScript("User:Isnow/testJS.js");