Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Sorry to answer my own question but I've now discovered that method of deleting "backgroundColor: nnnn" in the Swiffy output has been broken by Google in the current version of the Swiffy runtime. If you also revert to the previous version of the runtime by changing:</p> <p>src="https://www.gstatic.com/swiffy/v5.2/runtime.js"</p> <p>to</p> <p>src="https://www.gstatic.com/swiffy/v5.1/runtime.js"</p> <p>at the top of the file you should find that the transparent background works correctly.</p> <p>EDIT: It has been pointed out by Michael Prescott that this solution won't work reliably because of a mismatch between the Swiffy converter version and the runtime. An alternative solution that doesn't depend on the presence of the 5.1 exporter is to build on the other solutions suggested here. Try adding the following function to the script. It polls to see when the Swiffy object has installed it's preferred background color and then it replaces it. </p> <pre><code>(function() { var firstNode=document.getElementById('swiffycontainer').childNodes[1]; //firstNode.style.visibility = "hidden"; if (firstNode.style.background=="") { setTimeout(arguments.callee, 10); } else { firstNode.style.background = "none"; //firstNode.style.visibility = "visible"; } })(); </code></pre> <p>This doesn't seem to show a glitch when Swiffy first sets a solid background and then it gets replaced. However to be more certain you can enable the commented out lines to hide the first node until the correct transparency has been set.</p> <p>best regards</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload