您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a direct button link for the image.
当前为
// ==UserScript== // @name Google Images direct link fix // @description Adds a direct button link for the image. // @version 1.1b // @grant none // @include https://www.google.com/search?q=* // @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js // @namespace https://greasyfork.org/users/11231 // ==/UserScript== var tar, x; $(window).on("load", function() { tar = $('div.tvh9oe:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > a:nth-child(1) > img:nth-child(1)'); x = $(tar).attr('src'); $('.fwCBrd').append('<a class="dJcyOc" id="aTheIMG" href="' + x + '" title="Open image in new tab" target="_blank" ><span>View image</span></a>'); $(window).click(function(e) { if ($(e.target).attr('class') == 'rg_i Q4LuWd tx8vtf'){ $("#aTheIMG").remove(); theWork(); } }); }); function theWork() { setTimeout(function() { if (!$("div.tvh9oe:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > a:nth-child(1) > img:nth-child(1)").attr("src").match("^https://encrypted-tbn")) { tar = $("div.tvh9oe:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > a:nth-child(1) > img:nth-child(1)"); x = $(tar).attr("src"); if (!$("#aTheIMG").length) $(".fwCBrd").append('<a class="dJcyOc" id="aTheIMG" href="' + x + '" title="Open image in new tab" target="_blank" ><span>View image</span></a>'); else ; } else ; x = ""; }, 2000); } $( '<style>' ).text(' \ #aTheIMG { left: -139px; \ position: relative; \ z-index: 1; \ top: 1px; \ margin-left: -84px; \ } \ #aTheIMG > span {padding-left: 3px;} \ #aTheIMG:hover { \ filter: brightness(1.3); \ } \ div.tvh9oe:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(3) > div:nth-child(1) > div:nth-child(1) > a:nth-child(3) { \ margin-right: -0px; \ } \ div.tvh9oe:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(3) > div:nth-child(1) > div:nth-child(1) > a:nth-child(1) {pointer-events: none !important;} \ div.tvh9oe:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(3) > div:nth-child(1) > div:nth-child(1) > a:nth-child(1) > div:nth-child(1) {pointer-events: all !important;} \ ' ).appendTo( document.head );