Check archival state of a source code repository and propose to update it if needed.
UpdateSWH Extension
This extension checks if a software development repository visited by the user in a supported code hosting platform is archived and uptodate in Software Heritage. A color button on the right of the browser indicates if it is uptodate (green), in which case clicking on the button opens a tab on the corresponding page of the archive, missing (grey) or not up to date (yellow), in which case clicking on the button triggers a save code now request, and optionally shows the save request submitted to the Software Heritage archive.
A red color indicates that the API request of information for the repository did not succeed: this happens typically when one is visiting a repository that is not publicly accessible, and that naturally cannot be archived.
Bitbucket, GitHub, GitLab.com and GitLab instances on domain names of the shape gitlab.*.*, and Gitea instances of the shape gitea.*.* are supported out of the box. GitLab and Gitea instances on other domains can be added in the options panel.
More documentation is available on the website at https://www.softwareheritage.org/browser-extensions/
Read more
A red color indicates that the API request of information for the repository did not succeed: this happens typically when one is visiting a repository that is not publicly accessible, and that naturally cannot be archived.
Bitbucket, GitHub, GitLab.com and GitLab instances on domain names of the shape gitlab.*.*, and Gitea instances of the shape gitea.*.* are supported out of the box. GitLab and Gitea instances on other domains can be added in the options panel.
More documentation is available on the website at https://www.softwareheritage.org/browser-extensions/
Source Manifest.json
{"update_url": "https://clients2.google.com/service/update2/crx", "name": "UpdateSWH", "version": "0.6.8", "manifest_version": 3, "description": "Check archival state of a source code repository and propose to update it if needed.", "icons": { "16": "img/icon-16.png", "32": "img/icon-32.png", "48": "img/icon-48.png", "64": "img/icon-64.png", "128": "img/icon-128.png" }, "action": { "default_title": "UpdateSWH", "default_popup": "popup.html", "default_icon": { "16": "/img/icon-16.png", "32": "/img/icon-32.png", "48": "/img/icon-48.png", "128": "/img/icon-128.png" } }, "background": { "service_worker": "background.js" }, "content_scripts": [ { "matches": [ "" ], "css": [ "css/updateswh.css" ], "js": [ "js/jquery-3.6.0.min.js", "updateswh.js" ] } ], "content_security_policy": { "extension_pages": "default-src 'self'; object-src 'self'; style-src 'self'; connect-src 'self' https://archive.softwareheritage.org/" }, "web_accessible_resources": [ { "matches": [ "" ], "resources": [ ] } ], "options_ui": { "page": "options.html", "open_in_tab": false }, "permissions": [ "storage", "tabs", "activeTab" ], "host_permissions": [ "" ]}
Read more