This repository was archived by the owner on May 22, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// Check whether new version is installed
22chrome . runtime . onInstalled . addListener ( function ( details ) {
3- var newURL = "http://chessbot-jfkz.c9users.io /installed.html" ;
4- // var newURL = "http://re-coders.com/chessbot/installed.html" ;
5- var hash = "#thisVersion=" + chrome . runtime . getManifest ( ) . version ; ;
3+ var newURL = "http://re-coders.com/chessbot /installed.html" ;
4+ var currentVersion = chrome . runtime . getManifest ( ) . version ;
5+ var hash = "#thisVersion=" + currentVersion ;
66 if ( details . reason == "install" ) {
77 hash += "&action=install" ;
88 chrome . tabs . create ( { url : newURL + hash } ) ;
99 } else if ( details . reason == "update" ) {
10- hash += "&action=update&previousVersion=" + details . previousVersion ;
11- chrome . tabs . create ( { url : newURL + hash } ) ;
10+ if ( currentVersion !== details . previousVersion ) {
11+ hash += "&action=update&previousVersion=" + details . previousVersion ;
12+ chrome . tabs . create ( { url : newURL + hash } ) ;
13+ }
1214 }
1315} ) ;
You can’t perform that action at this time.
0 commit comments