
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
browser-sync-close-hook
Advanced tools
Closes Browser Tabs which are connected to browserSync once browserSync disconnects (when stopping gulp for example)
Closes Browser Tabs which are connected to browserSync once browserSync disconnects (when stopping gulp for example).
> npm install browser-sync-close-hook --save-dev
const autoClose = require('browser-sync-close-hook');
gulp.task('serve', ['watch'], () => {
browserSync.use({
plugin() {},
hooks: {
'client:js': autoClose, // <-- important part
},
});
browserSync({
ui: false,
notify: false,
server: {
baseDir: './public',
middleware: [historyApiFallback()],
},
});
});
The only thing this module does is exporting a function string which useses the clients browsers window.close function to close the tab.
module.exports = "___browserSync___.socket.on('disconnect', window.close.bind(window));";
for providing the original solutions:
for the discussion which let to solving the issue of too many open tabs:
FAQs
Closes Browser Tabs which are connected to browserSync once browserSync disconnects (when stopping gulp for example)
The npm package browser-sync-close-hook receives a total of 16 weekly downloads. As such, browser-sync-close-hook popularity was classified as not popular.
We found that browser-sync-close-hook 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.