User:BadCatMan/common.js

var portbox = document.getElementsByClassName("portable-infobox"); if (portbox.length > 0) { var list = portbox[0].getElementsByTagName("FIGURE"); var i;   for (i = 0; i < list.length; i++) { list[i].className += " article-thumb show-info-icon"; var img = list[i].getElementsByTagName("IMG")[0]; img.className += " thumbimage"; var node = document.createElement("A"); node.href = "/wiki/File:" + img.getAttribute("data-image-name"); node.className = "sprite info-icon"; if (list[i].getElementsByTagName("FIGCAPTION").length <= 0) { list[i].appendChild(document.createElement("FIGCAPTION")); }       list[i].getElementsByTagName("FIGCAPTION")[0].appendChild(node); } }

importArticles({   type: 'script',    articles: [        'u:dev:CategoryRenameAuto-update/code.js',    ] });