This repository was archived by the owner on Apr 3, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-27
lines changed
Expand file tree Collapse file tree 2 files changed +9
-27
lines changed Original file line number Diff line number Diff line change 5555
5656 window . netcode . isNativeHelperInstalled ( function ( err , isInstalled ) {
5757 if ( ! isInstalled ) {
58- $ ( "#netcode_presence" ) . html ( "<b>Missing Helper</b> (<a href=\"https://github.com/RedpointGames/netcode.io-browser/releases/tag/latest\" target=\"_blank\">install the native helper </a>, reload page after install )" ) ;
58+ $ ( "#netcode_presence" ) . html ( "<b>Missing Helper</b> (fix it by going to the <a href=\"/\">home page </a>)" ) ;
5959 return ;
6060 }
6161
100100 } ) ;
101101 } ) ;
102102 } else {
103- $ ( "#netcode_presence" ) . html ( "<b>Not Installed</b> (" ) ;
104-
105- if ( chrome && chrome . webstore && chrome . webstore . install && chrome . app ) {
106- if ( ! chrome . app . isInstalled ) {
107- var presence = $ ( "#netcode_presence" ) ;
108- presence . append (
109- $ ( "<a></a>" )
110- . attr ( "href" , "https://chrome.google.com/webstore/detail/hpecmifakhimhidjpcpjmihpacijicbd" )
111- . attr ( "target" , "_blank" )
112- . click ( function ( e ) {
113- chrome . webstore . install (
114- "https://chrome.google.com/webstore/detail/hpecmifakhimhidjpcpjmihpacijicbd" ,
115- function ( ) {
116- // Reload after install.
117- location . reload ( ) ;
118- } ,
119- function ( ) {
120- e . preventDefault ( ) ;
121- } ) ;
122- } )
123- . text ( "install the extension for your browser" ) ) ;
124- presence . append ( ", reload page after install)" ) ;
125- }
126- }
103+ $ ( "#netcode_presence" ) . html ( "<b>Not Installed</b> (fix it by going to the <a href=\"/\">home page</a>)" ) ;
127104 }
128105 } , 500 ) ;
129106 } ) ;
Original file line number Diff line number Diff line change 7474 "href=\"/basic\" role=\"button\">Try demo »</a>" ) ;
7575 } ) ;
7676 } else {
77+ var target = "https://chrome.google.com/webstore/detail/hpecmifakhimhidjpcpjmihpacijicbd" ;
78+ if ( navigator . userAgent . indexOf ( "Firefox" ) > - 1 ) {
79+ target = "https://addons.mozilla.org/en-US/firefox/addon/netcode-io/" ;
80+ }
81+
7782 $ ( "#info" ) . html (
7883 "<h1>Missing extension</h1>" +
7984 "<p>To add support for netcode.io in your browser, you first need " +
8085 "to install the netcode.io extension.</p>" +
8186 "<p><a id=\"ext_install\" class=\"btn btn-lg btn-primary\" " +
82- "href=\"https://chrome.google.com/webstore/detail/hpecmifakhimhidjpcpjmihpacijicbd \" " +
87+ "href=\"" + target + " \" " +
8388 "target=\"_blank\" role=\"button\">Install extension »</a>" ) ;
84-
89+
8590 if ( chrome && chrome . webstore && chrome . webstore . install && chrome . app ) {
8691 if ( ! chrome . app . isInstalled ) {
8792 var ext_install = $ ( "#ext_install" ) ;
You can’t perform that action at this time.
0 commit comments