I want to add some javascript functionality to confluence pages. For example https://stiltsoft.com/blog/2015/08/confluence-tips-and-tricks-task-lists-and-automatic-calculation/ here. But I dont understand how to make my js script to be executed. Maybe there are some restrictions in confluence.
I've added js just in the end of page in HTML MACRO
Hello,
I'm not sure that it will help you, but on my side it works with the HTML macro on Confluence 6.10.1 with the following script :
<ac:structured-macro ac:name="html"> <ac:plain-text-body><span id="how-many-checked"></span> <script type="text/javascript"> AJS.toInit(function() { var count = AJS.$('li.checked').length; if (count == 1) { AJS.$("#how-many-checked").text(count + " players."); } else { AJS.$("#how-many-checked").text(count + " players."); } }); </script> </ac:plain-text-body> </ac:structured-macro>
I removed the CDATA section as I didn't see why I needed it from the example.
Then, it works as intended by the author :
Maybe you can try the same?
Good luck :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.