FloatingFrameUI
简单的一个悬浮框,你可以自定义悬浮框的位置,文字内容
Today's Installations
0
Total Installations
808
Creation Date
10 months ago
Update Date
10 months ago
User Rating
No Rating
// @require https://scriptcat.org/lib/1155/1.0.5/FloatingFrameUI%20.js
Forum Post
v1.0.5@require库

20230722更新

showFloatUrl: ['bbs.tampermonkey.net.cn'], // 展示悬浮框的url
hideFloat: false, // 是否隐藏悬浮框

如果你要所以的页面都不显示悬浮框就把hideFloat设置为true,如果你只想要指定url展示你就hideFloat设置为false,然后showFloatUrl写上要展示的url地址

使用案例

注意背景颜色用background不要用backgroundColor或者background-color会不生效

let options = {
    content: '剪切板内容',
    background: 'black',
    width: '200px',
    height: '200px',
    background: '#333',
    padding: '10px', // 内边距
    borderRadius: '5px', // 圆角半径
    boxShadow: '0 0 10px rgba(0, 0, 0, 0.3)', // 阴影效果
    zIndex: 9999,  // 设置层级的优先级
    draggable: true, // 支持拖动
    prohibitDragUrl: ['yuque.com'], // 哪些页面禁止拖动
    element: element,  // 增加内容
    position: { // 悬浮框位置
        top: '50px',
        left: '50px',
    }
}
FloatingFrameUI()(options)

我可能会经常用的

 var element = document.createElement('TextArea');
    element.style.height = '150px'
    element.innerHTML = '你好';
    let options = {
        content: '剪切板内容',
        background: 'black',
        element: element
  }
 FloatingFrameUI()(options)
Script Score
No one has rated the script yet. Be the first to rate it!