انتقل إلى المحتوى

مستخدم:الواد الجامد/common.js

من ويكيبيديا، الموسوعة الحرة

ملاحظة: بعد الحفظ، قد يلزمك إفراغ الكاش لرؤية التغييرات.

//[[وب:مهذب ويكي]]
autoEdMinor=false;autoEdTag="تهذيب";autoEdLinkHover="شغل مهذب الويكي";autoEdLinkName="هذب";importScriptURI('http://en.wikipedia.org/w/index.php?title=Wikipedia:AutoEd/core.js&action=raw&ctype=text/javascript');importScriptURI('http://en.wikipedia.org/w/index.php?title=Wikipedia:AutoEd/unicodify.js&action=raw&ctype=text/javascript');importScriptURI('http://en.wikipedia.org/w/index.php?title=Wikipedia:AutoEd/isbn.js&action=raw&ctype=text/javascript');importScriptURI('http://en.wikipedia.org/w/index.php?title=Wikipedia:AutoEd/whitespace.js&action=raw&ctype=text/javascript');importScriptURI('http://en.wikipedia.org/w/index.php?title=Wikipedia:AutoEd/wikilinks.js&action=raw&ctype=text/javascript');importScriptURI('http://en.wikipedia.org/w/index.php?title=Wikipedia:AutoEd/htmltowikitext.js&action=raw&ctype=text/javascript');importScriptURI('http://en.wikipedia.org/w/index.php?title=Wikipedia:AutoEd/headlines.js&action=raw&ctype=text/javascript');importScriptURI('http://en.wikipedia.org/w/index.php?title=Wikipedia:AutoEd/unicodecontrolchars.js&action=raw&ctype=text/javascript');importScriptURI('http://en.wikipedia.org/w/index.php?title=Wikipedia:AutoEd/unicodehex.js&action=raw&ctype=text/javascript');importScriptURI('http://en.wikipedia.org/w/index.php?title=Wikipedia:AutoEd/templates.js&action=raw&ctype=text/javascript');importScriptURI('http://en.wikipedia.org/w/index.php?title=Wikipedia:AutoEd/tablestowikitext.js&action=raw&ctype=text/javascript');importScriptURI('http://en.wikipedia.org/w/index.php?title=Wikipedia:AutoEd/extrabreaks.js&action=raw&ctype=text/javascript');importScriptURI('http://en.wikipedia.org/w/index.php?title=Wikipedia:AutoEd/links.js&action=raw&ctype=text/javascript');function autoEdFunctions(){var a=document.editform.wpTextbox1;a.value=autoEdUnicodify(a.value);a.value=autoEdISBN(a.value);a.value=autoEdWhitespace(a.value);a.value=autoEdUnicodeHex(a.value);a.value=autoEdWikilinks(a.value);a.value=autoEdHTMLtoWikitext(a.value);a.value=autoEdHeadlines(a.value);a.value=autoEdUnicodeControlChars(a.value);a.value=autoEdTemplates(a.value);a.value=autoEdTablestoWikitext(a.value);a.value=autoEdExtraBreaks(a.value);a.value=autoEdLinks(a.value);a.value=autoEdExtra(a.value);}
function autoEdExtra(str) {
    str = str.replace(/( /gm, "\(");
    str = str.replace(/ )/gm, "\)");
    str = str.replace(/\(\)/gm, "");
    str = str.replace(/\""/g, "");
    str = str.replace(/\{ /gm, "\{");
    str = str.replace(/ \}/gm, "\}");
    str = str.replace(/\{\{ /gm, "\{\{");
    str = str.replace(/ \}\}/gm, "\}\}");
    str = str.replace(/ \u061B /gm, "\u061B "); //؛
    str = str.replace(/ \u060C\u060C /gm, "\u060C "); //،
    str = str.replace(/ \u060C /gm, "\u060C "); //،
    str = str.replace(/\u060C\u060C/gm, "\u060C"); //،،
    str = str.replace(/ \./gm, "\.");
    str = str.replace(/ \u00AB /gm, " \u00AB"); //«
    str = str.replace(/ \u00BB /gm, "\u00BB "); //»
    str = str.replace(/ : /gm, ": ");
    str = str.replace(/ <ref>/gm, "<ref>");
    str = str.replace(/.\n=/g, ".\n\n=");
    str = str.replace(/\ق\.\م/g, "ق م");
    str = str.replace(/\ق\.\م\./g, "ق م");
    str = str.replace(/\[\[File:/gi, '[[ملف:');
    str = str.replace(/thumb/gi, 'تصغير');
    str = str.replace(/(==[\t ]*)(?:أنظر أيضا|إنظر أيضا|انظر ايضا|أنظر أيضًا|أنظر أيضاً|See also)([\t ]*==)/gi, "$1انظر أيضا$2");
    str = str.replace(/(==[\t ]*)references([\t ]*==)/gi, "$1مراجع$2");
    str = str.replace(/(==[\t ]*)sources([\t ]*==)/gi, "$1مصادر$2");
    return str;
}