Difference between revisions of "Widget:WikiDiagram"

From Audacity Wiki
Jump to: navigation, search
(updated.)
(update.)
Line 3: Line 3:
  
 
</noinclude><includeonly>
 
</noinclude><includeonly>
<!--{if not $item}-->
 
<script data-cfasync="false" src="https://wit.audacityteam.org/js/wikidiagrams.js?time=1124"></script>
 
<!--{/if}-->
 
  
 
ITEM:<!--{$item}-->
 
ITEM:<!--{$item}-->
  
<div id="content_here0" style="text-align:center;">
+
<div id="content_here" class="atkContentDiv" data-page="<!--{$page|escape:'url'}-->" style="text-align:center;">
 
</div>
 
</div>
  
 +
 +
<!--{if $init}-->
 +
<script data-cfasync="false" src="https://wit.audacityteam.org/js/wikidiagrams.js?time=1125"></script>
  
 
<script>
 
<script>
 
 
function loaded(){
 
function loaded(){
  //alert("page loaded");
+
        var query = window.location.href;
  var A = Annotator[0];
+
        var contentDivs = document.getElementsByClassName( "atkContentDiv" );
  A.page="<!--{$page|escape:'url'}-->"
+
        for(var i=0;i<contentDivs.length;i++){
  createDomElements(A);
+
          var A = makeAnnotator();
  loadDiagram( A.page, "remote" );
+
          A.index = i;
  setInterval(timerCallback, 30);
+
          A.page = getArg(query, 'page'+i) || contentDivs[i].getAttribute("data-page") || "SmallCrowd";
 +
          populateDomElement( A, contentDivs[i] );
 +
          loadDiagram( A, A.page, 'no');
 +
        }
 +
        // Timer is for animation such as rotating earth.
 +
        setInterval(timerCallback, 30);
 
}
 
}
  
 
loaded();
 
loaded();
 
</script>
 
</script>
 +
<!--{/if}-->
  
 
<includeonly>
 
<includeonly>

Revision as of 09:40, 13 December 2019

This runs a script on loading complete