Revision as of 22:34, 18 February 2011 view sourceMagog the Ogre (talk | contribs)Administrators100,751 edits updates← Previous edit | Revision as of 23:59, 19 February 2011 view source Magog the Ogre (talk | contribs)Administrators100,751 edits updateNext edit → | ||
Line 126: | Line 126: | ||
// Updated from ], version as of: 2009-04-28T11:54:22 | // Updated from ], version as of: 2009-04-28T11:54:22 | ||
if ((wgAction == 'view' || wgAction == 'purge' ) && wgNamespaceNumber >=0) { | if ((wgAction == 'view' || wgAction == 'purge' ) && wgNamespaceNumber >=0) { | ||
|
$ (function edittop_hook () { | ||
var localtitles = { | var localtitles = { | ||
cs: 'Editovat úvodní sekci', | cs: 'Editovat úvodní sekci', | ||
Line 135: | Line 135: | ||
ja: '導入部を編集' | ja: '導入部を編集' | ||
}; | }; | ||
var our_content = document.getElementById ("content") || document.getElementById ("mw_content") || document.body; | var our_content = document.getElementById ("content") || document.getElementById ("mw_content") || document.body; | ||
var editspans = getElementsByClassName (our_content, "span", "editsection"); | var editspans = getElementsByClassName (our_content, "span", "editsection"); | ||
var span1; | var span1; | ||
for (es_count = 0; editspans && es_count < editspans.length; es_count++ ) { | for (es_count = 0; editspans && es_count < editspans.length; es_count++ ) { | ||
span1 = editspans; | span1 = editspans; | ||
Line 150: | Line 150: | ||
var editwidth = span1.offsetWidth; | var editwidth = span1.offsetWidth; | ||
if (skin == "vector") | if (skin == "vector") | ||
|
mw.util.addCSS ("h1.firstHeading span.editsection {font-size: 50%;}"); | ||
else | else | ||
editwidth += 10; | editwidth += 10; | ||
var topicons = getElementsByClassName (our_content, "div", "topicon"); | var topicons = getElementsByClassName (our_content, "div", "topicon"); | ||
for (el = 0; topicons && el < topicons.length; el++) { | for (el = 0; topicons && el < topicons.length; el++) { | ||
Line 162: | Line 162: | ||
mwfrtag.style.marginRight = editwidth + "px"; | mwfrtag.style.marginRight = editwidth + "px"; | ||
} | } | ||
our_content = document.getElementById ("mw_header") || document.getElementById ("content") || document.body; | our_content = document.getElementById ("mw_header") || document.getElementById ("content") || document.body; | ||
var parent = our_content.getElementsByTagName ("H1"); | var parent = our_content.getElementsByTagName ("H1"); |
Revision as of 23:59, 19 February 2011
importScript('User:Lupin/recent2.js'); importScript("User:AzaToth/twinkle.js"); importScript("User:Tim Song/afchelper4.js"); importScript('User:AWeenieMan/furme.js'); importScript("User:Drilnoth/delresized.js"); importScript("User:MGA73/nowcommonsreview.js"); /****************************************************** * added from User:Mr.Z-man/refToolbar.js * ******************************************************/ var refToolbarInstalled = true; if (wgServer == "https://secure.wikimedia.org") { importScriptURI("https://secure.wikimedia.org/wikipedia/en/search/?title=User:Mr.Z-man/refToolbar_2.0/base.js&action=raw&ctype=text/javascript"); } else { importScriptURI('http://en.wikipedia.org/search/?title=User:Mr.Z-man/refToolbar_2.0/base.js&action=raw&ctype=text/javascript'); } if( typeof $j.wikiEditor != 'undefined' && (wgAction == 'edit' || wgAction == 'submit') ) { // if( wgWikiEditorPreferences.toolbar.enable && wgWikiEditorPreferences.toolbar.dialogs /*&& navigator.userAgent.indexOf('MSIE') == -1*/ ) { importScript('User:Mr.Z-man/refToolbar 2.0.js'); // } else if( wgWikiEditorPreferences.toolbar.enable ) { // importScript('User:Mr.Z-man/refToolbarIE.js'); // } } else if (wgAction == 'edit' || wgAction == 'submit') { importScript('User:Apoc2400/refToolbarPlus.js'); } /*************************************************************** * added from mw:MediaWiki:Gadget-UTCLiveClock.js * **************************************************************/ ( function( $, undefined ) { function showTime( $target ) { var dateNode = UTCLiveClockConfig.node; if( !dateNode ) { return; } var now = new Date(); var hh = now.getUTCHours(); var mm = now.getUTCMinutes(); var ss = now.getUTCSeconds(); if ( typeof $target === 'undefined' ) { $target = $( dateNode ).find( 'a:first' ); } var time = ( hh < 10 ? '0' + hh : hh ) + ':' + ( mm < 10 ? '0' + mm : mm ) + ':' + ( ss < 10 ? '0' + ss : ss ); $target.text( time ); setTimeout( function(){ showTime( $target ); }, 1000 ); } function liveClock() { appendCSS( '#utcdate a { font-weight:bolder; font-size:120%; }' ); if ( typeof( UTCLiveClockConfig ) === 'undefined' ) { window.UTCLiveClockConfig = {}; } var portletId = UTCLiveClockConfig.portletId || 'p-personal'; var nextNode = UTCLiveClockConfig.nextNodeId ? document.getElementById( UTCLiveClockConfig.nextNodeId ) : undefined; UTCLiveClockConfig.node = addPortletLink( portletId, wgScript + '?title=' + encodeURIComponent( wgPageName ) + '&action=purge', '', 'utcdate', undefined, undefined, nextNode ); if( !UTCLiveClockConfig.node ) { return; } showTime(); } $( document ).ready( liveClock ); } )( jQuery ); /*************************************************************** * added from MediaWiki:Gadget-LongEditSummaries.js * **************************************************************/ addOnloadHook(function() { var wpSummary = document.getElementById("wpSummary") if (wpSummary) { var adjustMaxLength = function () { // subtract the number of UTF-8 continuation bytes (0x80-0xBF) from the maxlength var maxLength = 250 - encodeURI(wpSummary.value).split(/%/i).length + 1 wpSummary.maxLength = maxLength // the last character or group might've pushed us over; if so, inform the user var errorMessage = document.getElementById("editSummaryTooLong") if (wpSummary.value.length > maxLength) { if (!errorMessage) { wpSummary.style.border = "3px solid red" document.getElementById("wpSave").disabled = true var editSummaryTooLong = document.createElement("div") editSummaryTooLong.id = "editSummaryTooLong" editSummaryTooLong.style.color = "red" editSummaryTooLong.style.fontWeight = "bold" editSummaryTooLong.appendChild(document.createTextNode("Your edit summary is too long.")) var wpMinoredit = document.getElementById("wpMinoredit") wpMinoredit.parentNode.insertBefore(editSummaryTooLong, wpMinoredit) } } else { if (errorMessage) { wpSummary.style.border = "" document.getElementById("wpSave").disabled = false errorMessage.parentNode.removeChild(errorMessage) } } oldValue = wpSummary.value } addHandler(wpSummary, "keyup", adjustMaxLength) addHandler(wpSummary, "change", adjustMaxLength) adjustMaxLength() } }) /*************************************************************** * added from MediaWiki:Gadget-edittop.js * **************************************************************/ // Imported from ], version as of: 2007-06-19T04:28:52 // Updated from ], version as of: 2009-04-28T11:54:22 if ((wgAction == 'view' || wgAction == 'purge' ) && wgNamespaceNumber >=0) { $ (function edittop_hook () { var localtitles = { cs: 'Editovat úvodní sekci', en: 'Edit lead section', fr: 'Modifier le résumé introductif', ko: '도입부를 편집', it: 'Modifica della sezione iniziale', ja: '導入部を編集' }; var our_content = document.getElementById ("content") || document.getElementById ("mw_content") || document.body; var editspans = getElementsByClassName (our_content, "span", "editsection"); var span1; for (es_count = 0; editspans && es_count < editspans.length; es_count++ ) { span1 = editspans; if (span1.className.indexOf ("plainlinks") == -1) break; } if (!span1) return; var span0 = span1.cloneNode (true); var editwidth = span1.offsetWidth; if (skin == "vector") mw.util.addCSS ("h1.firstHeading span.editsection {font-size: 50%;}"); else editwidth += 10; var topicons = getElementsByClassName (our_content, "div", "topicon"); for (el = 0; topicons && el < topicons.length; el++) { topicons.style.marginRight = editwidth + "px"; } var mwfrtag = document.getElementById ("mw-fr-revisiontag"); if (mwfrtag) { mwfrtag.style.marginRight = editwidth + "px"; } our_content = document.getElementById ("mw_header") || document.getElementById ("content") || document.body; var parent = our_content.getElementsByTagName ("H1"); parent.insertBefore (span0, parent.firstChild); var a = span0.getElementsByTagName ("A"); if (a.href.indexOf ("§ion=T") == -1) { a.title = a.title.replace (/(: |:).*$/, "$1" + "0"); a.setAttribute ("href", a.getAttribute ("href", 2).replace (/§ion=\d+/, "§ion=0")); } else { //transcluded a.title = localtitles; a.setAttribute ("href", wgScript + "?title=" + encodeURIComponent (wgPageName) + "&action=edit§ion=0"); } if (localtitles) a.title = localtitles; }) } /*************************************************************** * added from MediaWiki:Gadget-Friendly.js * **************************************************************/ if ( navigator.appName != "Microsoft Internet Explorer" ) //Doesn't work in IE. { if ( typeof( FriendlyConfig ) == 'undefined' ) FriendlyConfig = {}; FriendlyConfig.enableClock = false; importScript("User:Ioeth/friendly.js"); }