Toscead betweox fadungum "MediaWiki:Gadget-spellingstyle.js"

Content deleted Content added
No edit summary
No edit summary
Líne 25:
convertStyle(contentClone, "gw", targetstyle);
convertStyle(contentClone, "yoghwynn", targetstyle);
convertStyle(contentClone, "insularwynn", targetstyle);
convertStyle(contentClone, "runes", targetstyle);
$("#mw-content-text").hide();
Line 31 ⟶ 32:
$(".click-gw").click({"outputstyle": "gw"}, doConv);
$(".click-yoghwynn").click({"outputstyle": "yoghwynn"}, doConv);
$(".click-insularwynn").click({"outputstyle": "insularwynn"}, doConv);
$(".click-runes").click({"outputstyle": "runes"}, doConv);
}
Line 47 ⟶ 49:
"ᚾ": "n",
"ᛁ": "i",
"ᛄ": "jġ",
"ᛇ": "ēo",
"ᛈ": "p",
Line 87 ⟶ 89:
"i": "ᛁ",
"ī": "ᛁ",
"j": "ᛄ",
"ġ": "ᛄ",
"k": "ᚳ",
Line 168 ⟶ 171:
var temp = inputhtml;
if (inputstyle == outputstyle) return inputhtml;
if (inputstyle =!= "gwrunes" && outputstyle =!= "yoghwynnrunes") {
tempif = myReplace(temp,outputstyle /G/g,== 'Ȝ'"yoghwynn"); {
temp = myReplace(temp, /g[GꝽ]/g, 'ȝȜ');
temp = myReplace(temp, /W[gᵹ]/g, 'Ƿȝ');
temp = myReplace(temp, /wW/g, 'ƿǷ');
temp = myReplace(temp, /áw/g, "ā"'ƿ');
} else if (inputstyle == "yoghwynn" && outputstyle == "gw") {
temp} =else if myReplace(temp,outputstyle /Ȝ/g,== "Ggw"); {
temp = myReplace(temp, /ȝ[ȜꝽ]/g, "gG");
temp = myReplace(temp, /Ƿ[ȝᵹ]/g, "Wg");
temp = myReplace(temp, /ƿǷ/g, "wW");
temp = myReplace(temp, /ǽƿ/g, "ǣw");
} else if (inputstyle == "yoghwynn" && outputstyle == "gwinsularwynn") {
temp = myReplace(temp, /é[GȜ]/g, "ē");
temp = myReplace(temp, /í[gȝ]/g, "ī");
temp = myReplace(temp, /óW/g, "ōǷ");
temp = myReplace(temp, /úw/g, "ūƿ");
}
} else if (inputstyle == "runes") {
for (var rune in runes) {
Line 191 ⟶ 201:
temp = myReplace(temp, latin, runes2[latin]);
}
} else if (outputstyle == "nodots") {
temp = myReplace(temp, /ġ/g, "g"); temp = myReplace(temp, /Ġ/g, "G");
temp = myReplace(temp, /ċ/g, "c"); temp = myReplace(temp, /Ċ/g, "C");
} else if (outputstyle == "macronsrule") {
temp = myReplace(temp, /á/g, "ā");
temp = myReplace(temp, /ǽ/g, "ǣ");
temp = myReplace(temp, /é/g, "ē");
temp = myReplace(temp, /í/g, "ī");
temp = myReplace(temp, /ó/g, "ō");
temp = myReplace(temp, /ú/g, "ū");
temp = myReplace(temp, /ý/g, "ȳ");
temp = myReplace(temp, /Á/g, "Ā");
temp = myReplace(temp, /Ǽ/g, "Ǣ");
temp = myReplace(temp, /É/g, "Ē");
temp = myReplace(temp, /Í/g, "Ī");
temp = myReplace(temp, /Ó/g, "Ō");
temp = myReplace(temp, /Ú/g, "Ū");
temp = myReplace(temp, /Ý/g, "Ȳ");
}
 
return temp;
}
Line 257 ⟶ 250:
*/
$(function($) {
if ( mw.config.get( 'wgAction' ) !== 'view') {
$("#mw-content-text").prepend($("<center class=\"nochange\"><small>[ <a href=\"javascript:void(0);\" class=\"click-gw\">gw</a> ] [ <a href=\"javascript:void(0);\" class=\"click-yoghwynn\">ȝƿ</a> ] [ <a href=\"javascript:void(0);\" class=\"click-runes\">ᚱᚢᚾ</a> ]<sup><a href=\"/wiki/Wikipedia:Stylistic_and_font_options\" title=\"Style and font help\">?</a></sup></small></center>"));
return;
}
 
$("#mw-content-text").prepend($("<center class=\"nochange\"><small>[ <a href=\"javascript:void(0);\" class=\"click-gw\">gw</a> ] [ <a href=\"javascript:void(0);\" class=\"click-yoghwynn\">ȝƿ</a> ] [ <a href=\"javascript:void(0);\" class=\"click-insularwynn\">ᵹƿ</a> ] [ <a href=\"javascript:void(0);\" class=\"click-runes\">ᚱᚢᚾ</a> ]<sup><a href=\"/wiki/Wikipedia:Stylistic_and_font_options\" title=\"Style and font help\">?</a></sup></small></center>"));
$(".click-gw").click({"outputstyle": "gw"}, doConv);
$(".click-insularwynn").click({"outputstyle": "insularwynn"}, doConv);
$(".click-yoghwynn").click({"outputstyle": "yoghwynn"}, doConv);
$(".click-runes").click({"outputstyle": "runes"}, doConv);