{"id":26988431,"url":"https://github.com/vokseverk/wakelock-toggle-element","last_synced_at":"2025-04-03T20:19:51.906Z","repository":{"id":240431928,"uuid":"802030888","full_name":"vokseverk/wakelock-toggle-element","owner":"vokseverk","description":"A custom element to render a toggle switch for enabling the screen's wakelock function","archived":false,"fork":false,"pushed_at":"2024-05-18T19:53:09.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-19T20:40:23.951Z","etag":null,"topics":["custom-element","wakelock"],"latest_commit_sha":null,"homepage":"","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/vokseverk.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-17T11:38:55.000Z","updated_at":"2024-05-18T19:53:13.000Z","dependencies_parsed_at":"2024-05-18T20:47:42.525Z","dependency_job_id":null,"html_url":"https://github.com/vokseverk/wakelock-toggle-element","commit_stats":null,"previous_names":["vokseverk/wakelock-toggle-element"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vokseverk%2Fwakelock-toggle-element","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vokseverk%2Fwakelock-toggle-element/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vokseverk%2Fwakelock-toggle-element/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vokseverk%2Fwakelock-toggle-element/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vokseverk","download_url":"https://codeload.github.com/vokseverk/wakelock-toggle-element/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247070920,"owners_count":20878586,"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":["custom-element","wakelock"],"created_at":"2025-04-03T20:19:51.239Z","updated_at":"2025-04-03T20:19:51.895Z","avatar_url":"https://github.com/vokseverk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u0026lt;wakelock-toggle\u0026gt; element\n\nThis is a [Custom Element][CE] that renders a toggle switch (i.e. a checkbox) for requesting to\nkeep the device's screen from dimming and going to sleep.\n\n## Usage\n\nGrab the [wakelock-toggle.js][FILE] file and include it in your HTML like this:\n\n```html\n\u003cscript type=\"module\" src=\"/path/to/wakelock-toggle.js\"\u003e\u003c/script\u003e\n```\n\nThen us the \u003cwakelock-toggle\u003e\u003c/wakelock-toggle\u003e HTML element anywhere you want the switch to\nrender in your webpage, e.g.:\n\n```html\n\u003cmain\u003e\n\t\u003ch1\u003eMy Pancake Recipe\u003c/h1\u003e\n\n\t\u003caside\u003e\n\t\t\u003ch2\u003eSettings\u003c/h2\u003e\n\t\t\u003cwakelock-toggle label=\"Keep the screen from going to sleep\"\u003e\u003c/wakelock-toggle\u003e\n\t\u003c/aside\u003e\n\n\t...\n\n\t\u003col\u003e\n\t\t\u003cli\u003e...\u003c/li\u003e\n\t\t\u003cli\u003e...\u003c/li\u003e\n\t\u003c/ol\u003e\n\u003c/main\u003e\n```\n\nThe `label` attribute is optional; the default value is `\"Keep the screen on\"`.\n\n[CE]: https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements\n[FILE]: src/wakelock-toggle.js\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvokseverk%2Fwakelock-toggle-element","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvokseverk%2Fwakelock-toggle-element","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvokseverk%2Fwakelock-toggle-element/lists"}