Browse Source

更新crx文件到最新版

zxlie 6 years ago
parent
commit
734c82353b

+ 1 - 25
apps/json-format/automatic.js

@@ -27,30 +27,6 @@ module.exports = (() => {
         $('<link id="_fehelper_fcp_css_" href="' + cssUrl + '" rel="stylesheet" type="text/css" />').appendTo('head');
     };
 
-    /**
-     * 自动消失的Alert弹窗
-     * @param content
-     */
-    window.alert = function (content) {
-        window.clearTimeout(window.feHelperAlertMsgTid);
-        let elAlertMsg = document.querySelector("#fehelper_alertmsg");
-        if (!elAlertMsg) {
-            let elWrapper = document.createElement('div');
-            elWrapper.innerHTML = '<div id="fehelper_alertmsg" style="position:fixed;top:5px;right:5px;z-index:1000000">' +
-                '<p style="background:#000;display:inline-block;color:#fff;text-align:center;' +
-                'padding:10px 10px;margin:0 auto;font-size:14px;border-radius:4px;">' + content + '</p></div>';
-            elAlertMsg = elWrapper.childNodes[0];
-            document.body.appendChild(elAlertMsg);
-        } else {
-            elAlertMsg.querySelector('p').innerHTML = content;
-            elAlertMsg.style.display = 'block';
-        }
-
-        window.feHelperAlertMsgTid = window.setTimeout(function () {
-            elAlertMsg.style.display = 'none';
-        }, 3000);
-    };
-
     /**
      * 从页面提取JSON文本
      * @returns {string}
@@ -227,7 +203,7 @@ module.exports = (() => {
                 let keysCount = _getAllKeysCount(jsonObj);
                 if (keysCount > options['MAX_JSON_KEYS_NUMBER']) {
                     let msg = '当前JSON共 <b style="color:red">' + keysCount + '</b> 个Key,大于预设值' + options['MAX_JSON_KEYS_NUMBER'] + ',已取消自动格式化;可到FeHelper设置页调整此配置!';
-                    return alert(msg);
+                    return toast(msg);
                 }
             }
 

+ 7 - 7
apps/json-format/format-lib.js

@@ -122,7 +122,7 @@ let JsonFormatEntrance = (function () {
         if (typeof Tarp === 'object') {
             Tarp.require('../static/js/utils.js');
         } else {
-            alert('无法加载Tarp.require.js');
+            toast('无法加载Tarp.require.js');
         }
     };
 
@@ -143,7 +143,7 @@ let JsonFormatEntrance = (function () {
             button.click(function (e) {
                 let aLink = $('#aLinkDownload');
                 if (!aLink[0]) {
-                    aLink = $('<a id="aLinkDownload" target="_blank" title="保存到本地">下载JSON数据</a>').appendTo('body');
+                    aLink$('<a id="aLinkDownload" target="_blank" title="保存到本地">下载JSON数据</a>').appendTo('body');
                     aLink.attr('download', 'FeHelper-' + dt + '.json');
                     aLink.attr('href', URL.createObjectURL(blob));
                 }
@@ -163,7 +163,7 @@ let JsonFormatEntrance = (function () {
                             filename: 'FeHelper-' + dt + '.json'
                         });
                     } else {
-                        alert('必须接受授权,才能正常下载!');
+                        toast('必须接受授权,才能正常下载!');
                     }
                 });
             });
@@ -186,7 +186,7 @@ let JsonFormatEntrance = (function () {
         document.execCommand('Copy');
         document.body.removeChild(input);
 
-        alert('Json片段复制成功,随处粘贴可用!')
+        toast('Json片段复制成功,随处粘贴可用!')
     };
 
 
@@ -240,7 +240,7 @@ let JsonFormatEntrance = (function () {
                             filename: 'FeHelper-' + dt + '.json'
                         });
                     } else {
-                        alert('必须接受授权,才能正常下载!');
+                        toast('必须接受授权,才能正常下载!');
                     }
                 });
             }
@@ -255,10 +255,10 @@ let JsonFormatEntrance = (function () {
         // 删除json片段
         let fnDel = function (ed) {
             if (el.parent().is('#formattedJson')) {
-                alert('如果连最外层的Json也删掉的话,就没啥意义了哦!');
+                toast('如果连最外层的Json也删掉的话,就没啥意义了哦!');
                 return false;
             }
-            alert('节点已删除成功!');
+            toast('节点已删除成功!');
             el.remove();
             jfOptEl.css('top', -1000).hide();
             jfPathEl && jfPathEl.hide();

+ 1 - 1
apps/manifest.json

@@ -1,6 +1,6 @@
 {
   "name": "WEB前端助手(FeHelper)-Dev",
-  "version": "2019.07.2516",
+  "version": "2019.07.2517",
   "manifest_version": 2,
   "default_locale": "zh_CN",
   "description": "Awesome,All In One的一个工具,包含多个独立小应用,比如:Json工具、代码美化工具、代码压缩、二维码工具、markdown工具、网页油猴工具、便签笔记工具、信息加密与解密、随机密码生成、Crontab等等!",

+ 1 - 1
apps/static/js/utils.js

@@ -119,7 +119,7 @@ Date.prototype.format = function (pattern) {
  * 自动消失的Alert弹窗
  * @param content
  */
-window.alert = function (content) {
+window.toast = function (content) {
     window.clearTimeout(window.feHelperAlertMsgTid);
     let elAlertMsg = document.querySelector("#fehelper_alertmsg");
     if (!elAlertMsg) {

BIN
apps/static/screenshot/crx/WEB前端助手(FeHelper)_v2019.07.2516.crx