File tree Expand file tree Collapse file tree 7 files changed +21
-23
lines changed
Expand file tree Collapse file tree 7 files changed +21
-23
lines changed Original file line number Diff line number Diff line change @@ -223,11 +223,10 @@ textarea {
223223 background-color : rgb (26 , 115 , 232 );
224224 border-radius : 3px ;
225225}
226- # fileSize {
226+ # fileSize {
227227 margin-left : 20px ;
228228}
229229
230-
231230/* JSON格式化 */
232231/* Root element */
233232.json-document {
Original file line number Diff line number Diff line change @@ -203,4 +203,4 @@ body {
203203}
204204# getMediaInfo {
205205 width : 100% ;
206- }
206+ }
Original file line number Diff line number Diff line change @@ -420,12 +420,12 @@ function SetIcon(obj) {
420420 obj . tips = obj . tips ? "/img/icon-tips.png" : "/img/icon.png" ;
421421 chrome . action . setIcon ( { path : obj . tips } ) ;
422422 } else if ( obj . number == 0 || obj . number == undefined ) {
423- chrome . action . setBadgeText ( { text : "" , tabId : obj . tabId } ) ;
424- chrome . action . setTitle ( { title : "还没闻到味儿~" , tabId : obj . tabId } ) ;
423+ chrome . action . setBadgeText ( { text : "" , tabId : obj . tabId } , function ( ) { if ( chrome . runtime . lastError ) { return ; } } ) ;
424+ chrome . action . setTitle ( { title : "还没闻到味儿~" , tabId : obj . tabId } , function ( ) { if ( chrome . runtime . lastError ) { return ; } } ) ;
425425 } else {
426426 obj . number = obj . number > 99 ? "99+" : obj . number . toString ( ) ;
427- chrome . action . setBadgeText ( { text : obj . number , tabId : obj . tabId } ) ;
428- chrome . action . setTitle ( { title : "抓到 " + obj . number + " 条鱼" , tabId : obj . tabId } ) ;
427+ chrome . action . setBadgeText ( { text : obj . number , tabId : obj . tabId } , function ( ) { if ( chrome . runtime . lastError ) { return ; } } ) ;
428+ chrome . action . setTitle ( { title : "抓到 " + obj . number + " 条鱼" , tabId : obj . tabId } , function ( ) { if ( chrome . runtime . lastError ) { return ; } } ) ;
429429 }
430430}
431431
@@ -489,7 +489,7 @@ function clearRedundant() {
489489 for ( let item of tabs ) {
490490 allTabId . push ( item . id ) ;
491491 }
492- if ( ! cacheData . init ) {
492+ if ( ! cacheData . init ) {
493493 // 清理 缓存数据
494494 for ( let key in cacheData ) {
495495 if ( ! allTabId . includes ( parseInt ( key ) ) ) {
Original file line number Diff line number Diff line change @@ -35,17 +35,17 @@ if (typeof (browser) == "object") {
3535 chrome . scripting . executeScript = ( obj ) => {
3636 // console.log(obj);
3737 // if(obj.files[0]){
38- // browser.tabs.executeScript(obj.target.tabId, {
39- // allFrames: true,
40- // file: obj.files[0],
41- // runAt: "document_start",
42- // matchAboutBlank: true
43- // });
44- // browser.contentScripts.register({
45- // "js": [{file: obj.files[0]}],
46- // "runAt": "document_start",
47- // "allFrames": obj.target.allFrames,
48- // });
38+ // browser.tabs.executeScript(obj.target.tabId, {
39+ // allFrames: true,
40+ // file: obj.files[0],
41+ // runAt: "document_start",
42+ // matchAboutBlank: true
43+ // });
44+ // browser.contentScripts.register({
45+ // "js": [{file: obj.files[0]}],
46+ // "runAt": "document_start",
47+ // "allFrames": obj.target.allFrames,
48+ // });
4949 // }
5050 return ;
5151 }
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ $(function () {
3737 } ]
3838 } ) ;
3939 }
40-
40+
4141 $ . ajax ( {
4242 url : url ,
4343 dataType : "text" ,
Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ $(function () {
8484 getM3u8Content ( ) ;
8585 return ;
8686 }
87- file_name = GetFileName ( m3u8_url , true ) ;
8887 downloadFile ( ) ;
8988 return ;
9089 } ) ;
@@ -132,7 +131,7 @@ $(function () {
132131 }
133132 // 返回上一页
134133 $ ( "#historyBack" ) . click ( function ( ) {
135- if ( window . history . length > 1 ) {
134+ if ( window . history . length > 1 ) {
136135 window . history . back ( ) ;
137136 }
138137 window . location . href = "/m3u8.html" ;
Original file line number Diff line number Diff line change @@ -425,7 +425,7 @@ function isJSON(data) {
425425 return false ;
426426}
427427function isPicture ( data ) {
428- if ( data . type && data . type . split ( "/" ) [ 0 ] == "image" ) {
428+ if ( data . type && data . type . split ( "/" ) [ 0 ] == "image" ) {
429429 return true ;
430430 }
431431 if ( data . ext == "jpg" ||
You can’t perform that action at this time.
0 commit comments