IframeManager

Created at 4 months ago
Updated at 5 days ago
一个方便管理iframe的库
#iframe管理
#毛玻璃
#UI优化
Total Installs
94
Today's New
+3
User Rating
- / 5.0 (0)
Current Version
2026.06.05.01
// @require https://scriptcat.org/lib/5415/2026.06.05.01/IframeManager.js?sha384-qJYrEhTVPX3w9h1fWGo1hW+/yCwLEi36RzwonDaPzSgNzsqEM2lPPeIFiA1Q3UVL
Library Details
This is a library used by userscripts, you can reference it directly in your scripts.
一个用于在页面右侧管理多个 iframe 浮窗的 JavaScript 库,支持玻璃拟态 UI、消息通信和自动化操作。

IframeManager 使用说明

一个用于在页面右侧管理多个 iframe 浮窗的 JavaScript 库,支持玻璃拟态 UI、消息通信和自动化操作。


核心功能

功能 说明
侧边栏管理 右侧滑出式 iframe 容器,支持收起/展开
多窗口支持 同时打开多个 iframe,网格布局自动排列
玻璃拟态 UI 毛玻璃效果、圆角、阴影、动画过渡
消息通信 父子页面双向 postMessage 通信
计数徽章 左上角实时显示当前打开窗口数量
自动操作 iframe 加载完成后自动执行预设脚本

快速开始

基础用法:IframeManager

最简单的 iframe 管理器,手动控制打开和关闭。

const manager = new IframeManager('https://your-domain.com');

// 打开 iframe
await manager.Open('https://example.com/page1');
await manager.Open('https://example.com/page2');

// 关闭指定 iframe
manager.Close('https://example.com/page1');