Difference between revisions of "Widget:WikiDiagram"
From Audacity Wiki
(updated.) |
(update.) |
||
Line 3: | Line 3: | ||
</noinclude><includeonly> | </noinclude><includeonly> | ||
− | |||
− | |||
− | |||
ITEM:<!--{$item}--> | ITEM:<!--{$item}--> | ||
− | <div id=" | + | <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(){ | ||
− | + | var query = window.location.href; | |
− | + | var contentDivs = document.getElementsByClassName( "atkContentDiv" ); | |
− | + | for(var i=0;i<contentDivs.length;i++){ | |
− | + | var A = makeAnnotator(); | |
− | + | A.index = i; | |
− | + | 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
|