Conversation
In browsers, userscripts can make cross-origin http requests by using the Grease Monkey API, "GM_xmlHttpRequest". This change provides a similar capability to scripts in TornPDA. It adds two javascript functions, PDA_httpGet and PDA_httpPost, that scripts can call to make cross-origin requests using the two most common http methods. The javascript calls are routed through InAppWebView to dart handlers that delegate to the http package. Responses are returned asynchronously to javascript as objects that resemble those returned by the GM api.
Add a tip on the tips page that makes users aware of the API. The tip includes a link to github where they can view the details. Update userscripts/README.md to note the capabilities of the API and link to the API js file, where developers can see function definitions.
Add Javascript API for userscripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.