您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Change href to data-href and set target to _blank for specified buttons on desidime.com
当前为
// ==UserScript== // @name Modify Desidime Buttons // @namespace http://tampermonkey.net/ // @version 1.0 // @license MIT // @description Change href to data-href and set target to _blank for specified buttons on desidime.com // @author Your Name // @match https://www.desidime.com/* // @grant none // ==/UserScript== (function() { 'use strict'; // Select all buttons with the specified class const buttons = document.querySelectorAll('.btn-lgetdeal.home-page-get-deal.gtm-getdeal-home'); // Iterate over each button and modify the attributes buttons.forEach(button => { const dataHref = button.getAttribute('data-href'); if (dataHref) { button.setAttribute('href', dataHref); button.setAttribute('target', '_blank'); } }); })();