Browse Source

增加工具:随机密码生成器;优化iCON去白边

zxlie 7 years ago
parent
commit
74aea49c91

+ 1 - 0
README.md

@@ -37,6 +37,7 @@ https://chrome.google.com/webstore/detail/pkgccpejnmalmdinmhkkfafefagiiiad?hl=zh
 - Js正则表达式(正则测试、常用正则列表)
 - Js正则表达式(正则测试、常用正则列表)
 - 时间(戳)转换(Unix戳与本地时间的互转)
 - 时间(戳)转换(Unix戳与本地时间的互转)
 - 图片Base64(任意图片转DataURI格式)
 - 图片Base64(任意图片转DataURI格式)
+- 随机密码生成(任意字符、任意长度、随机生成)
 - 编码规范检测(HTML/CSS/JS规范检测)
 - 编码规范检测(HTML/CSS/JS规范检测)
 - 页面性能检测(页面响应时间、Header监测)
 - 页面性能检测(页面响应时间、Header监测)
 - Ajax调试功能(需在控制台中使用)
 - Ajax调试功能(需在控制台中使用)

+ 2 - 2
apps/manifest.json

@@ -1,9 +1,9 @@
 {
 {
   "name": "WEB前端助手(FeHelper)",
   "name": "WEB前端助手(FeHelper)",
-  "version": "2018.06.2114",
+  "version": "2018.07.0314",
   "manifest_version": 2,
   "manifest_version": 2,
   "default_locale": "zh_CN",
   "default_locale": "zh_CN",
-  "description": "FE助手:包括JSON格式化、二维码生成与解码、信息编解码、代码压缩、美化、页面取色、Markdown与HTML互转、网页滚动截屏、正则表达式、时间转换工具、编码规范检测、页面性能检测、Ajax接口调试",
+  "description": "FE助手:包括JSON格式化、二维码生成与解码、信息编解码、代码压缩、美化、页面取色、Markdown与HTML互转、网页滚动截屏、正则表达式、时间转换工具、编码规范检测、页面性能检测、Ajax接口调试、密码生成器",
   "icons": {
   "icons": {
     "16": "static/img/fe-16.png",
     "16": "static/img/fe-16.png",
     "48": "static/img/fe-48.png",
     "48": "static/img/fe-48.png",

File diff suppressed because it is too large
+ 0 - 0
apps/options/index.html


+ 2 - 1
apps/options/settings.js

@@ -24,7 +24,8 @@ module.exports = (() => {
         'AJAX_DEBUGGER',
         'AJAX_DEBUGGER',
         'JS_CSS_PAGE_BEAUTIFY',
         'JS_CSS_PAGE_BEAUTIFY',
         'HTML_TO_MARKDOWN',
         'HTML_TO_MARKDOWN',
-        'PAGE_CAPTURE'
+        'PAGE_CAPTURE',
+        'RANDOM_PASSWORD'
     ];
     ];
 
 
     /**
     /**

+ 31 - 0
apps/password/index.css

@@ -0,0 +1,31 @@
+@import url("../static/css/bootstrap.min.css");
+
+.wrapper {
+    width: 600px;
+}
+#rstCode {
+    min-height: 80px;
+    width:530px;
+    resize: none;
+    margin: 15px;
+}
+.row .checkbox {
+    margin:0 15px;
+    padding: 15px 0;
+    border-bottom: 1px dashed #ccc;
+    user-select: none;
+}
+.row .checkbox.no-border {
+    border:none;
+}
+.row .checkbox span {
+    color:#ccc;
+    padding:0 5px;
+}
+.row .checkbox .form-control {
+    width:80px;
+    display: inline-block;
+}
+#btnCodeChange {
+    outline: none;
+}

File diff suppressed because it is too large
+ 0 - 0
apps/password/index.html


+ 46 - 0
apps/password/index.js

@@ -0,0 +1,46 @@
+/**
+ * FeHelper 密码随机生成工具
+ */
+new Vue({
+    el: '#pageContainer',
+    data: {
+        number: true,
+        lowerLetter: true,
+        upperLetter: true,
+        specialChar: false,
+        length: 16,
+        chars: {
+            number: '0123456789',
+            lowerLetter: 'abcdefghijklmnopqrstuvwxyz',
+            upperLetter: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
+            specialChar: '~!@#$%^&*()[{]}-_=+\|;:\'\",<.>/?`'
+        },
+        resultContent: ''
+    },
+
+    methods: {
+        convert: function () {
+            this.$nextTick(() => {
+                let exceptedChars = ['number', 'lowerLetter', 'upperLetter', 'specialChar'].filter(item => this[item]).map(item => this.chars[item]).join('');
+
+                let password = [], rands = [], rand = 0;
+                for (let index = 0; index < this.length; index++) {
+
+                    // 尽可能不让字符重复
+                    do {
+                        rand = Math.floor(Math.random() * exceptedChars.length);
+                    } while (rands.includes(rand) && rands.length < exceptedChars.length);
+
+                    rands.push(rand);
+                    password.push(exceptedChars[rand]);
+                }
+
+                this.resultContent = password.join('');
+            });
+        },
+
+        getResult: function () {
+            this.$refs.rstCode.select();
+        }
+    }
+});

+ 3 - 0
apps/popup/index.css

@@ -93,6 +93,9 @@ ul.fe-function-list li.-x-markdown b {
 ul.fe-function-list li.-x-pagecapture b {
 ul.fe-function-list li.-x-pagecapture b {
 	background-position:-16px -111px;
 	background-position:-16px -111px;
 }
 }
+ul.fe-function-list li.-x-password b {
+	background-position: -144px -95px;
+}
 
 
 ul.fe-function-list li i {
 ul.fe-function-list li i {
     color: #aaa;
     color: #aaa;

File diff suppressed because it is too large
+ 0 - 0
apps/popup/index.html


BIN
apps/static/img/fe-128.png


BIN
apps/static/img/fe-16.png


BIN
apps/static/img/fe-48.png


+ 2 - 0
apps/static/js/msg_type.js

@@ -69,6 +69,8 @@ const MSG_TYPE = {
     TIME_STAMP: 'timestamp',
     TIME_STAMP: 'timestamp',
     // 图片base64
     // 图片base64
     IMAGE_BASE64: 'image-base64',
     IMAGE_BASE64: 'image-base64',
+    // 随机密码生成
+    RANDOM_PASSWORD:'password',
     // 二维码解码
     // 二维码解码
     QR_DECODE: 'qr-decode',
     QR_DECODE: 'qr-decode',
     // JSON页面自动格式化
     // JSON页面自动格式化

Some files were not shown because too many files changed in this diff