您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
复制飞书文档链接时自动添加文档标题
当前为
// ==UserScript== // @name 飞书文档标题复制助手 // @namespace http://tampermonkey.net/ // @version 1.0 // @description 复制飞书文档链接时自动添加文档标题 // @author Your name // @match *://*.feishu.cn/* // @grant none // @run-at document-end // @license UNLICENSED // ==/UserScript== (function(){ const $={ h: document.createElement.bind(document), q: document.querySelector.bind(document), c: (t)=>document.execCommand(t), g: ()=>window.getSelection().toString(), t: ()=>document.title.split(' - ')[0].trim() }; const _i=()=>{ const t=$.h('textarea'); t.style.cssText='position:fixed;top:-999px;left:-999px;'; document.body.appendChild(t); return t; }; const _c=(t)=>{ const i=_i(); i.value=t; i.select(); $.c('copy'); i.remove(); }; document.addEventListener('click',async(e)=>{ const b=e.target.closest('.lark-link-entry-v2__copylink, [data-test-id="copy-share-link"]'); if(!b)return; await new Promise(r=>setTimeout(r,100)); try{ let l=''; const i=$.q('[data-test-id="share-link-input"]'); l=i&&i.value?i.value:await navigator.clipboard.readText(); if(l.includes('feishu.cn/')){ const t=$.t(); if(!l.includes(t)){ _c(`${t} ${l}`); } } }catch(e){ console.error('复制失败:',e); } }); document.addEventListener('copy',(e)=>{ const s=$.g(); if(s.includes('feishu.cn/')){ e.preventDefault(); const t=$.t(); if(!s.includes(t)){ e.clipboardData.setData('text/plain',`${t} ${s}`); }else{ e.clipboardData.setData('text/plain',s); } } }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址