Is there some way to download and store files in a specific, developer-defined location using Opera's user javascript functions?
Thanks.
Is there some way to download and store files in a specific, developer-defined location using Opera's user javascript functions?
Thanks.
http://dev.opera.com/libraries/fileio/docs/overview-summary-file-io.js.dml looks like what you want.
var localDir, remoteFile;
var out = serverDir.open(remoteFile, opera.io.filemode.READ);
var in = clientDir.open(localFile, opera.io.filemode.WRITE);
var line = "";
do {
in.writeLine(line);
line = out.readLine();
} while(line);
in.close();
out.close();
The user has to change their config file to allow for these libraries.
Indeed, a pure JavaScript solution for this is only possible with widgets and Opera 10 and greater. It should be possible to interact with a Java applet the user has granted sufficient privileges to save files though. I've also seen a solution that used a local server which the user.js would talk to - see the "HistoryPlus" script described somewhere in this post:
http://my.opera.com/chooseopera/forums/findpost.pl?id=2669972