ഉപയോക്താവ്:WOSlinker/common.js

വിക്കിപീഡിയ, ഒരു സ്വതന്ത്ര വിജ്ഞാനകോശം.

ശ്രദ്ധിക്കുക: സേവ് ചെയ്തശേഷം മാറ്റങ്ങൾ കാണാനായി താങ്കൾക്ക് ബ്രൗസറിന്റെ കാഷെ ഒഴിവാക്കേണ്ടി വന്നേക്കാം.

  • ഫയർഫോക്സ് / സഫാരി: Reload ബട്ടൺ അമർത്തുമ്പോൾ Shift കീ അമർത്തി പിടിക്കുകയോ, Ctrl-F5 അല്ലെങ്കിൽ Ctrl-R (മാക്കിന്റോഷിൽ ⌘-R ) എന്ന് ഒരുമിച്ച് അമർത്തുകയോ ചെയ്യുക
  • ഗൂഗിൾ ക്രോം: Ctrl-Shift-R (മാക്കിന്റോഷിൽ ⌘-Shift-R ) അമർത്തുക
  • ഇന്റർനെറ്റ് എക്സ്പ്ലോറർ: Refresh ബട്ടൺ അമർത്തുമ്പോൾ Ctrl കീ അമർത്തിപിടിക്കുക. അല്ലെങ്കിൽ Ctrl-F5 അമർത്തുക
  • ഓപ്പറ: Menu → Settings എടുക്കുക (മാക്കിൽ Opera → Preferences) എന്നിട്ട് Privacy & security → Clear browsing data → Cached images and files ചെയ്യുക.
function font_queryString(p) {
    var re = RegExp('[&?]' + p + '=([^&]*)');
    var matches;
    if (matches = re.exec(document.location)) {
        try { 
            return decodeURI(matches[1]);
        } catch (e) { }
    }
    return null;
}

//Add a 'font edit' tab
if(mw.config.get('wgArticleId') != 0 ) { 
    $( function fontEditButton() {
        mw.util.addPortletLink('p-cactions', 
                       mw.util.getUrl(null,{action:'edit',font:true}),
                       'font',
                       'p-font',
                       'font edit');
    }
)}

if(mw.config.get('wgAction') == 'edit' && font_queryString('font') == 'true') {
    $(function font() {
        var myContent = document.getElementById('wpTextbox1').value;

        myContent = myContent.replace(/\<font color *\= *\"\#([\d\w]*)\"\>\[\[([^\]]*?)\|([^\]]*?)\]\]\<\/font\>/g,'[[$2|<font color="#$1">$3</font>]]');
        myContent = myContent.replace(/\<font color *\= *\"\#([\d\w]*)\"\>\[\[([^\]]*?)\]\]\<\/font\>/g,'[[$2|<font color="#$1">$2</font>]]');

        myContent = myContent.replace(/\<font color *\= *\#([\d\w]*)\>\[\[([^\]]*?)\|([^\]]*?)\]\]\<\/font\>/g,'[[$2|<font color="#$1">$3</font>]]');
        myContent = myContent.replace(/\<font color *\= *\#([\d\w]*)\>\[\[([^\]]*?)\]\]\<\/font\>/g,'[[$2|<font color="#$1">$2</font>]]');

        myContent = myContent.replace(/\<font color *\= *\"([\w]*)\"\>\[\[([^\]]*?)\|([^\]]*?)\]\]\<\/font\>/g,'[[$2|<font color="$1">$3</font>]]');
        myContent = myContent.replace(/\<font color *\= *\"([\w]*)\"\>\[\[([^\]]*?)\]\]\<\/font\>/g,'[[$2|<font color="$1">$2</font>]]');

        myContent = myContent.replace(/\<font color *\= *([\w]*)\>\[\[([^\]]*?)\|([^\]]*?)\]\]\<\/font\>/g,'[[$2|<font color=$1>$3</font>]]');
        myContent = myContent.replace(/\<font color *\= *([\w]*)\>\[\[([^\]]*?)\]\]\<\/font\>/g,'[[$2|<font color=$1>$2</font>]]');

        if(document.getElementById('wpTextbox1').value != myContent) {
           document.getElementById('wpTextbox1').value=myContent;
           document.getElementById('wpSummary').value='font [[Special:LintErrors/tidy-font-bug|lint]]';
           document.getElementById('wpMinoredit').checked = true;
        }



    }
)}
"https://ml.wikipedia.org/w/index.php?title=ഉപയോക്താവ്:WOSlinker/common.js&oldid=2840253" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്