您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Show twitter list in title.
当前为
// ==UserScript== // @name Show Twitter List // @namespace https://wiki.gslin.org/wiki/ShowTwitterList // @version 0.0.20180818.0 // @description Show twitter list in title. // @author Gea-Suan Lin <[email protected]> // @match https://twitter.com/* // @grant none // @run-at document-end // @license MIT // ==/UserScript== (function() { 'use strict'; let profile_banner_re = new RegExp('https://pbs\.twimg\.com/profile_banners/([0-9]+)/'); let url_re = new RegExp('^https://twitter\.com/[^/]+(/media)?$'); let main = function(){ if (!document.location.href.match(url_re)) { return; } let user_id = document.querySelector('.ProfileNav[data-user-id]').getAttribute('data-user-id'); let url = '/i/' + user_id + '/lists'; console.debug('Trying to fetch ' + url); let req = new XMLHttpRequest(); req.addEventListener('load', function(){ let h = document.createElement('div'); h.innerHTML = JSON.parse(this.responseText).html; console.debug('Got ' + url, h); let c = h.querySelector('.membership-checkbox[checked="checked"]'); if (!c) { return; } let l = c.parentElement.innerText.trim(); let title = document.getElementsByTagName('title')[0]; title.innerHTML = '(' + l + ') ' + title.innerHTML; }); req.open('GET', url); req.send(); }; main(); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址