Revision as of 09:57, 15 August 2012 view sourceTheDJ (talk | contribs)Extended confirmed users, Template editors46,203 edits add pa← Previous edit |
Revision as of 19:12, 6 May 2013 view source Edokter (talk | contribs)Extended confirmed users55,830 edits Per edit requestNext edit → |
Line 25: |
Line 25: |
|
|
|
|
|
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", "mw-editsection"); |
|
var span1; |
|
var span1; |
|
var dir = $('#firstHeading').css('direction') || 'rtl'; |
|
|
var side = "right"; |
|
|
|
|
|
if (dir.toLowerCase() == "rtl" ) { |
|
|
side = "left"; |
|
|
} |
|
|
|
|
|
|
|
|
|
for (var i = 0; editspans && i < editspans.length; i++) { |
|
for (var i = 0; editspans && i < editspans.length; i++) { |
Line 46: |
Line 39: |
|
var span0 = span1.cloneNode (true); |
|
var span0 = span1.cloneNode (true); |
|
var editwidth = span1.offsetWidth; |
|
var editwidth = span1.offsetWidth; |
|
if (mw.config.get("skin") == "monobook") { |
|
|
mw.util.addCSS ("h1.firstHeading span.editsection {float: " + side + ";}"); |
|
|
} |
|
|
if (mw.config.get("skin") == "modern") { |
|
|
mw.util.addCSS ("h1#firstHeading span.editsection {float: " + side + ";}"); |
|
|
} |
|
|
if (mw.config.get("skin") == "vector") { |
|
|
mw.util.addCSS ("h1.firstHeading span.editsection {font-size: 50%;}"); |
|
|
} else { |
|
|
editwidth += 10; |
|
|
} |
|
|
var topicons = getElementsByClassName (our_content, "div", "topicon"); |
|
var topicons = getElementsByClassName (our_content, "div", "topicon"); |
|
for (var el = 0; topicons && el < topicons.length; el++) { |
|
for (var el = 0; topicons && el < topicons.length; el++) { |
|
⚫ |
topicons.style.marginRight = editwidth + "px"; |
|
if (dir.toLowerCase() == "rtl" ) { |
|
|
topicons.style.marginLeft = editwidth + "px"; |
|
|
} else { |
|
⚫ |
topicons.style.marginRight = editwidth + "px"; |
|
|
} |
|
|
} |
|
} |
|
var mwfrtag = document.getElementById ("mw-fr-revisiontag"); |
|
var mwfrtag = document.getElementById ("mw-fr-revisiontag"); |
|
if (mwfrtag) { |
|
if (mwfrtag) { |
|
if (dir.toLowerCase() == "rtl" ) { |
|
mwfrtag.style.marginRight = editwidth + "px"; |
|
mwfrtag.style.marginLeft = editwidth + "px"; |
|
|
} else { |
|
|
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"); |
|
parent.insertBefore (span0, parent.firstChild); |
|
parent.appendChild (span0); |
|
var a = span0.getElementsByTagName ("A"); |
|
var a = span0.getElementsByTagName ("A"); |
|
if (a.href.indexOf ("§ion=T") == -1) { |
|
if (a.href.indexOf ("§ion=T") == -1) { |