您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a plain-text link to YouTube profile pages that links to the corresponding Social Blade page for that channel, with a hover effect to match the YouTube font and color design.
当前为
// ==UserScript== // @name YouTube to Social Blade Linker // @namespace https://your-namespace-here/ // @version 1 // @description Adds a plain-text link to YouTube profile pages that links to the corresponding Social Blade page for that channel, with a hover effect to match the YouTube font and color design. // @author webmaster.greasyfork // @match https://www.youtube.com/@* // @grant none // ==/UserScript== (function() { 'use strict'; // Get the username from the YouTube profile page URL const username = window.location.href.match(/youtube\.com\/@(.+)/i)[1]; // Create a link element and append it to the body of the page const link = document.createElement('a'); link.innerText = 'Social Blade'; link.href = `https://socialblade.com/youtube/channel/${username}`; link.target = '_blank'; // Open link in a new tab link.style.position = 'fixed'; link.style.bottom = '10px'; link.style.right = '10px'; link.style.backgroundColor = 'transparent'; link.style.color = '#606060'; link.style.fontFamily = 'Roboto, Arial, sans-serif'; link.style.fontSize = '16px'; link.style.textDecoration = 'none'; link.style.padding = '12px'; link.addEventListener('mouseover', () => { link.style.backgroundColor = '#272727'; link.style.color = '#ffffff'; }); link.addEventListener('mouseout', () => { link.style.backgroundColor = 'transparent'; link.style.color = '#606060'; }); document.body.appendChild(link); // Add support for ALT + 1 key to trigger clicking the Social Blade button document.addEventListener('keydown', function(event) { if (event.altKey && event.key === '1') { event.preventDefault(); link.click(); } }); })();