MediaWiki:Common.js: Difference between revisions
Content added Content deleted
Piranhaplant (talk | contribs) No edit summary |
Piranhaplant (talk | contribs) No edit summary |
||
Line 48: | Line 48: | ||
// Modify BPMN chart embeds to be just the SVG |
// Modify BPMN chart embeds to be just the SVG |
||
runUntilSuccess(function() { |
runUntilSuccess(function() { |
||
console.log("Checking for BPMN"); |
|||
if (document.getElementsByClassName("bpmn_embed").length > 0) { |
if (document.getElementsByClassName("bpmn_embed").length > 0) { |
||
console.log("BPMN found"); |
|||
var canvas = document.getElementById("canvas"); |
var canvas = document.getElementById("canvas"); |
||
var parent = canvas.parentElement; |
var parent = canvas.parentElement; |
||
var svgs = canvas.getElementsByTagName("svg"); |
var svgs = canvas.getElementsByTagName("svg"); |
||
if (svgs.length == 0) { |
if (svgs.length == 0) { |
||
console.log("No SVG found"); |
|||
return false; |
return false; |
||
} |
} |
||
console.log("SVG found"); |
|||
clone = svgs[0].cloneNode(true); |
clone = svgs[0].cloneNode(true); |