From e2a68e97737993384575785bd82819387042a73a Mon Sep 17 00:00:00 2001 From: zimocode Date: Wed, 16 Oct 2019 21:41:47 +0800 Subject: [PATCH] upgrade tbkjx, fix:added new options for miniapps don't work --- change.log | 8 ++++---- js/background.js | 14 ++++++++++++-- js/inject/tbkjx.js | 3 +++ manifest.json | 2 +- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/change.log b/change.log index 71e8eb4..36b9ef7 100644 --- a/change.log +++ b/change.log @@ -1,15 +1,15 @@ { "log": [ { - "ver":"6.5.1341.1024", - "date":"2019.10.09", + "ver":"6.5.1348.1026", + "date":"2019.10.16", "content":[ "upgrade tbkjx", - "fix bug: action closeapps" + "fix bug: action closeapps, added new options for miniapps don't work" ] }, { - "ver":"6.5.1240.1024", + "ver":"6.5.1240.1020", "date":"2019.09.26", "content":[ "new mini-apps: homepage,tbkjx.", diff --git a/js/background.js b/js/background.js index c73468f..69ed455 100644 --- a/js/background.js +++ b/js/background.js @@ -856,7 +856,7 @@ var appConfmodel={ synced:{n_closebox:true}, jslist:{n_closebox:true}, homepage:{n_optype:"s_new",n_position:"s_default",n_pin:false,n_closebox:true,n_homepage_icon:true,n_homepage_bg:true,n_homepage_resize:true,type:"topsites",site:[{title:"Google",url:"https://www.google.com"}]}, - tbkjx:{n_num:50} + tbkjx:{n_num:50,n_optype:"s_new",n_position:"s_default",n_pin:false} } var sub={ @@ -1165,6 +1165,12 @@ var sub={ if(!config.apps[appname]){ config.apps[appname]=appConfmodel[appname]; chrome.storage.sync.set(JSON.parse(JSON.stringify(config)),function(){}); + }else{ + for(var i in appConfmodel[appname]){ + if(config.apps[appname][i]===undefined){ + config.apps[appname][i]=appConfmodel[appname][i]; + } + } } }, insertTest:function(appname){ @@ -4287,7 +4293,11 @@ var sub={ // }) }, itemOpen:function(message,sender,sendResponse){ - sub.open(message.value); + let _URL=message.value, + _Target=config.apps[message.app].n_optype, + _Index=sub.getIndex(config.apps[message.app].n_position,"new")[0], + _Pin=config.apps[message.app].n_pin; + sub.open(_URL,_Target,_Index,_Pin); } } } diff --git a/js/inject/tbkjx.js b/js/inject/tbkjx.js index 2fe8d8b..6fd83dc 100644 --- a/js/inject/tbkjx.js +++ b/js/inject/tbkjx.js @@ -12,6 +12,9 @@ sue.apps.tbkjx={ ], options:[ {type:"range",label:"app_tbkjx_num",name:"n_num",min:10,max:100,step:10}, + {type:"select",label:"n_optype",name:"n_optype",value:["s_new","s_back","s_current","s_incog"]}, + {type:"select",label:"n_position",name:"n_position",value:["s_default","s_left","s_right","s_head","s_last"]}, + {type:"checkbox",label:"n_pin",name:"n_pin",checked:true} ] } sue.apps.init(); diff --git a/manifest.json b/manifest.json index b197110..ed6fe6f 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "minimum_chrome_version": "22", "name": "smartUp Gestures(Beta)", "short_name":"smartUp", - "version": "6.5.1341.1025", + "version": "6.5.1348.1026", "description": "__MSG_ext_des__", "default_locale": "en", "author":"zimo",