Board Thread:Support Requests - Getting Technical/@comment-24531999-20151205193601/@comment-1757994-20151205230324

The only way I can think at the moment is to hack MediaWiki:Common.js/calc.js to allow you to pass it a callback, which in this case would be your code in #1. Then when the Ajax call which calculates the table returns with a successful result, it would display the table and call the callback, if it exists.

There are 2 ways to do such a hack.

1. Write JavaScript straight into the configuration like ...  template = ArtilleryHTKCalc form     = arthtkin result   = arthtkout param    = Building|Target Building|Sniper Tower|select|blah blah blah param    = BHBonus|Building Health Statue Bonus|0|string| callback = function  { /* some code here */ } &lt;/pre> ... and then in calc.js, do

2. Enter a function name, previously defined in your site JavaScript ...  template = ArtilleryHTKCalc form     = arthtkin result   = arthtkout param    = Building|Target Building|Sniper Tower|select|blah blah blah param    = BHBonus|Building Health Statue Bonus|0|string| callback = someFunction &lt;/pre> ... and then in calc.js, do.

Neither one of those things is a good idea. I'd expect Wikia reviewers to reject them (assuming the reviewers are awake enough to understand what you're doing when they read the code).