The easiest thing to do would use JSconfig.keys.toSource(), and then
wrap it into some some function:
page.save('JSconfig.readFromObject(' + JSconfig.keys.toSource() + ');')
Or maybe we should cache the config in a cookie, and only includePage
the config in case a certain cookie is not set?
Bryan
On 7/5/07, Dschwen <lists(a)schwen.de> wrote:
I'm
implementing a version that stores that settings to the wiki. I
have already implemented an interface to save stuff to the wiki, see
[[MediaWiki:EditPage.js]].
Interesting, let me propose the following:
Let's just use your EditPage interface to generate a .js page with a certain
name as a subpage to the current users userpage, i.e.
User:Blah/jsconfig_settings.js
Create the page such that it contains executable javascript which sets the
variables correctly, i.e. JSconfig.keys['blah'] = 'blubb'; etc..
To restore the saved value we'll just includePage() this page by default.
Should give decent performance.
--
[[:en:User:Dschwen]]
[[:de:User:Dschwen]]
[[:fr:User:Dschwen]]
[[:commons:User:Dschwen]]
_______________________________________________
Commons-l mailing list
Commons-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/commons-l