MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 12:
 
// Sort table by the first column
/*runUntilSuccess(function() {
var tables = document.getElementsByClassName("ram_rom_map");
for (var i = 0; i < tables.length; i++) {
Line 27:
}
return true;
});*/
 
// Add the ending address to the length column
Line 52:
var parent = canvas.parentElement;
var svgs = canvas.getElementsByTagName("svg");
if (svgs.length == 0 || svgs[0].getAttribute("data-element-id") == null) {
return false;
}
var clone = svgs[0].cloneNode(true);
canvas.remove();
parent.appendChild(clone);
var bbox = clone.getBBox();
clone.setAttribute("width", `${bbox.width} + "px`");
clone.setAttribute("height", `${bbox.height} + "px`");
clone.setAttribute("viewBox", `${bbox.x} ${+ " " + bbox.y} ${+ " " + bbox.width} ${+ " " + bbox.height}`);
}
return true;