{"id":24687240,"url":"https://github.com/benfoxall/context-require","last_synced_at":"2025-10-08T15:32:11.065Z","repository":{"id":3976698,"uuid":"5071951","full_name":"benfoxall/context-require","owner":"benfoxall","description":"Context Require js","archived":false,"fork":false,"pushed_at":"2013-10-02T08:57:50.000Z","size":156,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-19T08:31:06.050Z","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/benfoxall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-07-16T19:00:03.000Z","updated_at":"2017-05-01T09:15:58.000Z","dependencies_parsed_at":"2022-08-31T10:31:02.721Z","dependency_job_id":null,"html_url":"https://github.com/benfoxall/context-require","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/benfoxall%2Fcontext-require","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benfoxall%2Fcontext-require/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benfoxall%2Fcontext-require/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benfoxall%2Fcontext-require/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benfoxall","download_url":"https://codeload.github.com/benfoxall/context-require/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235726352,"owners_count":19035841,"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":"2025-01-26T16:18:10.390Z","updated_at":"2025-10-08T15:32:05.770Z","avatar_url":"https://github.com/benfoxall.png","language":"JavaScript","readme":"Context Require\n=====\n\nThis is a tiny script that allows you to load (require) js files based on the content of a page.\n\nUsage\n-----\n\n```html\n\u003cdiv class=\"cr\" data-cr=\"fancy\"\u003e\n\t\u003cp\u003eThis part is made all fancy\u003c/p\u003e\n\u003c/div\u003e\n…\n…\n\u003cscript data-main=\"js/main\" src=\"/js/require.js\"\u003e\u003c/script\u003e\n```\n\n```js\n//--fancy.js\n\ndefine(['jquery'], function($){\n\n\t$.fn.make_fancy = function(){\n\t\tthis.animate({fontSize:'+=50'})\n\t};\n\n\treturn function(content){\n\t\t$(content).find('p').make_fancy();\n\t}\n\n});\n\n//--main.js\n\nrequire(['cr']);\n\n```\n\nsee [example.html](https://github.com/benfoxall/context-require/blob/master/example/example.html)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenfoxall%2Fcontext-require","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenfoxall%2Fcontext-require","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenfoxall%2Fcontext-require/lists"}