×
Create a new article
Write your page title here:
We currently have 277 articles on Waste Of Space Wiki. Type your article name above or create one of the articles listed here!



    Waste Of Space Wiki

    MediaWiki:Common.js: Difference between revisions

    Content deleted Content added
    Created page with "switch (mw.config.get('wgPageName')) { case 'Category:Parts': alert("hello world!") break; }"
     
    No edit summary
     
    Line 1: Line 1:
    switch (mw.config.get('wgPageName')) {
    switch (mw.config.get('wgPageName')) {
    case 'Category:Parts':
    case 'Category:Parts':
    var elements = document.getElementsByClassName("gallerybox")
    alert("hello world!")

    var i
    for (i = 0; i < elements.length; i++) {
    var children = elements[i].childNodes[0].childNodes
    var link = children[3].getElementsByClassName("galleryfilename")[0]
    var endtext = ""
    var ii
    for (ii = 0; ii < children.length; ii++) {
    if(ii==1){
    if(children[ii].childNodes[0].innerHTML == undefined){
    endtext = endtext + '<a class="galleryclickable" href="' + link.getAttribute("href") + '"><div class="thumb" style="height: 150px;">' + children[ii].innerHTML + '</div>'
    }else{
    endtext = endtext + '<div class="thumb thumbgallery" style="width: 150px;">' + children[ii].innerHTML + '</div>'
    }
    } else if(ii==3){
    endtext = endtext + '<div class="gallerytext">' + children[ii].innerHTML + '</div>'
    }
    }
    //console.log(children)
    elements[i].innerHTML = endtext
    }
    break;
    break;
    }
    }
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.