WASH-SE: jsin / insmod
A few days ago S. Sriram sent an interesting addition for WASH-SE in the form of 'jsin' - a new builtin for WASH-SE. While cutting code away from the Atomic OS 1.0.x series, the version that would've become 1.1 had a similar command, modeled loosely after the linux command 'insmod.' In 1.1 the command was stored as a microfile.
Jsin/insmod's purpose is to load additional scripts (and JSON objects! =) into running web applications.
Follow up:
If you have the WASH-SE code, you can add the command by inserting this code into the switch(cmd.toLowerCase()) section of WASH.exec:
case 'jsin':
case 'insmod':
Console.print("loading js script.. " + argv[1] + "\n");
var d=document;
var s=d.createElement('script');
try{
s.type='application/javascript';
s.src= argv[1];
d.getElementsByTagName('head')[0].appendChild(s);}
catch(e){
Console.print("Error in loading..\n");}
Console.print("loaded..");
break;
In the small package that was sent there is also the interesting capability of using WASH as a Firefox bookmarklet - something akin to the Greasemonkey plugin.
Feel free to try these features out or download the small washbm.tar.gz or washbm.zip packages.
Thanks again S.S.!
09/13/08 11:30:57 pm,