I want to create an extension with a protocol handler using firfox addon-sdk. So that if i do shan:something it should redirect to some other url like (www.google.com).
Thanks in advance.
To access Components, i.e. features outside the the SDK modules you will need to use require("chrome") to import those capabilities.
The rest is already covered by the answer that #noitdart linked.
Related
I have a Windows application showing web content using WebKit.
Now I'd like some specific URLs to be handled locally by the application instead of loaded from the server.
Let's say the javascript code of the page tries to request http://example.com/SomeFcgiRequest.fcgi.
This request shall be catched and the data of the response shall be generated by the application.
My idea was to use the WebResourceLoadDelegate for changing the URL scheme to a custom scheme (e.g. custom://example.com/SomeFcgiRequest.fcgi) and register a scheme handler for handling these requests.
There is a way to do it for MacOS/iOS using the WKURLSchemeHandler protocol and registering it with setURLSchemeHandler:forURLScheme:.
For the GTK port I found this.
But I couldn't figure out how this can be done using the Windows port of WebKit. For me it seems to be not (yet) implemented.
Can someone point me in the right direction?
I am writing a custom receiver for chromecast and was wondering if there is a way we can have our own, custom XHR loader functionality rather then the built in goog.net.XhrIo?
Basically I need to override the functionality of goog.net.XhrIo for all segments/fragments and media files.
I need this to send some beacons back to my servers for analytics.
Thanks!
If you are using the Media Player Library (MPL), then you can use skipRequest() and setResponse() to achieve what you want to do. Note that the Host class provides a number of overrides for updating Segments, Manifest, License and Captions request info.
has anyone used the streaming json in nativescript? I found this http://oboejs.com/why but it seems not to work. I'm using nativescript 1.6, any suggestion would be appreciated really much. Thank you.
There is no library to my knowledge currently built for NativeScript that allows streaming JSON. Just for clarification sake you can easily pull JSON from a server and parse it using the built in fetch/http api's, right now -- but their is no way to have it start parsing the json as it downloads in chunks built in.
You can attempt to modify the npm node module to build for NativeScript.
Or thinking outside the box a bit; you can also use the web based version of that module inside the nativescript-webworkers and have it pull and process your JSON and communicate the json messages back to the NS environment. The WebWorkers module actually wraps the native platform's web browser module so it can run all browser based JS code.
Disclaimer: I'm the author of the open source NativeScript-WebWorkers.
Is there any alternative to Set/Get proxy settings in winRT. I need to implement this for a windows store App. I found this link (https://msdn.microsoft.com/en-us/library/windows/apps/hh464945.aspx?f=255&MSPPError=-2147217396 ) but there is nothing mentioned about retrieving proxy settings.
Thanks,
Kunal
We have developed extension addon-sdk with js-ctypes.
Is there anything in firefox what can get some data from external application.
May be need use this https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/test_httpd ?
There are a bunch of possibilities... E.g.
Sockets via nsISocketTransport and/or nsIServerSocket.
HTTP via regular XHR and/or nsIHttpServer (you kinda already found that one).
Lower-level OS APIs via js-ctypes.