custom-protocol-detection
custom-protocol-detection copied to clipboard
More reliable pre-Windows 8 IE checks if navigator.userAgent can also be set by custom protocol handler
Check for custom identifier in navigator.userAgent in pre-Windows 8 IE tests. This works if your custom protocol handler had the ability to add a custom string to the IE userAgent via the Windows registry.
See https://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx
Thanks for the pull request!
Shouldn't a user agent check (if we want that) be applied at the top level instead of within a specific function? Probably we also want to define something more than just a ://
unless it's something standard, which I can't find on the link you provided.
Sorry for the late reply.
My implementation was specific to IE only. E.g. the navigator.userAgent test doesn't work on Chrome.
The implementation uses substr to extract the part before :// from the URI and uses that to compare with navigator.userAgent. So for example if you are testing customprotocol://test , the implementation will look for 'customprotocol' within the userAgent.