您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Twitter replace IMAGE with ORIG
当前为
// ==UserScript== // @name Twitter new layout Image ORIG // @description Twitter replace IMAGE with ORIG // @include https://twitter.com/*/media // @version 1.02 // @grant none // @require https://code.jquery.com/jquery-3.4.1.min.js // @namespace https://gf.qytechs.cn/users/164357 // ==/UserScript== //Assign Variable console.log("Start"); let href = document.location.href; const sty = `<style> .new-img { width: calc(100% - 20vw); border-radius: 10px; } </style> ` $("head").append(sty); function changeToOrig(link) { const n = link.search(/.jpg|.png/) let newLink = "" if(link.indexOf('jpg')>0){ newLink = link.substring(0,n) + "?format=jpg&name=orig" } else if(link.indexOf('png')>0){ newLink = link.substring(0,n) + "?format=png&name=orig" } return newLink } //End Assign Variable //Get started //End started //Event Handlers $(document).ready(function(){ setInterval(function(){ $(".tweet").each(function(index,value){ let anchor1 = $(this).find(".js-tweet-text-container") let anchor2 = $(this).find(".new-img-container") let anchor3 = $(this).find("small.time") if(anchor2.length == 0){$(anchor1).after(`<div class="new-img-container"></div>`)} if(anchor2.length == 1){ let photoContainer = $(this).find(".AdaptiveMedia-photoContainer") $(photoContainer).each(function(index,value){ let img = $(this).attr("data-image-url") let fullImg = changeToOrig(img) $(anchor2).append(`<a href="${fullImg}" target="_blank"><img class="new-img" src="${fullImg}"></img></a>`) }) $(this).find(".AdaptiveMediaOuterContainer").remove() if($(this).find(".remove-tweet").length < 1){$(anchor3).after(`<button class="btn remove-tweet">Remove</button>`)} } }) }, 3000); }) $("body").on("click",".remove-tweet",function(){ $(this).closest(".tweet").remove() })
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址