User:Subfader~enwiki/monobook.js: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
←Replaced content with 'importScript('User:Twinzor/wikimark.js');' |
||
Line 1: | Line 1: | ||
importScript('User:Twinzor/wikimark.js'); |
importScript('User:Twinzor/wikimark.js'); |
||
document.write('<script type="text/javascript" src="'http://en.wikipedia.org/enwiki/w/index.php?title=User:Subfader/EditAndMoveALot.js'); |
|||
// [[User:Zocky/PicturePopups.js]] |
|||
document.write('<script type="text/javascript" src="' |
|||
+ 'http://en.wikipedia.org/enwiki/w/index.php?title=User:Zocky/PicturePopups.js' |
|||
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); |
|||
// [[User:Zocky/AutoComplete.js]] |
|||
document.write('<script type="text/javascript" src="' |
|||
+ 'http://en.wikipedia.org/enwiki/w/index.php?title=User:Zocky/AutoComplete.js' |
|||
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); |
|||
// [[User:Zocky/SearchBox.js]] |
|||
document.write('<script type="text/javascript" src="' |
|||
+ 'http://en.wikipedia.org/enwiki/w/index.php?title=User:Zocky/SearchBox.js' |
|||
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); |
|||
//Fix from http://en.wikipedia.org/wiki/User:Magnus_Manske/LinkFixr.js |
|||
if ( wgAction == "edit" || wgAction == "submit" ) addOnloadHook ( init_linkfixr ) ; |
|||
function init_linkfixr () { |
|||
var tools = document.getElementById("wpTextbox1") ; |
|||
var out = '<li >' ; |
|||
var ot = document.editform.wpTextbox1.value ; |
|||
var t = get_linkfixr_text ( ot ) ; |
|||
if ( t != ot ) { |
|||
out += "<a href='javascript:run_linkfixr();'>LinkFixr</a>" ; |
|||
} else { |
|||
out += "<span style='color:#888888'>LinkFixr</span>" ; |
|||
} |
|||
tools = tools.getElementsByTagName("ul")[0] ; |
|||
tools.innerHTML += out ; |
|||
} |
|||
function get_linkfixr_text ( ot ) { |
|||
var t = ot ; |
|||
var ct ; |
|||
do { |
|||
ct = t ; |
|||
t = t.split('[["').join('"[[') ; |
|||
t = t.split('"]]').join(']]"') ; |
|||
t = t.split("[['").join("'[[") ; |
|||
t = t.split("']]").join("]]'") ; |
|||
t = t.split(',]]').join(']],') ; |
|||
t = t.split(':]]').join(']]:') ; |
|||
t = t.split(';]]').join(']];') ; |
|||
} while ( ct != t ) ; |
|||
return t ; |
|||
} |
|||
function run_linkfixr () { |
|||
var ot = document.editform.wpTextbox1.value ; |
|||
var t = get_linkfixr_text ( ot ) ; |
|||
if ( t != ot ) { |
|||
document.editform.wpTextbox1.value = t ; |
|||
var s = document.editform.wpSummary.value ; |
|||
if ( s != "" ) s += "; " ; |
|||
s += "fixed link(s) using [[MediaWiki:LinkFixr.js]]" ; |
|||
document.editform.wpSummary.value = s ; |
|||
} |
|||
} |