您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Twitter Search own tweets search specific accounts search current account 推特搜索当前用户推文
// ==UserScript== // @name Twitter - Search own tweets // @version 1.3 // @grant none // @require https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js // @match https://twitter.com/* // @author happmaoo // @description Twitter Search own tweets search specific accounts search current account 推特搜索当前用户推文 // @namespace https://gf.qytechs.cn/users/28220 // ==/UserScript== (function() { 'use strict'; // Constantly attempt to remove the trends panel, as navigating the site will regenerate it. var have = 0; setInterval(function () { //alert($('div[data-testid="UserName"] > :nth-child(1) > :nth-child(1) > :nth-child(2) span').length); if ($('div[data-testid="UserName"] > :nth-child(1) > :nth-child(1) > :nth-child(2) span').length) { // block of code to be executed if the condition is true if(have == 0){ //alert("have"); have = 1; //$('div[data-testid="UserName"] > :nth-child(1) > :nth-child(1) > :nth-child(2) span').after("<input type='text' id='a1'></input><input type='button' id='a2' value='search' onclick='myFunction()'></input>"); var intext = document.createElement("input"); intext.type = "text"; intext.value=""; intext.onkeydown = () => { if(event.keyCode==13) { const url = "https://twitter.com/search?q=from%3A"+$('div[data-testid="UserName"] > :nth-child(1) > :nth-child(1) > :nth-child(2) span').html() + " " + intext.value + "&src=typed_query&f=live"; window.open(url, "_blank"); return false; } }; var btn = document.createElement("button"); btn.innerHTML = "Search"; btn.onclick = () => { //alert(intext.value); const url = "https://twitter.com/search?q=from%3A"+$('div[data-testid="UserName"] > :nth-child(1) > :nth-child(1) > :nth-child(2) span').html() + " " + intext.value + "&src=typed_query&f=live"; window.open(url, "_blank"); return false; }; $('div[data-testid="UserName"] > :nth-child(1) > :nth-child(1) > :nth-child(2) span').after(btn); $('div[data-testid="UserName"] > :nth-child(1) > :nth-child(1) > :nth-child(2) span').after(intext); } } else { have = 0; //alert("no"); } }, 3000); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址