Last modified: 2014-08-29 08:30:18 UTC
It should be possible to write extensions to Huggle also in JS rather than c++ and python. Some advantages of doing so: 1. It could be awesome to reuse gadgets and user-scripts code. (such as twinkle) 2. It can be deployed/installed in much more dynamic sense Design 1. User:MyUseName/huggle3.css - add some section for "JS extensions" 2. On application load those extensions JS 3. Use some JS engine (V8??) to run them independently of the view (or dependently with the browser object?) and once regular extensions are called, evaluate in the JS engine to call the scripts. An example to JS: huggle.hook('delete').add(function(e){ var api=new mw.Api({...});//or huggle.Api that already fills the tokens? api.post({ action: 'edit', ... text: e.title, token: e.token }) }); e.preventDefault();//override default behavior of huggle delete });
some suggestion how would that be done? is there some open source cross platform JS interpretor library for C or C++?
https://code.google.com/p/v8/ ?