Gebruiker:Apoo/EditCount.js: verschil tussen versies

Uit Wikikids
Naar navigatie springen Naar zoeken springen
(Nieuwe pagina aangemaakt met 'var addid = 0; function addInput(id) { var addList = document.getElementById('addlist'); var docstyle = addList.style.display; if (docstyle == 'no...')
 
(Op alle andere pagina's is addList.style niks bruikbaars, en dat veroorzaakt JS errors)
 
Regel 16: Regel 16:
 
}
 
}
   
  +
if (mw.config.get('wgCanonicalNamespace') === 'User' && mw.config.get('wgTitle') === 'Apoo/EditCount') {
addInput(1);
+
addInput(1);
  +
}

Huidige versie van 23 nov 2017 om 18:08

var addid = 0;

function addInput(id) {
    
    var addList = document.getElementById('addlist');
    var docstyle = addList.style.display;
    if (docstyle == 'none') addList.style.display = '';

    addid++;
    
    var text = document.createElement('div');
    text.id = 'additem_' + addid;
    text.innerHTML = "<input type='text' id='text' /> <input type='button' id='btn' value='Submit' onClick='javascript: window.open(&#x27;https://wikikids.nl/api.php?action=query&format=xml&list=allusers&auprop=editcount&aulimit=1&auwitheditsonly=1&aufrom=&#x27; + document.getElementById(&#x27;text&#x27;).value);' />";

    addList.appendChild(text);
}

if (mw.config.get('wgCanonicalNamespace') === 'User' && mw.config.get('wgTitle') === 'Apoo/EditCount') {
    addInput(1);
}
Afkomstig van Wikikids , de interactieve Nederlandstalige Internet-encyclopedie voor en door kinderen. "https://wikikids.nl/index.php?title=Gebruiker:Apoo/EditCount.js&oldid=498813"