-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ctrl+S: save JSON instead of HTML content #62
Comments
I agree, it'd be really nice, but I don't know how to make Firefox do that. A PR that added this feature would be great, though! |
Unfortunately, I don't know how to write FF extensions. In a normal web page I would use the following snippet:
While this does not bring up the native save dialog of FF, it allows to save the file contents to disk. |
As a workaround, I just "View Page Source" and copy the original JSON content from there :) |
Thanks for the hint. Makes life much easier :) |
I haven't had experience with this either, but I found some useful resources if someone wants to tackle this issue: "The file picker component, nsIFilePicker, can be used to open standard Open / Save dialogs" "Use of OS.File is preferred. Only use these legacy interfaces if OS.File is not available to you." |
Any solution would have to work for the "File > Save" menu item as well as the Cmd-S shortcut. |
How about adding shortcut to toggle addon? With page auto update, so when add-on off - we see raw json, and when on - nice html view. Also, as option, icon, like one from ff customize menu, could be added to toggle view mode |
That would be a different feature request than this, but it's also not the sort of thing I'd add to the extension. |
As far as I know it's not possible to alter "File -> Save"s functionality, my idea is to add a button/link somewhere in the page, or a button in the toolbar / urlbar which would feel more native. A contextmenu item would work, too. Alternatively, we could add a custom shortcut for that something like If you agree, I will work on it. |
@mdibaiee I think using |
This appears to have been fixed at the platform level in Firefox. Save now saves the original document. |
It would be great if I could save a JSON file by hitting the Ctrl+S shortcut.
Right now, this saves the rendered HTML. But I would like to save the original JSON file contents
The text was updated successfully, but these errors were encountered: