您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
A thrown together script to open a tweets image in a new tab.
当前为
// ==UserScript== // @name Open Tweet Image // @author Arctosmous // @namespace https://www.googledrive.com/host/0B0T32ON-a3StUWZGUW9TbFZCVHM/ // @description A thrown together script to open a tweets image in a new tab. // @include https://twitter.com/* // @exclude https://twitter.com/settings/* // @grant none // @version 1.0.1 // ==/UserScript== OpenTweetImage = { getImageURL: function() { return $(".Gallery-content > .Gallery-media > .media-image").attr("src"); }, createButton: function() { $(".Gallery-content").prepend('<a id="OpenTweetImage" class="modal-btn" role="button" title="Open image in new tab" style="position: absolute; right: -30px; padding: 0; height: auto; top: 40px; color: white;"><span class="Icon Icon--photo Icon--large"><span class="visuallyhidden">Open image in new tab</span></span></a>'); }, buttonClickHandler: function() { $("body").on("click", "#OpenTweetImage", function () { window.open(OpenTweetImage.getImageURL(), "_blank"); }); } } window.addEventListener("load", function() { // script injection OpenTweetImage.createButton(); OpenTweetImage.buttonClickHandler(); }, false);