diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 58a8288..5e44844 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -153,7 +153,7 @@ "message": "Settings" }, "stnm_function": { - "message": "Features ON" + "message": "Features" }, "stnm_opts": { "message": "Settings of Options Page" @@ -807,7 +807,7 @@ "message": "Appearance" }, "fnswitch": { - "message": "Features ON" + "message": "Features" }, "searchmgr": { "message": "Search Engines" @@ -1418,5 +1418,26 @@ }, "center":{ "message":"CENTER" + }, + "mergewin":{ + "message":"Merge all Windows" + }, + "n_winstate":{ + "message":"Window State:" + }, + "s_minimized":{ + "message":"Minimized" + }, + "s_maximized":{ + "message":"Maximized" + }, + "s_fullscreen":{ + "message":"Fullscreen" + }, + "ext_issue":{ + "message":"Issues:" + }, + "ext_allver":{ + "message":"All versions:" } } \ No newline at end of file diff --git a/_locales/it/messages.json b/_locales/it/messages.json index 0f51463..05830d2 100644 --- a/_locales/it/messages.json +++ b/_locales/it/messages.json @@ -1387,5 +1387,26 @@ }, "center":{ "message":"CENTER" + }, + "mergewin":{ + "message":"Merge all Windows" + }, + "n_winstate":{ + "message":"Window State:" + }, + "s_minimized":{ + "message":"Minimized" + }, + "s_maximized":{ + "message":"Maximized" + }, + "s_fullscreen":{ + "message":"Fullscreen" + }, + "ext_issue":{ + "message":"Issues:" + }, + "ext_allver":{ + "message":"All versions:" } } \ No newline at end of file diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json index 8bbe83b..4226ca8 100644 --- a/_locales/ru/messages.json +++ b/_locales/ru/messages.json @@ -1390,5 +1390,26 @@ }, "center":{ "message":"CENTER" + }, + "mergewin":{ + "message":"Merge all Windows" + }, + "n_winstate":{ + "message":"Window State:" + }, + "s_minimized":{ + "message":"Minimized" + }, + "s_maximized":{ + "message":"Maximized" + }, + "s_fullscreen":{ + "message":"Fullscreen" + }, + "ext_issue":{ + "message":"Issues:" + }, + "ext_allver":{ + "message":"All versions:" } } \ No newline at end of file diff --git a/_locales/zh_CN/messages.json b/_locales/zh_CN/messages.json index f60f1ea..832576e 100644 --- a/_locales/zh_CN/messages.json +++ b/_locales/zh_CN/messages.json @@ -1390,5 +1390,26 @@ }, "center":{ "message":"居中" + }, + "mergewin":{ + "message":"合并所有窗口" + }, + "n_winstate":{ + "message":"窗口状态:" + }, + "s_minimized":{ + "message":"最小化" + }, + "s_maximized":{ + "message":"最大化" + }, + "s_fullscreen":{ + "message":"全屏" + }, + "ext_issue":{ + "message":"问题反馈:" + }, + "ext_allver":{ + "message":"所有版本:" } } \ No newline at end of file diff --git a/_locales/zh_TW/messages.json b/_locales/zh_TW/messages.json index c997910..2d4fd49 100644 --- a/_locales/zh_TW/messages.json +++ b/_locales/zh_TW/messages.json @@ -1387,5 +1387,26 @@ }, "center":{ "message":"CENTER" + }, + "mergewin":{ + "message":"Merge all Windows" + }, + "n_winstate":{ + "message":"Window State:" + }, + "s_minimized":{ + "message":"Minimized" + }, + "s_maximized":{ + "message":"Maximized" + }, + "s_fullscreen":{ + "message":"Fullscreen" + }, + "ext_issue":{ + "message":"Issues:" + }, + "ext_allver":{ + "message":"All versions:" } } \ No newline at end of file diff --git a/change.log b/change.log index 36950fa..b583537 100644 --- a/change.log +++ b/change.log @@ -1,5 +1,14 @@ { "log": [ + { + "ver":"6.1.645.828", + "date":"2018.05.27", + "content":[ + "new action: merge all windows", + "change part of interface: about, features on", + "fix bug: icon actions cant work, option- Set the last action as default one cant work" + ] + }, { "ver":"6.0.625.820", "date":"2018.05.09", diff --git a/css/options.css b/css/options.css index e89f570..e926aa3 100644 --- a/css/options.css +++ b/css/options.css @@ -1361,6 +1361,52 @@ select:hover{ margin: 2px 0; } +#about_main{ + +} +#abmain_log{ + display: block; + float: left; + height: 64px; +} +#abmain_title{ + padding: 5px 70px; +} +#abmain_name{ + font-size: 16px; +} +#abmain_des{ + font-size: 12px; +} + +#about_info{ + padding: 10px +} +#about_info div{ + background-size: contain; + background-repeat: no-repeat; + padding-left: 24px; + height: 16px; + line-height: 16px; + margin: 5px 0; +} +#abinfo_git{ + background-image: url(../image/github.svg); +} +#abinfo_fb{ + background-image: url(../image/issue.svg); +} +#abinfo_ver,#abinfo_vers{ + background-image: url(../image/version.svg); +} + +#about_des{ + font-size: 12px; + line-height: 14px; + color: #444; + margin: 10px 0; +} + #about_box{ /*width:660px;*/ /*margin:0 auto;*/ diff --git a/html/options.html b/html/options.html index 12ea057..0174459 100644 --- a/html/options.html +++ b/html/options.html @@ -82,7 +82,11 @@
Loading
+
-
+
+
+
+
+

@@ -114,11 +118,11 @@
-
+ +
    @@ -133,7 +137,7 @@
    -
    +
      @@ -141,7 +145,7 @@
      -
      +
      @@ -150,7 +154,7 @@
      -
      +
        @@ -163,7 +167,7 @@
        -->
        -
        +

        @@ -192,7 +196,7 @@
        -
        +

        @@ -211,11 +215,11 @@
        -
        +
        -
        +
          @@ -223,7 +227,7 @@
          -
          +

          @@ -254,25 +258,25 @@
          -
          +
            -
            +
              -
              +
                -
                +

                @@ -304,11 +308,11 @@
                -
                +
                -
                +
                  @@ -316,7 +320,7 @@
                  -
                  +
                    @@ -324,7 +328,7 @@
                    -
                    +
                      @@ -333,7 +337,7 @@
                      -
                      +
                      xx
                      @@ -349,7 +353,7 @@
                      -
                      +
                      @@ -376,7 +380,7 @@
                      -
                      +

                      @@ -388,7 +392,7 @@
                      -
                      +
                        @@ -397,7 +401,7 @@
                        -
                        +

                        @@ -408,7 +412,7 @@
                        -
                        +
                          @@ -416,7 +420,7 @@
                          -
                          +
                          @@ -427,7 +431,7 @@
                          -
                          +
                            @@ -435,7 +439,7 @@
                            -
                            +
                            @@ -449,23 +453,46 @@
                            -
                            +
                            -
                            +
                              -
                              +
                              +
                              -
                              +
                              + +
                              + title
                              + des +
                              +
                              +
                              +
                              +
                              Ver
                              +
                              smartUp@GitHub: zimocode/smartup
                              + + +
                              +
                              + smartUp Gestures does not track you or insert ads into webpages.
                              + smartUp Gestures is licensed under the Apache License 2.0 . +
                              +
                              @@ -498,19 +525,14 @@ - +
                              Beta version(Chrome) https://chrome.google.com/webstore/detail/jbfidehpoofganklkddfkcjeeaabimmb
                              -
                              - -
                              +
                              +
                              -->
                              -
                              +
                              Want this extension to show in your native language? If you are familiar with English, you can help us translate this extension into your native language. Please contact us by email: crexme@gmail.com .
                              @@ -532,7 +554,7 @@
                              -
                              +
                                @@ -559,7 +581,7 @@
                              -
                              +
                              diff --git a/image/github.svg b/image/github.svg new file mode 100644 index 0000000..cb01640 --- /dev/null +++ b/image/github.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/image/issue.svg b/image/issue.svg new file mode 100644 index 0000000..a618916 --- /dev/null +++ b/image/issue.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/image/version.svg b/image/version.svg new file mode 100644 index 0000000..d830ffd --- /dev/null +++ b/image/version.svg @@ -0,0 +1,9 @@ + + + + + diff --git a/js/actions.js b/js/actions.js index 4f1d0cc..4af26ee 100644 --- a/js/actions.js +++ b/js/actions.js @@ -39,7 +39,8 @@ let actions={ {name:"closewin",selects:["n_win"]}, {name:"max"}, {name:"min"}, - {name:"full"} + {name:"full"}, + {name:"mergewin",selects:["n_winstate"]}//Maximize the window after merging,Window state ], [//group txt {name:"copytxt"}, @@ -207,6 +208,7 @@ let actionOptions={ n_win:["s_current","s_all","s_others"], n_wintype:["s_normal","s_popup","s_panel","s_detached_panel"], n_winincog:["s_no","s_yes"], + n_winstate:["s_normal","s_minimized","s_maximized","s_fullscreen"], n_reload_clear:["s_no","s_yes"], n_close_sel:["s_default","s_left","s_right","s_head","s_last"], diff --git a/js/background.js b/js/background.js index caa0d81..f24693b 100644 --- a/js/background.js +++ b/js/background.js @@ -950,7 +950,7 @@ var sub={ } console.log(selObj) sub.message={type:"action_ctm",selEle:selObj} - sub.initCurrent(null,theConf); + sub.initCurrent(null,sub.theConf); break; } } @@ -1210,10 +1210,10 @@ var sub={ } } sub.theConf=theConf; - return theConf; + return sub.theConf; }, initCurrent:function(sender,theConf){ - sender?sub.extID=sender.id:null; + //sender?sub.extID=sender.id:null; chrome.windows.getCurrent({populate:true},function(window){ sub.curWin=window; chrome.tabs.query({active:true,currentWindow:true},function(tabs){ @@ -1627,6 +1627,64 @@ var sub={ } chrome.windows.update(sub.curWin.id,{state:t},function(window){}) }, + mergewin:function(){ + sub.cons.mergewin=sub.cons.mergewin||{lastwins:[]}; + let i=0,ii=0,tabIds=[],win=[],_win=[], + winState=sub.getConfValue("selects","n_winstate").substr(2); + chrome.windows.getCurrent(function(window){ + chrome.windows.getAll({populate:true,windowTypes:["normal"]},function(windows){ + for(i=0;i0)?win:sub.cons.mergewin.lastwins; + if(tabIds.length>0&&windows.length>1){ + chrome.tabs.move(tabIds,{windowId:window.id,index:-1},function(){ + if(winState!="normal"){ + chrome.windows.update(window.id,{state:winState}) + } + }); + }else if(sub.cons.mergewin.lastwins.length>0){ + for(i=0;i1){ + sub.cons.mergewin.lastwins[_temp].splice(0,1); + chrome.tabs.move(sub.cons.mergewin.lastwins[_temp],{windowId:window.id,index:-1},function(){ + if(_temp==sub.cons.mergewin.lastwins.length-1){ + chrome.windows.update(winId,{focused:true}) + } + }) + } + }) + })(i,window.id) + } + } + }) + }) + return; + chrome.windows.getLastFocused(function(window){ + chrome.windows.getAll({populate:true,windowTypes:["normal"]},function(windows){ + let i=0,ii=0,tabIds=[]; + for(i=0;i0?chrome.tabs.move(tabIds,{windowId:window.id,index:-1}):null; + }) + }) + }, //txt copytxt:function(){//chk if(!sub.message.selEle.txt){return;} @@ -3637,7 +3695,7 @@ var sub={ //set last as default if(_index!==0&&config.pop.settings.last){ config.pop.actions[_index]=config.pop.actions[0]; - config.pop.actions[0]=theConf; + config.pop.actions[0]=sub.theConf; sub.saveConf(); } break; @@ -3714,6 +3772,29 @@ var sub={ } } +chrome.browserAction.onClicked.addListener(function(tab){ + if(config.icon.settings.type=="back"){ + //sub.extID=chrome.runtime.id?chrome.runtime.id:null; + var theConf=config.icon.actions[0]; + sub.theConf=theConf; + sub.initCurrent(null,sub.theConf); + }else{ + chrome.tabs.query({active:true,currentWindow:true},function(tabs){ + sub.curTab=tabs[0]; + chrome.tabs.sendMessage(tabs[0].id,{type:"icon"},function(response){ + if(response&&response.type=="action_icon"){ + sub.message=response; + sub.extID=chrome.runtime.id?chrome.runtime.id:null; + var theConf=config.icon.actions[0]; + sub.theConf=theConf; + sub.initCurrent(null,sub.theConf); + console.log(sub.message) + } + }); + }) + } +}) + if(!chrome.runtime.getPlatformInfo){} else{ chrome.runtime.getPlatformInfo(function(info){ @@ -3807,235 +3888,6 @@ chrome.runtime.onMessageExternal.addListener(function(message,sender,sendRespons chrome.runtime.onMessage.addListener(function(message,sender,sendResponse) { console.log(message) sub.funOnMessage(message,sender,sendResponse); - - return; - sub.message=message; - if(message.type=="opt_getpers"){ - console.log(message) - sub.checkPermission(message.value.thepers,message.value.theorgs,message.value.theFunction,message.value.msg); - return; - } - if(message.type=="evt_getconf"||message.type=="pop_getconf"||message.type=="opt_getconf"){ - var _conf={ - type:message.type, - defaultConf:defaultConf, - config:config, - devMode:devMode, - os:sub.cons.os - } - sendResponse(_conf); - return; - } - if(message.type=="per_getconf"){ - var _conf=sub.cons.permissions; - sendResponse(_conf); - return; - } - if(message.type=="apps_action"){ - sub.action.apps_action(message,sendResponse); - return; - } - if(message.type=="apps_saveconf"){ - sub.action.apps_saveconf(message,sendResponse); - return; - } - if(message.type=="apps_test"){ - //console.log(message.apptype) - console.log("apps_test") - let _fun=function(){ - if(message.appjs){ - chrome.tabs.executeScript({code:"sue.apps['"+message.apptype+"'].initUI();",runAt:"document_start"}); - return; - } - if(message.apptype=="base64"){ - chrome.tabs.executeScript({file:"js/base64.min.js",runAt:"document_start"},function(){}) - }else if(message.apptype=="qr"){ - chrome.tabs.executeScript({file:"js/jquery.min.js",runAt:"document_start"},function(){}) - chrome.tabs.executeScript({file:"js/jquery.qrcode.min.js",runAt:"document_start"},function(){}) - } - - chrome.tabs.insertCSS({file:"css/inject/"+message.apptype+".css",runAt:"document_start"},function(){}); - chrome.tabs.executeScript({file:"js/inject/"+message.apptype+".js",runAt:"document_start"},function(){}) - } - if(!message.value){ - chrome.tabs.insertCSS({file:"css/apps_basic.css",runAt:"document_start"},function(){}) - chrome.tabs.executeScript({file:"js/apps_basic.js",runAt:"document_start"},function(){_fun();}) - }else{ - _fun(); - } - - - return; - } - if(message.type=="getappconf"){ - sendResponse(sub.cons[message.apptype]); - return; - } - if(message.type=="apps_getvalue"){ - //sendResponse("") - sendResponse({type:message.apptype,config:config.apps[message.apptype],value:sub.cons[message.apptype]}) - return - } - if(message.type=="action_np"){ - console.log(message) - sub.action.next(); - return; - } - if(message.type=="reloadconf"){ - console.log("reloadconf"); - config=message.value; - loadConfig(); - return; - } - if(message.type=="saveConf"){ - console.log("saveconf") - config=message.value; - sub.saveConf(); - return; - } - if(message.type=="updateConfStatus"){ - console.log("updateConfStatus") - return; - } - if(message.type=="per_clear"){ - console.log("per_clear") - sub.cons.permissions={}; - return; - } - if(message.type=="getpers"){ - sub.initpers(); - return; - } - if(message.type=="scroll"){ - sendResponse({type:sub.cons.scroll.type,effect:sub.cons.scroll.effect}); - return; - } - if(message.type=="zoom"){ - sendResponse({value:sub.cons.zoom}); - return; - } - if(message.type=="action_pop"){ - var _index=message.index; - var theConf=config.pop.actions[_index]; //message.popvalue; - sub.theConf=theConf; - if(config.pop.settings.type=="front"){ - chrome.tabs.query({active:true,currentWindow:true},function(tabs){ - sub.curTab=tabs[0]; - chrome.tabs.sendMessage(tabs[0].id,{type:"pop"},function(response){ - if(response&&response.type=="action_pop"){ - sub.message=response; - sub.extID=chrome.runtime.id?chrome.runtime.id:null; - sub.initCurrent(null,theConf); - console.log(sub.message) - } - }); - }) - }else{ - sub.initCurrent(sender,theConf); - } - //set last as default - if(_index!==0&&config.pop.settings.last){ - config.pop.actions[_index]=config.pop.actions[0]; - config.pop.actions[0]=theConf; - sub.saveConf(); - } - return; - } - if(message.type=="action_rges"){ - console.log("action_rges"); - var rgesType=message.sendValue.buttons==1?0:1; - var theConf=config.rges.actions[rgesType]; - sub.theConf=theConf; - sub.initCurrent(sender,theConf); - return; - } - if(message.type=="action_wges"){ - console.log("action_wges") - var _id; - if(message.sendValue.buttons==1){ - if(message.sendValue.wheelDelta<0){_id=0;}else{_id=1} - }else if(message.sendValue.buttons==2){ - if(message.sendValue.wheelDelta<0){_id=2;}else(_id=3) - } - var theConf=config.wges.actions[_id]; - sub.theConf=theConf; - - if(sub.theConf.name=="scroll"){//fix action scroll - //sendResponse({name:sub.theConf.name}); - window.setTimeout(function(){ - sub.initCurrent(sender,theConf); - },200) - return - } - - sub.initCurrent(sender,theConf) - return; - } - var drawType=message.drawType; - var confType=config[drawType[0]][drawType[1]]; - var direct=message.direct; - var theName="", - theConf=""; - for(var i=0;idirect.length){ - let _action={ - direct:confType[i].direct, - tip:(confType[i].mydes&&confType[i].mydes.type&&confType[i].mydes.value)?confType[i].mydes.value:sub.getI18n(confType[i].name) - } - _sendConf.allaction.push(_action); - } - if(i==confType.length-1&&_sendConf.allaction.length==0){ - _sendConf.allaction=null; - } - } - } - sendResponse(_sendConf); - }else if(message.type=="action"){ - theConf.type="action"; - if(theConf.name=="paste"){//for action paste - if(sub.cons.permissions.contains("clipboardWrite")) { - var clipOBJ=document.body.appendChild(document.createElement("textarea")); - clipOBJ.focus(); - document.execCommand('paste', false, null); - var clipData=clipOBJ.value; - clipOBJ.remove(); - theConf.paste=clipData; - theConf.typeAction="paste"; - sendResponse(theConf); - }else { - sub.checkPermission(["clipboardWrite"]); - } - }else{ - sendResponse(theConf); - } - sub.initCurrent(sender,theConf); - } }); loadConfig(); //browsersettings diff --git a/js/options.js b/js/options.js index 10dd818..95ee3b3 100644 --- a/js/options.js +++ b/js/options.js @@ -57,7 +57,7 @@ var suo={ init:function(){ console.log("begin"); suo.cons.menuPin=window.innerWidth>800?true:false; - suo.set.set_01(); + suo.set.set_11(); suo.initHandle(); }, initHandle:function(){ @@ -921,7 +921,7 @@ var suo={ for(var j=0;j0&&i1&&i.setcontent"); + set_11:function(){ + var domOBJ=document.querySelector(".set-00>.setcontent"); domOBJ.innerHTML=""; for(var i=1;i.setcontent"); + var domlog=document.querySelector(".set.set-113.confobj>.setcontent"); domlog.innerHTML="" for(var i=0;i