您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Generates a small link directly to the source of Twitter media embeds (Youtube, Twitch clips, etc.)
// ==UserScript== // @name Direct Links to Twitter Media Embeds // @namespace http://bifrost.me // @version 1.0 // @description Generates a small link directly to the source of Twitter media embeds (Youtube, Twitch clips, etc.) // @match https://twitter.com/* // @grant none // @require https://code.jquery.com/jquery-1.12.4.min.js // ==/UserScript== var documentHeight = ''; // Monitor the height of the window to detect when new tweets have been dynamically loaded function heightWatcher() { if (documentHeight != document.body.scrollHeight) { addLinks(); } documentHeight = document.body.scrollHeight; setTimeout(function(){heightWatcher();}, 3000); }; function addLinks() { $('div.card-type-player').each(function() { if ($(this).attr('link-added')) { return; } const src = $(this).attr('data-card-url'); $(this).before('<a href=\"' + src + '\">→</a>'); $(this).attr('link-added', true) }); }; (function() { 'use strict'; heightWatcher(); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址