{"id":18996042,"url":"https://github.com/00f100/duc","last_synced_at":"2025-06-19T20:40:14.646Z","repository":{"id":57216926,"uuid":"100192240","full_name":"00F100/duc","owner":"00F100","description":"Package to detect if url has changed","archived":false,"fork":false,"pushed_at":"2018-06-07T01:40:58.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-16T17:45:46.021Z","etag":null,"topics":["browser","change","changes","detect","updated","url"],"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/00F100.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":"2017-08-13T17:12:22.000Z","updated_at":"2018-06-07T01:40:59.000Z","dependencies_parsed_at":"2022-08-28T21:40:17.895Z","dependency_job_id":null,"html_url":"https://github.com/00F100/duc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/00F100/duc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/00F100%2Fduc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/00F100%2Fduc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/00F100%2Fduc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/00F100%2Fduc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/00F100","download_url":"https://codeload.github.com/00F100/duc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/00F100%2Fduc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260827408,"owners_count":23068963,"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":["browser","change","changes","detect","updated","url"],"created_at":"2024-11-08T17:33:44.824Z","updated_at":"2025-06-19T20:40:09.637Z","avatar_url":"https://github.com/00F100.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# duc\n\nPackage to detect if url has changed\n\n## Usage\n\n#### Install\n\n```\n$ npm install duc\n```\n\n#### Tag script\n\nInclude tag\n```\n\u003cscript src=\"dist/duc.min.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n```\n\n#### How to use\n```\nvar looptime = 500; // ms\nvar callback = function (currentPage, lastPage) {\n\tconsole.log(lastPage);\n\tconsole.log(currentPage);\n}\nduc.change(callback, looptime);\n```\n\n#### Requirejs\n\nmain.js\n```\npaths: {\n    duc: 'dist/duc.min'\n},\nshim: {\n    duc: {\n        exports: 'duc'\n    }\n}\n```\n\nyourfile.js\n```\nrequirejs(['duc'], function() {\n    var looptime = 500; // ms\n\tvar callback = function (currentPage, lastPage) {\n\t\tconsole.log(lastPage);\n\t\tconsole.log(currentPage);\n\t}\n\tduc.change(callback, looptime);\n});\n```\n\n#### Develop\n\nRun Grunt Watch and edit file [duc.js](https://github.com/00F100/duc/blob/master/src/duc.js)\n\n```\n$ npm install\n$ node_modules/.bin/grunt watch\n```\n\n\n#### Features\n\n##### 1.2.0\n+ Configure time to loop\n+ Return current and last URL inside callback\n\n##### 1.0.5\n+ Add license\n\n##### 1.0.0\n+ Detect URL change\n+ Execute callback","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F00f100%2Fduc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F00f100%2Fduc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F00f100%2Fduc/lists"}