{"id":25555245,"url":"https://github.com/octolinker/injection","last_synced_at":"2026-03-08T06:31:56.606Z","repository":{"id":26488504,"uuid":"29940634","full_name":"OctoLinker/injection","owner":"OctoLinker","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-07T17:20:12.000Z","size":91,"stargazers_count":36,"open_issues_count":2,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-01T16:51:23.305Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OctoLinker.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,"governance":null}},"created_at":"2015-01-27T23:33:34.000Z","updated_at":"2024-12-01T14:07:57.000Z","dependencies_parsed_at":"2022-06-30T02:33:43.584Z","dependency_job_id":null,"html_url":"https://github.com/OctoLinker/injection","commit_stats":{"total_commits":34,"total_committers":8,"mean_commits":4.25,"dds":0.5,"last_synced_commit":"7f7a8e40ed45f824de890acd7f1eb37c0e1799a8"},"previous_names":["github-linker/injection"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/OctoLinker/injection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoLinker%2Finjection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoLinker%2Finjection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoLinker%2Finjection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoLinker%2Finjection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OctoLinker","download_url":"https://codeload.github.com/OctoLinker/injection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoLinker%2Finjection/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263984988,"owners_count":23539769,"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-02-20T13:58:05.109Z","updated_at":"2025-12-12T03:26:37.831Z","avatar_url":"https://github.com/OctoLinker.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# injection\n[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]\n\n\u003e Tiny script which helps you to build better browser extensions for GitHub.com\n\n## Why you need this package\n\nGitHub.com is a huge web app with millions of visitors every day. To reduce the serve load, some parts are build as a single page app. This means, not every click results in a page reload. This is a big problem for some extension scenarios.\n\nGitHub.com uses [pjax](https://github.com/defunkt/jquery-pjax) which fires an event after replacing the requested page with the previous one. GitHub-inject will invoke the provided callback when `pjax:end` is dispatched and you can reinitialize your extension. For simplicity the callback is also executed on the first script execution.\n\n## Install\n\n```bash\n$ npm install --save github-injection\n```\n\n## Usage\n\n```js\nconst gitHubInjection = require('github-injection');\n\ngitHubInjection(() =\u003e {\n  const el = window.document.getElementsByClassName('header')[0];\n  const randomColor = '#' + ((1\u003c\u003c24) * Math.random()|0).toString(16);\n  el.style.backgroundColor = randomColor;\n});\n```\n\n\n## License\n\nCopyright (c) 2015 Stefan Buck. Licensed under the MIT license.\n\n\n\n[npm-url]: https://npmjs.org/package/github-injection\n[npm-image]: https://badge.fury.io/js/github-injection.svg\n[travis-url]: https://travis-ci.org/octolinker/injection\n[travis-image]: https://travis-ci.org/OctoLinker/injection.svg?branch=master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctolinker%2Finjection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctolinker%2Finjection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctolinker%2Finjection/lists"}