
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
browser-sync-reuse-tab
Advanced tools
Attempt to reuse an existing tab that was opened by BrowserSync
Attempt to reuse an existing tab that was opened by BrowserSync.
Depending on your configuration, when you start BrowserSync, a tab is opened in your browser pointing to BrowserSync. When you restart BrowserSync another tab is opened in the browser. The more times you restart BrowserSync, the more tabs that will be opened in the browser.
This package gets around this by trying to reuse an existing tab that was already opened by BrowserSync. When you restart BrowserSync, the previously opened tab will be focused and reloaded. The window that the tab is in will also be focused.
At this moment, only Google Chrome on OS X >= 10.10 is supported, see notes below.
npm install --save-dev browser-sync-reuse-tab
var browserSync = require('browser-sync').create()
var browserSyncReuseTab = require('browser-sync-reuse-tab')(browserSync)
browserSync.init({
server: './src',
open: false // do not automatically open browser
}, browserSyncReuseTab)
BrowserSync lets you configure which URL to open when it starts. browser-sync-reuse-tab
needs the open
option that is passed to BrowserSync.init
to be set to false
so that it can attempt to reuse an existing tab that was already opened. You can still tell BrowserSync which URL to open when it starts by passing the name of the URL to browser-sync-reuse-tab
:
var browserSync = require('browser-sync').create()
var browserSyncReuseTab = require('browser-sync-reuse-tab')(browserSync, 'external') // open the external URL when browserSync starts
browserSync.init({
server: './src',
open: false // do not automatically open browser
}, browserSyncReuseTab)
See the BrowserSync documentation for the names of the URL's. By default, if no URL is specified the local
URL will be used.
Only Google Chrome at the moment.
Only OS X >= 10.10 at the moment.
This package use's JavaScript to control the browsers behaviour. Support for using JavaScript for Automation was added in OS X 10.10. Older versions of OS X could be supported if i had used AppleScript instead. But AppleScript is gross.
This package scratches an itch for my own workflow. I predominantly use Google Chrome on OS X for development, so yeah its a bit biased. I would love to add support for other browsers and operating systems. If you fancy lending a hand, pull requests are welcome :)
1.0.3
Same as 1.0.2
(accidentally deleted 1.0.2
from npm 🤦)
FAQs
Attempt to reuse an existing tab that was opened by BrowserSync
The npm package browser-sync-reuse-tab receives a total of 42 weekly downloads. As such, browser-sync-reuse-tab popularity was classified as not popular.
We found that browser-sync-reuse-tab 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
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.