您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a Download button to each instant sound on MyInstants website.
// ==UserScript== // @name MyInstants Download Button // @namespace http://tampermonkey.net/ // @version 0.2 // @description Adds a Download button to each instant sound on MyInstants website. // @author Cryptophunk // @match https://www.myinstants.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // Function to create and add the "Download" button function addDownloadButton(instantContainer) { const audioSrc = instantContainer.querySelector('button.small-button').getAttribute('onclick').match(/play\('([^']+)'/)[1]; const audioTitle = instantContainer.querySelector('.instant-link').textContent; const downloadButton = document.createElement('a'); downloadButton.setAttribute('class', 'instant-action-button'); downloadButton.setAttribute('title', 'Download'); downloadButton.setAttribute('href', audioSrc); downloadButton.setAttribute('download', `${audioTitle}.mp3`); const downloadIcon = document.createElement('img'); downloadIcon.setAttribute('class', 'instant-action-button-icon'); downloadIcon.setAttribute('src', '/media/images/icons/save.svg'); downloadIcon.setAttribute('alt', 'Download icon'); downloadButton.appendChild(downloadIcon); const shareBox = instantContainer.querySelector('.result-page-instant-sharebox'); shareBox.insertBefore(downloadButton, shareBox.lastChild); } // Find all instant containers and add the "Download" button to each const instantContainers = document.querySelectorAll('.instant'); instantContainers.forEach(addDownloadButton); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址