MediaWiki:Common.js: Difference between revisions
no edit summary
Piranhaplant (talk | contribs) No edit summary |
Piranhaplant (talk | contribs) No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 2:
function runUntilSuccess(f) {
(function run() {
if (!f()) {
setTimeout(run, 10);
}
Line 14 ⟶ 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 29 ⟶ 27:
}
return true;
});*/
// Add the ending address to the length column
Line 50 ⟶ 48:
// Modify BPMN chart embeds to be just the SVG
runUntilSuccess(function() {
if (document.getElementsByClassName("bpmn_embed").length > 0) {
var canvas = document.getElementById("canvas");
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);
|