From 1879007887eaccf8d9cbefb81650c3742bff95bb Mon Sep 17 00:00:00 2001 From: zimocode Date: Sat, 27 Jul 2019 14:44:17 +0800 Subject: [PATCH] fix bugs: Can't add super drag for links and images --- _locales/en/messages.json | 4 ++-- _locales/it/messages.json | 4 ++-- _locales/ru/messages.json | 4 ++-- _locales/zh_CN/messages.json | 4 ++-- _locales/zh_TW/messages.json | 4 ++-- change.log | 7 ++++--- js/background.js | 1 - js/inject/pxmovie.js | 2 +- js/options.js | 9 ++++++++- manifest.json | 2 +- 10 files changed, 24 insertions(+), 17 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 467112a..3f72e15 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -918,10 +918,10 @@ "message": "This is a bunch of test text, select the text and drag to draw the line, and then select the action you need." }, "test_ldrg": { - "message": " This is a test link, drag the link and draw lines, and select action you need. " + "message": "This is a test link, drag the link and draw lines, and select action you need." }, "test_idrg": { - "message": "This is a test image, drag the image and draw the line, and then select the action you need: " + "message": "This is a test image, drag the image and draw the line, and then select the action you need: " }, "tip_actionname": { "message": "Customization action name" diff --git a/_locales/it/messages.json b/_locales/it/messages.json index 05830d2..2e69682 100644 --- a/_locales/it/messages.json +++ b/_locales/it/messages.json @@ -918,10 +918,10 @@ "message": "Questo è un testo d'esempio. Selezionare il testo e trascinare per tratteggiare la linea, e selezionare l'azione richiesta." }, "test_ldrg": { - "message": " Questo è un link d'esempio, trascinare il link e tratteggiare linee, e selezionare l'azione richiesta." + "message": "Questo è un link d'esempio, trascinare il link e tratteggiare linee, e selezionare l'azione richiesta." }, "test_idrg": { - "message": "Questa è un'immagine d'esempio. Trascinare l'immagine e tratteggiare la linea, e selezionare l'azione richiesta: " + "message": "Questa è un'immagine d'esempio. Trascinare l'immagine e tratteggiare la linea, e selezionare l'azione richiesta:" }, "tip_actionname": { "message": "Nome azione personalizzata" diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json index 4226ca8..98e8b15 100644 --- a/_locales/ru/messages.json +++ b/_locales/ru/messages.json @@ -918,10 +918,10 @@ "message": "Это тестовый текст, выделите текст и потяните его, чтобы нарисовать линию, а затем выберите нужное действие." }, "test_ldrg": { - "message": " Это тестовая ссылка, перетащите ссылку и нарисуйте линию, а затем выберите нужное действие. " + "message": "Это тестовая ссылка, перетащите ссылку и нарисуйте линию, а затем выберите нужное действие." }, "test_idrg": { - "message": "Перетащите тестовую картинку нарисовав линию и затем выберите нужное действие. " + "message": "Перетащите тестовую картинку нарисовав линию и затем выберите нужное действие." }, "tip_actionname": { "message": "Настройки названия действия" diff --git a/_locales/zh_CN/messages.json b/_locales/zh_CN/messages.json index ce2f0fd..3087b7c 100644 --- a/_locales/zh_CN/messages.json +++ b/_locales/zh_CN/messages.json @@ -915,10 +915,10 @@ "message": "这是一段测试文本,选中文本并拖曳画线,然后选择你所需要的操作即可。" }, "test_ldrg": { - "message": "这是一个测试链接,拖动此链接并画线,然后选择你所需要的操作。" + "message": "这是一个测试链接,拖动此链接并画线,然后选择你所需要的操作。" }, "test_idrg": { - "message": "这是测试用图片,拖动改图片并画线,然后选择所需操作: " + "message": "这是测试用图片,拖动改图片并画线,然后选择所需操作:" }, "tip_actionname": { "message": "使用自定义操作名称" diff --git a/_locales/zh_TW/messages.json b/_locales/zh_TW/messages.json index 2d4fd49..2ceaa48 100644 --- a/_locales/zh_TW/messages.json +++ b/_locales/zh_TW/messages.json @@ -915,10 +915,10 @@ "message": "這是一些測試文字,選擇這些文字並拖曳畫出手勢,然後再選擇你需要的動作。" }, "test_ldrg": { - "message": " 這是測試連結,拖曳此連結並畫出手勢,然後選擇你需要的動作。 " + "message": "這是測試連結,拖曳此連結並畫出手勢,然後選擇你需要的動作。" }, "test_idrg": { - "message": "這是張測試圖片,拖曳此圖片並畫出手勢,然後選擇你需要的動作:" + "message": "這是張測試圖片,拖曳此圖片並畫出手勢,然後選擇你需要的動作:" }, "tip_actionname": { "message": "自定動作名稱" diff --git a/change.log b/change.log index 6c16ac1..37f12c5 100644 --- a/change.log +++ b/change.log @@ -1,10 +1,11 @@ { "log": [ { - "ver":"6.3.873.886", - "date":"2019.07.14", + "ver":"6.4.887.1001", + "date":"2019.07.27", "content":[ - "new mini-apps: convert case, auto reload." + "new mini-apps: convert case, auto reload.", + "fix bugs: Can't add super drag for links and images" ] }, { diff --git a/js/background.js b/js/background.js index 1bba7c3..d3af50b 100644 --- a/js/background.js +++ b/js/background.js @@ -2320,7 +2320,6 @@ var sub={ //mini apps autoreload:function(){ var _appname="autoreload"; - sub.initAppconf(_appname); sub.insertTest(_appname); }, convertcase:function(){ diff --git a/js/inject/pxmovie.js b/js/inject/pxmovie.js index 4043687..4c9b58b 100644 --- a/js/inject/pxmovie.js +++ b/js/inject/pxmovie.js @@ -68,7 +68,7 @@ sue.apps.pxmovie={ let _data=dom.querySelector(".data"), _loading=dom.querySelector(".loading"), _name=sue.domCreate("div",{setName:["className"],setValue:["name"]},null,null,null,value.name), - _back=sue.apps.domCreate("button",{setName:["className"],setValue:["back"]},null,"display: inline-block;",null,sue.apps.i18n("back")); + _back=sue.apps.domCreate("button",{setName:["className"],setValue:["back"]},null,"display: inline-block;",null,sue.apps.i18n("btn_back")); _info=sue.apps.domCreate("div",{setName:["className"],setValue:["info"]}); _data.textContent=""; _data.appendChild(_name); diff --git a/js/options.js b/js/options.js index c883734..876eaac 100644 --- a/js/options.js +++ b/js/options.js @@ -2390,6 +2390,13 @@ var suo={ } var testdes=suo.getI18n("test_"+((confArray[0]=="mges"||confArray[0]=="touch")?"mges":confArray[1])); var btnArray=["",suo.getI18n("btn_cancel"),suo.getI18n("btn_done")]; + let testDom=suo.domCreate2("div",{setName:["className"],setValue:["testbox"]},null,null,null,testdes); + if(confArray[1]=="ldrg"){ + testDom.textContent=""; + testDom.appendChild(suo.domCreate2("a",{setName:["href"],setValue:["###"]},null,null,null,suo.getI18n("test_ldrg"))); + }else if(confArray[1]=="idrg"){ + testDom.appendChild(suo.domCreate2("img",{setName:["src"],setValue:["../icon.png"]})); + } var addOBJ=suo.initAPPbox(btnArray,[480,320],suo.getI18n("title_newaction"),"bg"); addOBJ.classList.add("su_app_test"); addOBJ.dataset.confobj=confobj; @@ -2397,7 +2404,7 @@ var suo={ addOBJ.dataset.close="resetdirect"; addOBJ.dataset.actiontype=actionType; addOBJ.querySelectorAll("input[type=button]")[1].className="box_btn box_btn_next"; - addOBJ.querySelector(".box_content").appendChild(suo.domCreate2("div",{setName:["className"],setValue:["testbox"]},null,null,null,testdes)); + addOBJ.querySelector(".box_content").appendChild(testDom); //when adding drag text, set the test text can be drag. if(confArray[1]=="tdrg"){ addOBJ.style.cssText+="-webkit-user-select:text;-moz-user-select:text;user-select:text;"; diff --git a/manifest.json b/manifest.json index 80fa8c3..01034b6 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "minimum_chrome_version": "22", "name": "smartUp Gestures(Beta)", "short_name":"smartUp", - "version": "6.3.873.886", + "version": "6.4.887.1001", "description": "__MSG_ext_des__", "default_locale": "en", "author":"zimo",