User:WOSlinker/bgcolor.js

Hello, you have come here looking for the meaning of the word User:WOSlinker/bgcolor.js. In DICTIOUS you will not only get to know all the dictionary meanings for the word User:WOSlinker/bgcolor.js, but we will also tell you about its etymology, its characteristics and you will know how to say User:WOSlinker/bgcolor.js in singular and plural. Everything you need to know about the word User:WOSlinker/bgcolor.js you have here. The definition of the word User:WOSlinker/bgcolor.js will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofUser:WOSlinker/bgcolor.js, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.
function bgcolor_queryString(p) {
    var re = RegExp('' + p + '=(*)');
    var matches;
    if (matches = re.exec(document.location)) {
        try { 
            return decodeURI(matches);
        } catch (e) { }
    }
    return null;
}

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

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


          //myContent = myContent.replace(/\<span style\=\"background-color\:\#(*)\"\>\\]\<\/font\>/g,'<span style="background-color:#$1">]</span>');
          myContent = myContent.replace(/\<tt\>(.*?)\<\/tt\>/g,'<code>$1</code>');

          if(document.getElementById('wpTextbox1').value != myContent) {
               document.getElementById('wpTextbox1').value=myContent;
              document.getElementById('wpSummary').value='code instead of tt tag';
              //document.getElementById('wpMinoredit').checked = true;
          }


    }
)}