Opera의 사용자 JavaScript를 사용하여 로컬로 파일을 저장하는 방법이 있습니까?

StackOverflow https://stackoverflow.com/questions/1203371

  •  05-07-2019
  •  | 
  •  

문제

Opera의 사용자 JavaScript 함수를 사용하여 특정 개발자 정의 위치에 파일을 다운로드하고 저장하는 방법이 있습니까?

감사.

도움이 되었습니까?

해결책

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

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top