您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Fix Twitter widgets on TT1069 which are not working
// ==UserScript== // @name Twitter Widget Fixer for TT1069 // @namespace https://greasyfork.org/users/790126-erohmst // @version 0.1.1 // @description Fix Twitter widgets on TT1069 which are not working // @author erohmst // @match *://www.tt1069.com/bbs/thread-* // @match *://www.tt1069.com/bbs/forum.php* // @grant none // ==/UserScript== (function() { 'use strict'; const widgetScript = document.createElement('script'); widgetScript.src = 'https://platform.twitter.com/widgets.js'; widgetScript.async = true; widgetScript.charset = 'utf-8'; document.head.append(widgetScript); const embeds = document.querySelectorAll('iframe[src^="https://twitter.com/i/videos/tweet/"]'); for(const emb of embeds) { const tweetId = emb.src.replace('https://twitter.com/i/videos/tweet/', ''); emb.insertAdjacentHTML('beforebegin', '<blockquote class="twitter-tweet"><a href="https://twitter.com/i/status/' + tweetId + '?ref_src=twsrc%5Etfw"></a></blockquote>'); emb.remove(); } })();