// ==UserScript== // @name CNB Issue 网页内容收藏工具 // @namespace https://cnb.cool/IIIStudio/Greasemonkey/CNBIssue/ // @version 1.7 // @description 在任意网页上选择页面区域,一键将选中内容从 HTML 转为 Markdown,按"页面信息 + 选择的内容"的格式展示,并可直接通过 CNB 接口创建 Issue。支持链接、图片、代码块/行内代码、标题、列表、表格、引用等常见结构的 Markdown 转换。 // @author IIIStudio // @match *://*/* // @noframes // @grant GM_xmlhttpRequest // @grant GM_notification // @grant GM_setClipboard // @grant GM_addStyle // @grant GM_getValue // @grant GM_setValue // @connect api.cnb.cool // @connect cnb.cool // @connect api.cnb.build // @connect cnb.build // @connect * // @connect weibo.com // @connect *.weibo.com // @connect sinaimg.cn // @connect *.sinaimg.cn // @connect tvax*.sinaimg.cn // @connect tva*.sinaimg.cn // @connect wx*.sinaimg.cn // @connect hb*.sinaimg.cn // @connect cdn3.ldstatic.com // @connect *.ldstatic.com // @connect ldstatic.com // @license MIT // ==/UserScript== (function() { 'use strict'; // 样式注入防重标记 const __CNB_FLAGS = Object.create(null); // 只注入一次样式:优先 GM_addStyle,缺失时回退到