This repository was archived by the owner on Mar 22, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1818 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1919 */
2020
21- // TODO: LocalStorage support for Firefox (how does this work here?)
2221
2322var interruptDownloads = true ;
2423var ugetWrapperNotFound = true ;
5958 current_browser . runtime . getBrowserInfo ( ) . then (
6059 function ( info ) {
6160 if ( info . name === 'Firefox' ) {
62- firefoxVersion = info . version . replace ( / [ a b ] \d + / , '' ) ;
61+ // Convert version string to int
62+ firefoxVersion = parseInt ( info . version . replace ( / [ a b ] \d + / , '' ) . split ( '.' ) [ 0 ] ) ;
6363 }
6464 }
6565 ) ;
7171
7272chromeVersion = parseInt ( chromeVersion ) ;
7373sendMessageToHost ( {
74- version : "2.0.6 "
74+ version : "2.0.7 "
7575} ) ;
7676
7777// Read the local storage for excluded keywords
@@ -152,6 +152,10 @@ current_browser.downloads.onCreated.addListener(function(downloadItem) {
152152 return ;
153153 }
154154
155+ if ( "in_progress" !== downloadItem [ 'state' ] . toString ( ) . toLowerCase ( ) ) {
156+ return ;
157+ }
158+
155159 var fileSize = downloadItem [ 'fileSize' ] ;
156160
157161 var url = '' ;
@@ -174,7 +178,7 @@ current_browser.downloads.onCreated.addListener(function(downloadItem) {
174178 } ) ;
175179
176180 message . url = url ;
177- message . filename = downloadItem [ 'filename' ] ;
181+ message . filename = downloadItem [ 'filename' ] . replace ( / ^ . * [ \\ \/ ] / , '' ) ;
178182 message . filesize = fileSize ;
179183 message . referrer = downloadItem [ 'referrer' ] ;
180184 current_browser . cookies . getAll ( { 'url' : extractRootURL ( url ) } , parseCookies ) ;
Original file line number Diff line number Diff line change 4949 " storage" ,
5050 " cookies"
5151 ],
52- "version" : " 2.0.6 "
52+ "version" : " 2.0.7 "
5353}
Original file line number Diff line number Diff line change 2828< body >
2929 < div id ="parent-container ">
3030 < div id ="title-container ">
31- < img id ="img-icon " src ="icon_32.png " /> < span > uGet Integration 2.0.6 </ span >
31+ < img id ="img-icon " src ="icon_32.png " /> < span > uGet Integration 2.0.7 </ span >
3232 </ div >
3333 < hr >
3434 < label id ="info "> </ label > < label id ="error "> </ label > < label id ="warn "> </ label >
You can’t perform that action at this time.
0 commit comments