Groups > Browsers > Opera browser whish list > Allow user Javascript to execute programs via opera.action(str)




Allow user Javascript to execute programs via
opera.action(str)

Allow user Javascript to execute programs via opera.action(str)
Wed, 02 Jan 2008 21:44:46 -000
Would it be a step too far to allow user Javascripts to run programs or  
use any of the native Opera functions that you can assign to hotkeys and  
menu setups?

I have a situation where I'd like to be able to right click on a link,  
then have a custom menu item that runs a user javascript function which  
takes the URL of that link as an argument, downloads the file using  
XMLHttpRequest and then gets some strings from its contents before finally  
running an external program that uses those strings as arguments.

At the moment I can have a menu item to download the file and parse it -  
OR run an external program - but I can't think of a way to combine both  
actions into a single menu click.

A proprietary function like opera.action() would be nice:

opera.action('Zoom in, 10')
opera.action('Set alignment, "personalbar", 6 | Set alignment,  
"personalbar", 0')

str="Copy link & Execute program, \"C:\\Browsers\\MSIE  
5.0.lnk\",\"%c\",,\"ie\""
opera.action(str)

This function would make Opera a much stronger application platform for  
mobiles/embedded and desktops alike, providing the security implications  
were acceptable or it was implemented in a security concious way. (i.e.,  
don't allow remote scripts to run opera.action() unless site preferences  
have a javascript security setting/level lowered - and that setting should  
not appear in the GUI. That way Intranet admins can tweak the INI files  
Post Reply
about | contact