Board Thread:Script Suggestions/@comment-5301680-20170613091505

Hi,

wouldn't it be nice to have a single global namespaced object for config vars needed in scripts configurable on a special page like a key value storage?

For example, AjaxRC uses something like this to configurate the script before initialization:

window.ajaxPages = ["Some Frequently Updated Page"]; window.ajaxSpecialPages = ["Recentchanges", "WikiActivity", "Watchlist", "Log", "Contributions"]; window.ajaxIndicator = 'http://images2.wikia.nocookie.net/__cb20100609110347/software/images/a/a9/Indicator.gif'; window.ajaxRefresh = 30000; window.AjaxRCRefreshText = 'Auto-refresh'; window.AjaxRCRefreshHoverText = 'Automatically refresh the page';

This is ugly when occuring randomly in the Common.js (at worst multiple times at different places). Of course, the best way would be to store it on the server and load it simply server-site, but I was told by the support that they are not going to to this.

The object could be stored in  or   or something with a completely new naming. The page could be namend Special:CustomConfigVars or something similar.

What do you think about that? Thanks in advance for your feedback!

Mfg 