Difference between revisions of "Widget:WikiDiagram"

From Audacity Wiki
Jump to: navigation, search
(hack.)
(update)
Line 5: Line 5:
 
<script data-cfasync="false" src="https://wit.audacityteam.org/js/wikidiagrams.js"></script>
 
<script data-cfasync="false" src="https://wit.audacityteam.org/js/wikidiagrams.js"></script>
 
<script>
 
<script>
function foo(){
+
 
 +
function receiveReply(event) {
 +
  var source = event.source;
 +
  console.log("Got Reply:" + event.data );
 +
  var result = document.getElementById("result");
 +
  resetHotspots();
 +
  loadNewDetails( event.data );
 +
}
 +
 
 +
function loaded(win){
 +
  window.addEventListener("message", receiveReply, false);
 +
 
 
   //alert("page loaded");
 
   //alert("page loaded");
 
   A.page="Flow_Chart"
 
   A.page="Flow_Chart"
Line 13: Line 24:
 
   console.log(A.page);
 
   console.log(A.page);
 
   A.SpecName="Foo";
 
   A.SpecName="Foo";
  fileActionLoader( "","","https://wit.audacityteam.org/raw/raw_spec_Flow_Chart.txt");
+
 
  //loadDiagram(A.page, 'no');
+
  var trampoline = document.getElementById("trampoline").contentWindow;
 +
  // Don't care who receiver is, if they give us back a spec
 +
  trampoline.postMessage( "Flow_Chart","*");
 
}
 
}
 +
 
</script>
 
</script>
 +
<iframe id="trampoline" onload="loaded(this)" src="https://wit.audacityteam.org/trampoline.htm" style="display:none"></iframe><br>
 
<div id="content_here" style="text-align:center;">
 
<div id="content_here" style="text-align:center;">
 
</div>
 
</div>
Line 24: Line 39:
 
<div id="tabular_contents"></div>
 
<div id="tabular_contents"></div>
 
<div id="spec" style="margin-left:10px"></div>
 
<div id="spec" style="margin-left:10px"></div>
<img src onerror='foo()'>
 
 
<includeonly>
 
<includeonly>

Revision as of 20:21, 1 December 2019

This runs a script on loading complete