{"id":26647282,"url":"https://github.com/offirmo/hello-world-browser-extension","last_synced_at":"2025-03-24T23:51:35.755Z","repository":{"id":51868522,"uuid":"66960153","full_name":"Offirmo/hello-world-browser-extension","owner":"Offirmo","description":null,"archived":false,"fork":false,"pushed_at":"2021-05-09T10:08:44.000Z","size":53,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-09T14:32:14.085Z","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":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Offirmo.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":"2016-08-30T16:53:22.000Z","updated_at":"2024-04-09T14:32:14.086Z","dependencies_parsed_at":"2022-08-23T12:40:46.768Z","dependency_job_id":null,"html_url":"https://github.com/Offirmo/hello-world-browser-extension","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/Offirmo%2Fhello-world-browser-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Offirmo%2Fhello-world-browser-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Offirmo%2Fhello-world-browser-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Offirmo%2Fhello-world-browser-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Offirmo","download_url":"https://codeload.github.com/Offirmo/hello-world-browser-extension/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245372354,"owners_count":20604490,"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-03-24T23:51:35.300Z","updated_at":"2025-03-24T23:51:35.746Z","avatar_url":"https://github.com/Offirmo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hello-world-browser-extension\n\nThe simplest, most trivial browser extension, featuring:\n* content script (aka. injected)\n* background script\n* toolbar button opening a popup\n* options page\n* notification\n* ...\n\n## references\n\n* https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Your_first_WebExtension\n* https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Your_second_WebExtension\n* https://developer.chrome.com/extensions/getstarted\n\nAPI\n* permission field\n  * permission ids https://developer.chrome.com/extensions/declare_permissions#manifest\n  * match patterns https://developer.chrome.com/extensions/match_patterns\n  \n```json\n\t\"permissions\": [\n\t\t\"alarms\",\n\t\t\"background\",\n\t\t\"bookmarks\",\n\t\t\"clipboardRead\",\n\t\t\"clipboardWrite\",\n\t\t\"contentSettings\",\n\t\t\"contextMenus\",\n\t\t\"cookies\",\n\t\t\"debugger\",\n\t\t\"downloads\",\n\t\t\"geolocation\",\n\t\t\"history\",\n\t\t\"idle\",\n\t\t\"management\",\n\t\t\"nativeMessaging\",\n\t\t\"notifications\",\n\t\t\"storage\",\n\t\t\"tabs\",\n\t\t\"unlimitedStorage\",\n\t\t\"webNavigation\"\n\t],\n```\n\nCapabilities\n* intercept requests https://developer.chrome.com/extensions/webRequest\n* TODO proxy? NOT SUPPORTED ON CHROME https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/proxy\n* modify request result = not possible? proxy\n  * achievable with content script + https://intoli.com/blog/sandbox-breakout/\n  \nTechniques\n* communicate between contexts https://dev.to/christiankaindl/a-webextension-guide-36ag\n* using modules https://medium.com/front-end-weekly/es6-modules-in-chrome-extensions-an-introduction-313b3fce955b\n\n\nSee also\n* TODO https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/onboarding_upboarding_offboarding_best_practices\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffirmo%2Fhello-world-browser-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foffirmo%2Fhello-world-browser-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffirmo%2Fhello-world-browser-extension/lists"}