// ==UserScript== // @name Wechat Article Menu // @name:zh-CN 微信公众号阅读助手 // @description Wechat Article Menu, Show Some Useful Options. // @description:zh-CN 微信公众号文章菜单选项,展示一些有用的选项。 // @namespace https://www.runningcheese.com // @version 1.2 // @author RunningCheese // @match https://mp.weixin.qq.com/s/* // @match https://mp.weixin.qq.com/s?* // @run-at document-start // @icon https://t1.gstatic.cn/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://mp.weixin.qq.com // @license MIT // @downloadURL none // ==/UserScript== javascript:(function(){'use strict';(function(){const e=document.createElement('div');e.style.cssText='position:fixed;top:12%;left:20%;transform:translate(-50%,0);background:#fff;border:none;border-radius:8px;padding:4px;width:200px;box-shadow:0 4px 12px rgba(0,0,0,0.25);z-index:999999;cursor:move;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif';let t=0,n=0,o=0,i=0,s=!1;e.onmousedown=l=>{s=!0;t=l.clientX;n=l.clientY;o=e.offsetLeft;i=e.offsetTop;e.style.transform='translateX(-50%)'};document.onmousemove=l=>{if(!s)return;const d=l.clientX-t,r=l.clientY-n;e.style.left=o+d+'px';e.style.top=i+r+'px'};document.onmouseup=()=>s=!1;let lastEscTime=0;document.addEventListener('keydown',function(evt){if(evt.key==='Escape'){const now=Date.now();if(now-lastEscTime<=300){e.remove()}lastEscTime=now}});const l=[{title:'▼ 微信阅读助手 ×',isTitle:true},{title:'1、原始链接',code:'prompt(\'原始链接:\', \'https://mp.weixin.qq.com/s?__biz=\'+biz+\'&idx=1&mid=\'+mid+\'&sn=\'+sn)'},{title:'2、文章摘要',code:'summary = document.querySelector(\'meta[name="description"]\').content; prompt(\'文章摘要:\',summary)'},{title:'3、文章封面',code:'const cover = document.querySelector(\'meta[property="twitter:image"]\').content; window.open(cover, "_blank");'},{title:'4、历史消息链接',code:'prompt(\'历史消息链接:\',\'https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=\'+biz+\'#wechat_redirect\')'},{title:'5、查看所有图片',code:'const images = Array.from(document.querySelectorAll("img")).filter(img => (img.src || img.dataset.src) && !(img.src && img.src.startsWith("data:image/svg+xml")) && !(img.dataset.src && img.dataset.src.startsWith("data:image/svg+xml"))); if(images.length === 0) { alert("未找到图片"); return; } const win = window.open("", "_blank"); win.document.write("
${i+1}.