分享一个自用的小书签 - 一键复制网页标题和url为md格式

javascript:(function(){let%20t\=document.title,u\=document.location.href,c\=\`[${t}](\${u})\`;navigator.clipboard.writeText(c).then(()\=\>{alert("已复制:...
分享一个自用的小书签 - 一键复制网页标题和url为md格式
分享一个自用的小书签 - 一键复制网页标题和url为md格式
javascript:(function(){let%20t\=document.title,u\=document.location.href,c\=\`[${t}](\${u})\`;navigator.clipboard.writeText(c).then(()\=\>{alert("已复制:\\n"+c)}).catch(()\=>{let%20e\=document.createElement("textarea");e.value\=c;document.body.appendChild(e);e.select();document.execCommand("copy");document.body.removeChild(e);alert("已复制(兼容模式):\\n"+c)})})();

让豆包写的,保存到浏览器书签点击就能用。
做笔记快速记录来源时使用,好处是不用安装油猴脚本。

4 个帖子 - 4 位参与者

阅读完整话题

来源: LinuxDo 最新话题查看原文