mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-27 23:24:26 +00:00
Fix error when browser doesn't know how to deal with window.navigator.registerProtocolHandler
This commit is contained in:
parent
46fc58f69e
commit
4efada7fd8
@ -377,8 +377,10 @@ function watchHashChange(e)
|
|||||||
function initHashWatching()
|
function initHashWatching()
|
||||||
{
|
{
|
||||||
// Register custom protocol handler
|
// Register custom protocol handler
|
||||||
var local_twister_url = window.location.protocol + '//' + window.location.host + '/home.html#%s';
|
if (window.navigator && window.navigator.registerProtocolHandler){
|
||||||
window.navigator.registerProtocolHandler('web+twister', local_twister_url, 'Twister');
|
var local_twister_url = window.location.protocol + '//' + window.location.host + '/home.html#%s';
|
||||||
|
window.navigator.registerProtocolHandler('web+twister', local_twister_url, 'Twister');
|
||||||
|
}
|
||||||
|
|
||||||
// Register hash spy and launch it once
|
// Register hash spy and launch it once
|
||||||
window.addEventListener('hashchange', watchHashChange, false);
|
window.addEventListener('hashchange', watchHashChange, false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user