{"id":13825953,"url":"https://github.com/terrylinooo/jquery.disableAutoFill","last_synced_at":"2025-07-08T22:33:00.624Z","repository":{"id":49779937,"uuid":"340460228","full_name":"terrylinooo/jquery.disableAutoFill","owner":"terrylinooo","description":null,"archived":true,"fork":false,"pushed_at":"2021-02-19T19:10:58.000Z","size":890,"stargazers_count":9,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-25T15:05:43.697Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/terrylinooo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-19T18:47:56.000Z","updated_at":"2024-08-13T07:13:26.000Z","dependencies_parsed_at":"2022-09-18T07:23:09.382Z","dependency_job_id":null,"html_url":"https://github.com/terrylinooo/jquery.disableAutoFill","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/terrylinooo/jquery.disableAutoFill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrylinooo%2Fjquery.disableAutoFill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrylinooo%2Fjquery.disableAutoFill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrylinooo%2Fjquery.disableAutoFill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrylinooo%2Fjquery.disableAutoFill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terrylinooo","download_url":"https://codeload.github.com/terrylinooo/jquery.disableAutoFill/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrylinooo%2Fjquery.disableAutoFill/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261906846,"owners_count":23228355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T09:01:29.776Z","updated_at":"2025-07-08T22:33:00.309Z","avatar_url":"https://github.com/terrylinooo.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# jquery.disableAutoFill\n\n### Notice: This package is abandoned, please visit [disableautofill.js](https://github.com/terrylinooo/disableautofill.js)\n\n---\n\nThe easiest solution for disabling Google Chrome auto-fill, auto-complete functions.\n\nDocument Transations: [English](./README.md) | [繁體中文](./docs/README_zh_TW.md) | [简体中文](./docs/README_zh_CN.md)\n\n\n\nI've spent serveral hours surfing online to look for solutions in order to disable Google Chrome auto-fill, auto-complate functions such as the screenshot below. \n\n![Image](https://i.imgur.com/j5Mw1ly.png)\n\nAfter having tried all possible solutions I can find on Stackoverflow, howerver, they are outdated and not working. Finally I figured out that Google Chrome forces dropping the submission history while a form contains `type=\"password\"` field, so this plugin is to do the following steps:\n\n- Replace `type=\"password\"` to `type=\"text\"` and then replace the text with asterisks.\n- Add an attribute `autocomplete=\"off\"` on form.\n- Randomize the input `name` value to prevent Chrome or other third-party extensions to remember what you filled.\n\n### Install\n\n#### Npm\n```\nnpm install disableautofill\n```\n\n#### Bower\n```\nbower install jquery.disableAutoFill\n```\n\n#### CDN\n```\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/disableautofill/src/jquery.disableAutoFill.min.js\"\u003e\u003c/script\u003e\n```\n\n### Demo\n\n- [Login Form](https://terrylinooo.github.io/jquery.disableAutoFill/)\n- [Login Form \u0026 jQuery Validate plugin](https://terrylinooo.github.io/jquery.disableAutoFill/jquery-validate.html)\n- [Login Form \u0026 HTML 5 native form validation](https://terrylinooo.github.io/jquery.disableAutoFill/html5-form-validate.html)\n\nCheck out the demo page to see how it works.\n\n### Usage\n\nHTML\n```html\n\u003cform id=\"login-form\"\u003e\n```\n\nJS\n```javascript\n$('#login-form').disableAutoFill();\n```\n\n### Options\n\noption | default | note \n---- | --- | ---\npasswordField | - | Dom Element by ID or by ClassName, if not set, disableAutoFill will automaticlly pick up the [**type=password**] field.\nsubmitButton | - | Dom Element by ID or by ClassName, if not set, disableAutoFill will automaticlly pick up the [**type=submit**] button.\nhidingChar | ● | Character use to hide real password value.\ndebugMode | false | If true, printing form serialized data in console log instead of submitting.\nrandomizeInputName | true | This plugin will randomize \u003ci\u003e\u003cstrong\u003einput name attribute\u003c/strong\u003e\u003c/i\u003e by default. It will restore back to original field name when submitting form. This is for preventing auto completion for all browsers (includes third-party auto-completeion extensions) not just for Google Chrome.\nhtml5FormValidate | false | Set this option to \"true\" to enable HTML 5 native form validate ( `required`,`pattern` etc...)\ncallback | - | To validate form fields or something you can do.\n\n### Example\n\n```javascript\n$('#login-form').disableAutoFill({\n    passwordField: '.password',\n    callback: function() {\n        return checkForm();\n    }\n});\n\nfunction checkForm() {\n    form = document.getElementById('login-form');\n    if (form.password.value == '') {\n        alert('Cannot leave Password field blank.');\n        form.password.focus();\n        return false;\n    }\n    if (form.username.value == '') {\n        alert('Cannot leave User Id field blank.');\n        form.username.focus();\n        return false;\n    }\n    return true;\n}\n```\n\n### Suggestion\n\nThis plugin may not work while the javascript render speed is slow. \nChrome detects the **type=\"password\"** and still assign the \"remember me\" to the form elements.\n\nYou can modify the input type=\"password\" to \"text\", and add a class (for example: \".password\")\n\n```html\n\u003cinput type=\"text\" name=\"password\" class=\"password\"\u003e\n```\n```javascript\n$(function() {\n    $('.login-form').disableAutoFill({\n        passwordField: '.password'\n    });\n});\n```\nhttps://jsfiddle.net/terrylinooo/hhgzbsvy/\n\n### License\n\nMIT\n\n### Authors\n\n* \u003ca href=\"https://en.dictpedia.org\"\u003eTerry Lin\u003c/a\u003e (terrylinooo)\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrylinooo%2Fjquery.disableAutoFill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterrylinooo%2Fjquery.disableAutoFill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrylinooo%2Fjquery.disableAutoFill/lists"}