{"id":21620651,"url":"https://github.com/raybb/drone-ui-alerts","last_synced_at":"2025-10-29T01:41:33.855Z","repository":{"id":54488963,"uuid":"334291764","full_name":"RayBB/drone-ui-alerts","owner":"RayBB","description":"drone.io ui gets updating favicon and desktop notifications","archived":false,"fork":false,"pushed_at":"2021-02-15T23:44:58.000Z","size":86,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T06:33:18.129Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RayBB.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":"2021-01-30T00:06:33.000Z","updated_at":"2023-02-21T15:41:13.000Z","dependencies_parsed_at":"2022-08-13T17:31:06.927Z","dependency_job_id":null,"html_url":"https://github.com/RayBB/drone-ui-alerts","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/RayBB%2Fdrone-ui-alerts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RayBB%2Fdrone-ui-alerts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RayBB%2Fdrone-ui-alerts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RayBB%2Fdrone-ui-alerts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RayBB","download_url":"https://codeload.github.com/RayBB/drone-ui-alerts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248365433,"owners_count":21091786,"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":"2024-11-24T23:12:15.392Z","updated_at":"2025-10-29T01:41:33.781Z","avatar_url":"https://github.com/RayBB.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# drone-ui-alerts\nThis script adds updating favicon and desktop notifications to [drone.io ui](https://github.com/drone/drone-ui).\n\n## What does this do\n\nIt makes the drone-ui favicon refelect the status of the pipeline on the current page instead of the status of all pipelines running.\n\nIt also sends a notification when the pipeline status changes.\n\n\u003cimg src=\"docs/update.gif\" alt=\"colors updating\" height=\"150px\"/\u003e\n\n## Why\n\nIt is annoying to keep checking the drone page for updates instead of looking at the favicon or seeing a notification. There is an [open issue](https://github.com/drone/drone-ui/issues/290) in the drone-ui repo about this.\n\n## Installation\n\nThis script was designed to be used with [Violentmonkey](https://violentmonkey.github.io/) but should also work with [Greasemonkey](https://wiki.greasespot.net/Greasemonkey) or [Tampermonkey](https://www.tampermonkey.net/).\n\nTo use this script just install one of the extension above, click [create new script](https://violentmonkey.github.io/guide/creating-a-userscript/), and paste [this](https://github.com/RayBB/drone-ui-alerts/blob/main/index.js) script.\n\nYou should update the `@match` section at the top of the script with the url of your drone installation.\n\n### Bookmarklets\n\nYou can make a [bookmarklet](https://en.wikipedia.org/wiki/Bookmarklet) to run as needed instead of installing an extension. I recommend creating the bookmarklet using [this](https://chriszarate.github.io/bookmarkleter/) tool. Notifications won't work with the bookmarklet since they depend on the [GM_notification](https://violentmonkey.github.io/api/gm/#gm_notification) api.\n\n## Next Steps\n\n* Use [getValue](https://violentmonkey.github.io/api/gm/#gm_getvalue) for user preferences s\n* Use a more object oriented approach\n* Evaluate using the [MutationObserver](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) instead of polling\n\n## Learnings\n\n* You cannot use CSS to change SVGs when they are encoded in `img` tags. Otherwise I would use CSS to [change the SVG color](https://css-tricks.com/lodge/svg/09-svg-data-uris/).\n* You [don't](https://css-tricks.com/probably-dont-base64-svg/) need to base64 encode [data URI](https://en.wikipedia.org/wiki/Data_URI_scheme), but you may need to encode them with [encodeURIComponent](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraybb%2Fdrone-ui-alerts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraybb%2Fdrone-ui-alerts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraybb%2Fdrone-ui-alerts/lists"}