Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
upgrade tbkjx, fix:added new options for miniapps don't work
Browse files Browse the repository at this point in the history
  • Loading branch information
zimocode committed Oct 16, 2019
1 parent ade7d77 commit e2a68e9
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
8 changes: 4 additions & 4 deletions change.log
Original file line number Diff line number Diff line change
@@ -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.",
Expand Down
14 changes: 12 additions & 2 deletions js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down Expand Up @@ -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){
Expand Down Expand Up @@ -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);
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions js/inject/tbkjx.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit e2a68e9

Please sign in to comment.