{"id":21271678,"url":"https://github.com/kaue/jquery-lock","last_synced_at":"2025-07-11T05:32:55.299Z","repository":{"id":31498706,"uuid":"35062955","full_name":"kaue/jquery-lock","owner":"kaue","description":":lock: jQuery Plugin that prevents html changes","archived":false,"fork":false,"pushed_at":"2021-06-23T21:38:39.000Z","size":95,"stargazers_count":30,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T14:04:40.841Z","etag":null,"topics":["javascript","jquery-lock","jquery-plugin","lock"],"latest_commit_sha":null,"homepage":"http://kauegimenes.github.io/jquery-lock/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaue.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":"2015-05-04T22:16:57.000Z","updated_at":"2021-06-23T21:36:50.000Z","dependencies_parsed_at":"2022-07-24T17:02:07.827Z","dependency_job_id":null,"html_url":"https://github.com/kaue/jquery-lock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaue%2Fjquery-lock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaue%2Fjquery-lock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaue%2Fjquery-lock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaue%2Fjquery-lock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaue","download_url":"https://codeload.github.com/kaue/jquery-lock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225698035,"owners_count":17510059,"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":["javascript","jquery-lock","jquery-plugin","lock"],"created_at":"2024-11-21T08:27:55.826Z","updated_at":"2024-11-21T08:27:56.476Z","avatar_url":"https://github.com/kaue.png","language":"JavaScript","readme":"# jQuery Lock Plugin\nWith this jQuery plugin you will be able to prevent some users from changing content in your page, using the Chrome Developer Tools for example.\n\n[Demo](http://kaue.github.io/jquery-lock/)\n## Basic Usage\n```html\n\u003cscript src=\"//code.jquery.com/jquery-2.1.3.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"//kaue.github.io/jquery-lock/release/jquery.lock.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n$( document ).ready(function() {\n\t$(\"h1,p\").lock();\n});\n\u003c/script\u003e\n\u003ch1\u003e I am locked =) \u003c/h1\u003e\n\u003cp\u003e I am locked too! \u003c/p\u003e\n```\n\n## Options\nYou can customize the behavior of the plugin using this options:\n\n- `alertMessage` (String)\n\nSend a custom alert for every change on the locked elements\n\n#### Sample\n```javascript\n$(\"h1,p\").lock({\n    alertMessage: \"You can`t change this.\"\n});\n```\n- `customHandler(element, updatedHtml, savedHtml)` (Function) \n\nChange the behavior of the plugin, insted of replacing every change with the `savedHtml`.\n\n#### Sample\n```javascript\n$(\"h1,p\").lock({\n    customHandler: function(element, updatedHtml, savedHtml) {\n        //Block the change\t\n        $(element).html(savedHtml);\n        //Do something else with the updatedHtml\n        console.log('Change blocked %s', updatedHtml);\n    }\n});\n```\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaue%2Fjquery-lock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaue%2Fjquery-lock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaue%2Fjquery-lock/lists"}