{"id":20296111,"url":"https://github.com/likerrr/cutterjs","last_synced_at":"2026-03-07T06:32:50.792Z","repository":{"id":14281013,"uuid":"16989066","full_name":"likerRr/cutterjs","owner":"likerRr","description":"Cut any element from web page","archived":false,"fork":false,"pushed_at":"2014-02-20T09:22:02.000Z","size":856,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-25T21:02:28.109Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/likerRr.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":"2014-02-19T15:39:37.000Z","updated_at":"2014-02-20T09:22:02.000Z","dependencies_parsed_at":"2022-09-07T23:52:07.123Z","dependency_job_id":null,"html_url":"https://github.com/likerRr/cutterjs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/likerRr/cutterjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likerRr%2Fcutterjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likerRr%2Fcutterjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likerRr%2Fcutterjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likerRr%2Fcutterjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/likerRr","download_url":"https://codeload.github.com/likerRr/cutterjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likerRr%2Fcutterjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30209090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T05:23:27.321Z","status":"ssl_error","status_checked_at":"2026-03-07T05:00:17.256Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-11-14T15:37:12.300Z","updated_at":"2026-03-07T06:32:50.768Z","avatar_url":"https://github.com/likerRr.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Cutter.js\n========\n\nCut any elements from web page!\n\nVisit \u003ca href=\"http://likerrr.github.io/cutterjs\"\u003ewebsite\u003c/a\u003e for more info\n\n## Setup\n```\n$ git clone git@github.com:likerRr/cutterjs.git\n```\n1. Download .zip or clone .git\n2. Extract or copy files to project scripts folder\n3. Include downloaded files and jQuery library in your project\n```\n\u003cscript src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"cutter.min.js\"\u003e\n```\n\n## How to\nYou only need to initialize plugin with jQuery element, that wraps area where you want to cut:\n```\n$('body').cutter('init');\n```\nBy default, init method have some default options:\n\n1. Elements under cursor appear with border\n2. On cut action element will change it display style to `display: none`\n3. On restore action element returns inherit display property\n\n## Customizing\nYou can override almost all actions used in plugin just in `init` method with second parameter\n\u003e All callback methods accept one parameter - element in action\n\n### mouseOver\nHandle, when mouse moves over element in target area:\n```\n$('body').cutter('init', {\n  mouseOver: function(el) {\n    el.data('border', el.css('border'));\n    el.css('border', 'dotted gray 1px');\n  },\n});\n```\nNow hovered elements will have dotted gray border\n\u003e Please, note, you need to store default data with `data` method to be able to restore previous element state\n\n### mouseOut\nHandle, when mouse moves out from element in target area:\n```\n$('body').cutter('init', {\n  mouseOut: function(el) {\n    el.css('border', el.data('border'));\n  },\n});\n```\n\u003e Now we can restore default value of `border` property\n\n### onCut\nYou can use that option to set up, how elements will be removed\n```\n$('body').cutter('init', {\n  onCut: function(el) {\n    el.data('opacity', el.css('opacity'));\n    el.css('opacity', '0.3');\n  },\n});\n```\n\u003e Note! You need to store default element state to be able to restore it\n\n### afterCut\nYou may need to do list with deleted elements to be able to restore them, so that method will help you\n```\nvar deletedElements = [];\n...\n$('body').cutter('init', {\n   afterCut: function(el) {deletedElements .push(el);},\n});\n```\n\n### onRestore\nFunction will handle when you call `restore` method\n```\n$('body').cutter('init', {\n  onRestore: function(el) {\n    el.css('opacity', el.data('opacity'));\n  }\n});\n```\n\n## Methods\n\n### stop\nI think that \"cut mode\" will not be active all the time, so we need to be able to stop it\n```\nvar bodyArea = $('body').cutter('init');\n...\nbodyArea.cutter('stop');\n```\nAfter calling this method all actions will be suspended\n\n### start\nTo restore \"cut mode\" call `start` method\n```\nvar bodyArea = $('body').cutter('init');\n...\nbodyArea.cutter('stop');\n...\nbodyArea.cutter('start');\n```\n\n### deleted\nYou can also get all deleted items for current area, just use `deleted` method\n```\nvar bodyArea = $('body').cutter('init');\n...\nvar deletedItems = bodyArea.cutter('deleted');\n```\n\n### restore\nFinally you need to be able to restore deleted elements. Method `restore` will help you. It accepts one optional parameter - deleted jQuery element or empty to restore all elements\n```\nvar $lastDeleted;\n...\nvar bodyArea = $('body').cutter('init', {\n   afterCut: function(el) {$lastDeleted = el;},\n});\n// restore one\nbodyArea.cutter('restore', $lastDeleted);\n// restore all\nbodyArea.cutter('restore');\n```\n\n## Examples\nComing soon. Now you can try it yourself. Have fun!\n\n## Licence\nProject under MIT licence, feel free to use and edit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flikerrr%2Fcutterjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flikerrr%2Fcutterjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flikerrr%2Fcutterjs/lists"}