Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
javascript: 
function addSpaceEdit()
{
    e = document.createElement ("input");
    e.setAttribute ("type", "button");
    e.setAttribute ("value", "ಒಪ್ಪವಾಗಿಸು");
    e.setAttribute ("onclick", "doIt()");
    b = document.getElementById ('wpDiff');
    if(b)b.parentNode.insertBefore (e, b.nextSibling);
}

function doIt()
{
    spaceEdit(); // Remove leading whitespaces
    minorEdit();  // Add ಚುಟುಕು
    knLink();      // ಕನ್ನಡ ವಿಕಿಪೀಡಿಯದ ಉದ್ದ ಕೊಂಡಿಗಳನ್ನು wiki markupಗೆ ಬದಲಾಯಿಸು
    linkEdit();     // Correct wiki links
    ocZeroEdit(); // Correct ೦ (Zero) to ಂ
    summary();
}

function spaceEdit()
{
    tb = document.getElementById ("wpTextbox1");
    tb.value = tb.value.replace (/^\s*/g, "");
    tb.value = tb.value.replace (/(\n+)\s*/g, "$1");
}

function minorEdit()
{
    tb = document.getElementById ("wpTextbox1");
    if( (tb.value.length < 3000) && (null == tb.value.match("{{ಚುಟುಕು}}")) )
    {
    tb.value = "{{ಚುಟುಕು}}"+ "\n" +  tb.value + "\n[[ವರ್ಗ:ಚುಟುಕು]]";
    }
}

function knLink()
{
    tb=document.getElementById("wpTextbox1");
    tb.value=tb.value.replace(/\[\s*http:\/\/kn.wikipedia.org\/wiki\/([^\s]*) \s*(.+)\]/g,"[[$1|$2]]");
}

// Zero-Edit From [[ಸದಸ್ಯ:M_G_Harish/zero-edit.js]]
function ocZeroEdit()
{
    tb = document.getElementById ("wpTextbox1");
    tb.value = tb.value.replace (/([ಂ-ೣ])೦/g, "$1ಂ");
}

// Link-edit From [[ಸದಸ್ಯ:M_G_Harish/link-edit.js]]
function linkEdit()
{
    tb = document.getElementById ("wpTextbox1");
    tb.value = tb.value.replace (/\[\[ *([^|\]]*?) *\| *\1 *\]\]/g, "[[$1]]");
    tb.value = tb.value.replace (/\[\[ *([^|\]]*?)\u0ccd *\]\]([\u0c80-\u0cff]+)/g, "[[$1\u0ccd|$1\u0ccd\u200c$2]]");
    tb.value = tb.value.replace (/\[\[ *([^|\]]*?) *\]\]([\u0c80-\u0cff]+)/g, "[[$1|$1$2]]");
}

function summary()
{
    s = document.getElementById ("wpSummary");
    if(null == s.value.match("SpaceEdit"))
    {
        s.value += "[[ಸದಸ್ಯ:Teju2friends/space-edit.js|SpaceEdit]] ಉಪಯೋಗಿಸಿ ಲೇಖನವನ್ನು ಒಪ್ಪವಾಗಿಸಿದೆ";
    }
}

addSpaceEdit();
void (0);