
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
github-injection
Advanced tools
Tiny script which helps you to build better browser extensions for GitHub.com
Tiny script which helps you to build better browser extensions for GitHub.com
GitHub.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.
GitHub.com uses 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.
$ npm install --save github-injection
const gitHubInjection = require('github-injection');
gitHubInjection(() => {
const el = window.document.getElementsByClassName('header')[0];
const randomColor = '#' + ((1<<24) * Math.random()|0).toString(16);
el.style.backgroundColor = randomColor;
});
Copyright (c) 2015 Stefan Buck. Licensed under the MIT license.
FAQs
Tiny script which helps you to build better browser extensions for GitHub.com
The npm package github-injection receives a total of 1 weekly downloads. As such, github-injection popularity was classified as not popular.
We found that github-injection demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.