Reputation: 1328
I want to build a browser plugin which will save the user selected block of text in a text file on the users local system(or allow the user to download the text file). Is this possible? Can javascript write to files on the clients local system?
If yes, are there any open source plugins that do this?
Upvotes: 0
Views: 1382
Reputation: 6745
I developed an open source extension for this purpose recently, you can download it from:
https://addons.mozilla.org/en-US/firefox/addon/save-text-to-file/
Saves highlighted text to a file in a directory (defaulting to the user's home directory)
After highlighting some text, right-click and select "Save Text to File"
File names have the format userPreference--<todaysdate>-<timestamp>.txt
English (en-US), Chinese (zh-CN), French (fr), German (de), Japanese (ja), Polish (pl) and Spanish (es-ES)
Upvotes: 2