您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
浏览微信公众号时自动发现音频,并生成下载按钮
// ==UserScript== // @name 微信公众号音频 助手 // @namespace http://tampermonkey.net/ // @version 0.12 // @description 浏览微信公众号时自动发现音频,并生成下载按钮 // @author BeihaiZhang // @match https://mp.weixin.qq.com/s* // @grant GM_download // ==/UserScript== (function() { 'use strict'; var mpvoices=document.querySelectorAll('mpvoice'); var i; for (i = 0; i < mpvoices.length; i++) { let mpvoice = mpvoices[i] if(mpvoice){ let fileid=mpvoice.getAttribute('voice_encode_fileid'); let title=mpvoice.getAttribute('name'); let url='https://res.wx.qq.com/voice/getvoice?mediaid='+fileid; let tips=document.createElement('div'); tips.style="min-width:300px;min-height:30px;background:#ff0;color:#f00;font-size:120%;text-align:center;line-height:30px;cursor:pointer;padding:10px;border-radius:10px;border:1px solid #f00;"; tips.innerHTML="下载音频“"+title+"”"; tips.onclick=function(){ GM_download(url,title+'.mp3'); }; mpvoice.after(tips); } } })();