您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a button to copy ASF code to clipboard
- // ==UserScript==
- // @name Copy ASF Code Button
- // @namespace http://tampermonkey.net/
- // @version 1.01
- // @description Adds a button to copy ASF code to clipboard
- // @author 祈之羽
- // @match https://keylol.com/*
- // @grant GM_setClipboard
- // @license MIT
- // ==/UserScript==
- (function() {
- 'use strict';
- var hasSteamAppPaths = Array.from(document.querySelectorAll('a[href]')).some(link => link.href.includes('store.steampowered.com/app/'));
- if (hasSteamAppPaths) {
- var copyButton = document.createElement('button');
- copyButton.innerHTML = 'Copy ASF Code';
- copyButton.style.position = 'fixed';
- copyButton.style.top = '20px';
- copyButton.style.left = '20px';
- copyButton.style.zIndex = '9999';
- copyButton.addEventListener('click', function() {
- var links = document.querySelectorAll('a[href]');
- var numbers = new Set();
- links.forEach(function(link) {
- var match = link.href.match(/store\.steampowered\.com\/app\/(\d+)/);
- if (match) {
- numbers.add(match[1]);
- }
- });
- var asfCode = '!addlicense asf ' + Array.from(numbers).map(number => 'a/' + number).join(',');
- GM_setClipboard(asfCode);
- alert('ASF code copied to clipboard!');
- });
- document.body.appendChild(copyButton);
- }
- })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址