
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
attached-windows
Advanced tools
Using Chrome extension API attach multiple normal and/or popup windows together that behave like a single window.
Use attached-windows module in your Chrome extension to attach multiple normal and/or popup windows together that behave like a single window.
npm i attached-windows
A minimal example of attaching 3 windows:
import AttachedWindows from 'attached-windows'
import { AttachedWindowsConfiguration } from 'attached-windows'
const configuration: AttachedWindowsConfiguration = {
container: {
top: 0,
left: 0,
width: 1300,
height: 600,
state: 'normal'
},
windows: [
{
id: (await chrome.windows.create({ type: 'normal', url: 'https://twitter.com/' })).id as number,
widthFraction: 0.5,
isPrimary: true,
isHidden: false,
type: 'normal'
},
{
id: (await chrome.windows.create({ type: 'normal', url: 'https://www.google.com/' })).id as number,
widthFraction: 0.225,
isPrimary: false,
type: 'popup'
},
{
id: (await chrome.windows.create({ type: 'normal', url: 'https://www.github.com/' })).id as number,
widthFraction: 0.25,
isPrimary: false,
type: 'popup'
}
]
}
AttachedWindows.initialize(configuration)
Terminates the AttachedWindows instance and close attached windows:
AttachedWindows.terminate({ closeWindows: true, closePrimary: false })
You can specify the options closeWindows
and closePrimary
to control if all windows or just the primary window should be closed.
AttachedWindowsContainer
- An interface that represents the configuration of the attached windows container.
Properties:
top
: numberleft
: numberwidth
: numberheight
: numberstate
: 'normal' | 'minimized'AttachedWindowsWindow
- An interface that represents the configuration of a single window within the container.
Properties:
id
: numbername
: any (optional)widthFraction
: numberisPrimary
: boolean (optional)isHidden
: boolean (optional)type
: 'normal' | 'popup'bounds
: AttachedWindowsContainer
AttachedWindowsConfiguration
- An interface that represents the configuration for the AttachedWindows class.
Properties:
container
: AttachedWindowsContainer
windows
: AttachedWindowsWindow[]
AttachedWindows
- The main class for managing attached windows.
Properties:
onRemoveAttachedWindow
: Function (optional)Methods:
initialize
: A method that initializes and attaches multiple windows. The input parameter configuration
is an object of type AttachedWindowsConfiguration
that includes the information required to initialize the attached windows.terminate
: A method that terminates the AttachedWindows instance and closes the attached windows. You can specify the options closeWindows
and closePrimary
to control if all windows or just the primary window should be closed.You are welcome to contribute! If you are adding a feature or fixing a bug, please contribute to the GitHub repository.
attached-windows is licensed under the MIT license.
@SheikhAminul |
FAQs
Using Chrome extension API attach multiple normal and/or popup windows together that behave like a single window.
We found that attached-windows 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.