Skip to content

Commit

Permalink
Release version 1.2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
terrylinooo committed Apr 3, 2019
1 parent c57f48f commit cfc8f9a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
3 changes: 2 additions & 1 deletion README_zh_CN.md → docs/README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

针对 Google Chrome 浏览器的自动填入、自动完成功能,此 jQuery plugin 应该是最简单禁用的解决方案。

Document Transations: [English](./README.md) | [繁體中文](./README_zh_TW.md) | [简体中文](./README_zh_CN.md)
Document Transations: [English](../README.md) | [繁體中文](./README_zh_TW.md) | [简体中文](./README_zh_CN.md)

----

Expand Down Expand Up @@ -55,6 +55,7 @@ option | default | note
---- | --- | ---
passwordField | - | DOM 元素用 ID 或使用 ClassName 指定, 如果没有设定, disableAutoFill 会自动找寻 [**type=password**] 的栏位。
submitButton | - | DOM 元素用 ID 或使用 ClassName 指定, 如果没有设定, disableAutoFill 会自动找寻 [**type=submit**] 按纽。
hidingChar | ● | 隐藏密码的替代字元。
debugMode | false | 设为 true 的话会在 console.log 印讯息。
randomizeInputName | true | 会自动把 <i><strong>input name attribute</strong></i> 以随机的字串取代。然后在提交表单时复原至原始的栏位名称,这么做是避免 Google Chrome 和其它第三方拓展及其它浏览器会记住曾输入的讯息。
设这个选项为“true”来启用 HTML 5 原生的表单验证功能 (`required``pattern`及其它相关属性...)
Expand Down
3 changes: 2 additions & 1 deletion README_zh_TW.md → docs/README_zh_TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

針對 Google Chrome 瀏覽器的自動填入、自動完成功能,此 jQuery plugin 應該是最簡單禁用的解決方案。

Document Transations: [English](./README.md) | [繁體中文](./README_zh_TW.md) | [简体中文](./README_zh_CN.md)
Document Transations: [English](../README.md) | [繁體中文](./README_zh_TW.md) | [简体中文](./README_zh_CN.md)

----

Expand Down Expand Up @@ -58,6 +58,7 @@ option | default | note
---- | --- | ---
passwordField | - | DOM 元素用 ID 或使用 ClassName 指定, 如果沒有設定, disableAutoFill 會自動找尋 [**type=password**] 的欄位。
submitButton | - | DOM 元素用 ID 或使用 ClassName 指定, 如果沒有設定, disableAutoFill 會自動找尋 [**type=submit**] 按紐。
hidingChar | ● | 隱藏密碼的替代字元。
debugMode | false | 設為 true 的話會在 console.log 印訊息。
randomizeInputName | true | 會自動把 <i><strong>input name attribute</strong></i> 以隨機的字串取代。然後在提交表單時復原至原始的欄位名稱,這麼做是避免 Google Chrome 和其它第三方拓展及其它瀏覽器會記住曾輸入的訊息。
html5FormValidate | false | 設這個選項為 "true" 來啟用 HTML 5 原生的表單驗證功能 ( `required`,`pattern` 及其它相關屬性...)
Expand Down
14 changes: 8 additions & 6 deletions docs/assets/js/jquery.disableAutoFill.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* The easiest solution for disabling Google Chrome auto-fill, auto-complete functions.
*
* @license MIT
* @version 1.2.7-beta
* @version 1.2.8
* @author Terry, https://github.com/terrylinooo/
* @updated 2018-11-20
* @link https://github.com/terrylinooo/jquery.disableAutoFill
Expand Down Expand Up @@ -64,7 +64,7 @@
var currKeyupPos = this.selectionStart;

for (var i = 0; i < passwordLen; i++) {
if (tmpPassword[i] !== '*') {
if (tmpPassword[i] !== settings.hidingChar) {
realPassword[i] = tmpPassword[i];
}
}
Expand All @@ -85,7 +85,7 @@
}
}

$(this).val(tmpPassword.replace(/./g, '*'));
$(this).val(tmpPassword.replace(/./g, settings.hidingChar));

if (settings.debugMode) {
console.log('Current keyup position: ' + currKeyupPos);
Expand Down Expand Up @@ -170,7 +170,8 @@
obj.find(settings.passwordField).each(function (i) {
$(this).val(realPasswordMapper[this.id].join(''));
});



};

/**
Expand Down Expand Up @@ -199,19 +200,20 @@
}
_helper.passwordListener(this, settings);
_helper.formSubmitListener(this, settings);

};

$.fn.disableAutoFill.defaults = {
debugMode: false,
textToPassword: true,
randomizeInputName: true,
passwordField: '',
hidingChar: '●',
html5FormValidate: false,
submitButton: '',
callback: function() {
return true;
},
};

})(jQuery);
})(jQuery);
2 changes: 1 addition & 1 deletion docs/assets/js/jquery.disableAutoFill.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/jquery.disableAutoFill.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* The easiest solution for disabling Google Chrome auto-fill, auto-complete functions.
*
* @license MIT
* @version 1.2.7-beta
* @version 1.2.8
* @author Terry, https://github.com/terrylinooo/
* @updated 2018-11-20
* @link https://github.com/terrylinooo/jquery.disableAutoFill
Expand Down
2 changes: 1 addition & 1 deletion src/jquery.disableAutoFill.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cfc8f9a

Please sign in to comment.