Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name images button
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description add back view image to google images
- // @author az4521
- // google has too many domains
- // @match http*://*.google.ac/*
- // @match http*://*.google.ad/*
- // @match http*://*.google.ae/*
- // @match http*://*.google.al/*
- // @match http*://*.google.am/*
- // @match http*://*.google.as/*
- // @match http*://*.google.at/*
- // @match http*://*.google.az/*
- // @match http*://*.google.ba/*
- // @match http*://*.google.be/*
- // @match http*://*.google.bf/*
- // @match http*://*.google.bg/*
- // @match http*://*.google.bi/*
- // @match http*://*.google.biz/*
- // @match http*://*.google.bj/*
- // @match http*://*.google.bs/*
- // @match http*://*.google.bt/*
- // @match http*://*.google.by/*
- // @match http*://*.google.ca/*
- // @match http*://*.google.cat/*
- // @match http*://*.google.cd/*
- // @match http*://*.google.cf/*
- // @match http*://*.google.cg/*
- // @match http*://*.google.ch/*
- // @match http*://*.google.ci/*
- // @match http*://*.google.cl/*
- // @match http*://*.google.cm/*
- // @match http*://*.google.cn/*
- // @match http*://*.google.co.ao/*
- // @match http*://*.google.co.bw/*
- // @match http*://*.google.co.ck/*
- // @match http*://*.google.co.cr/*
- // @match http*://*.google.co.hu/*
- // @match http*://*.google.co.id/*
- // @match http*://*.google.co.il/*
- // @match http*://*.google.co.in/*
- // @match http*://*.google.co.jp/*
- // @match http*://*.google.co.ke/*
- // @match http*://*.google.co.kr/*
- // @match http*://*.google.co.ls/*
- // @match http*://*.google.co.ma/*
- // @match http*://*.google.co.mz/*
- // @match http*://*.google.co.nz/*
- // @match http*://*.google.co.th/*
- // @match http*://*.google.co.tz/*
- // @match http*://*.google.co.ug/*
- // @match http*://*.google.co.uk/*
- // @match http*://*.google.co.uz/*
- // @match http*://*.google.co.ve/*
- // @match http*://*.google.co.vi/*
- // @match http*://*.google.co.za/*
- // @match http*://*.google.co.zm/*
- // @match http*://*.google.co.zw/*
- // @match http*://*.google.com/*
- // @match http*://*.google.com.af/*
- // @match http*://*.google.com.ag/*
- // @match http*://*.google.com.ai/*
- // @match http*://*.google.com.ar/*
- // @match http*://*.google.com.au/*
- // @match http*://*.google.com.bd/*
- // @match http*://*.google.com.bh/*
- // @match http*://*.google.com.bn/*
- // @match http*://*.google.com.bo/*
- // @match http*://*.google.com.br/*
- // @match http*://*.google.com.bz/*
- // @match http*://*.google.com.ca/*
- // @match http*://*.google.com.ch/*
- // @match http*://*.google.com.co/*
- // @match http*://*.google.com.cu/*
- // @match http*://*.google.com.cy/*
- // @match http*://*.google.com.do/*
- // @match http*://*.google.com.ec/*
- // @match http*://*.google.com.eg/*
- // @match http*://*.google.com.et/*
- // @match http*://*.google.com.fj/*
- // @match http*://*.google.com.gh/*
- // @match http*://*.google.com.gi/*
- // @match http*://*.google.com.gt/*
- // @match http*://*.google.com.hk/*
- // @match http*://*.google.com.jm/*
- // @match http*://*.google.com.kh/*
- // @match http*://*.google.com.kw/*
- // @match http*://*.google.com.lb/*
- // @match http*://*.google.com.ly/*
- // @match http*://*.google.com.mm/*
- // @match http*://*.google.com.mt/*
- // @match http*://*.google.com.mx/*
- // @match http*://*.google.com.my/*
- // @match http*://*.google.com.na/*
- // @match http*://*.google.com.nf/*
- // @match http*://*.google.com.ng/*
- // @match http*://*.google.com.ni/*
- // @match http*://*.google.com.np/*
- // @match http*://*.google.com.om/*
- // @match http*://*.google.com.pa/*
- // @match http*://*.google.com.pe/*
- // @match http*://*.google.com.pg/*
- // @match http*://*.google.com.ph/*
- // @match http*://*.google.com.pk/*
- // @match http*://*.google.com.pl/*
- // @match http*://*.google.com.pr/*
- // @match http*://*.google.com.py/*
- // @match http*://*.google.com.qa/*
- // @match http*://*.google.com.sa/*
- // @match http*://*.google.com.sb/*
- // @match http*://*.google.com.sg/*
- // @match http*://*.google.com.sl/*
- // @match http*://*.google.com.sv/*
- // @match http*://*.google.com.tj/*
- // @match http*://*.google.com.tr/*
- // @match http*://*.google.com.tw/*
- // @match http*://*.google.com.ua/*
- // @match http*://*.google.com.uy/*
- // @match http*://*.google.com.vc/*
- // @match http*://*.google.com.vn/*
- // @match http*://*.google.cv/*
- // @match http*://*.google.cz/*
- // @match http*://*.google.de/*
- // @match http*://*.google.dj/*
- // @match http*://*.google.dk/*
- // @match http*://*.google.dm/*
- // @match http*://*.google.dz/*
- // @match http*://*.google.ee/*
- // @match http*://*.google.es/*
- // @match http*://*.google.fi/*
- // @match http*://*.google.fm/*
- // @match http*://*.google.fr/*
- // @match http*://*.google.ga/*
- // @match http*://*.google.ge/*
- // @match http*://*.google.gg/*
- // @match http*://*.google.gl/*
- // @match http*://*.google.gm/*
- // @match http*://*.google.gp/*
- // @match http*://*.google.gr/*
- // @match http*://*.google.gy/*
- // @match http*://*.google.hn/*
- // @match http*://*.google.hr/*
- // @match http*://*.google.ht/*
- // @match http*://*.google.hu/*
- // @match http*://*.google.ie/*
- // @match http*://*.google.im/*
- // @match http*://*.google.info/*
- // @match http*://*.google.iq/*
- // @match http*://*.google.is/*
- // @match http*://*.google.it/*
- // @match http*://*.google.je/*
- // @match http*://*.google.jo/*
- // @match http*://*.google.kg/*
- // @match http*://*.google.ki/*
- // @match http*://*.google.kz/*
- // @match http*://*.google.la/*
- // @match http*://*.google.li/*
- // @match http*://*.google.lk/*
- // @match http*://*.google.lt/*
- // @match http*://*.google.lu/*
- // @match http*://*.google.lv/*
- // @match http*://*.google.md/*
- // @match http*://*.google.me/*
- // @match http*://*.google.mg/*
- // @match http*://*.google.mk/*
- // @match http*://*.google.ml/*
- // @match http*://*.google.mn/*
- // @match http*://*.google.ms/*
- // @match http*://*.google.mu/*
- // @match http*://*.google.mv/*
- // @match http*://*.google.mw/*
- // @match http*://*.google.ne/*
- // @match http*://*.google.net/*
- // @match http*://*.google.nl/*
- // @match http*://*.google.no/*
- // @match http*://*.google.nr/*
- // @match http*://*.google.nu/*
- // @match http*://*.google.org/*
- // @match http*://*.google.pl/*
- // @match http*://*.google.pn/*
- // @match http*://*.google.ps/*
- // @match http*://*.google.pt/*
- // @match http*://*.google.ro/*
- // @match http*://*.google.rs/*
- // @match http*://*.google.ru/*
- // @match http*://*.google.rw/*
- // @match http*://*.google.sc/*
- // @match http*://*.google.se/*
- // @match http*://*.google.sh/*
- // @match http*://*.google.si/*
- // @match http*://*.google.sk/*
- // @match http*://*.google.sm/*
- // @match http*://*.google.sn/*
- // @match http*://*.google.so/*
- // @match http*://*.google.sr/*
- // @match http*://*.google.st/*
- // @match http*://*.google.td/*
- // @match http*://*.google.tg/*
- // @match http*://*.google.tk/*
- // @match http*://*.google.tl/*
- // @match http*://*.google.tm/*
- // @match http*://*.google.tn/*
- // @match http*://*.google.to/*
- // @match http*://*.google.tt/*
- // @match http*://*.google.us/*
- // @match http*://*.google.vc/*
- // @match http*://*.google.vg/*
- // @match http*://*.google.vu/*
- // @match http*://*.google.ws/*
- // @grant none
- // @run-at document-idle
- // ==/UserScript==
- (function() {
- 'use strict';
- var element = document.querySelectorAll("._FKw td:nth-child(1)");
- var elementtimer = setInterval(function(){
- var element = document.querySelectorAll("._FKw td:nth-child(1)");
- if (element.length) {
- var newElement = document.createElement("td");
- var link = document.createElement("a");
- link.href = 'javascript:void function(){function isElementVisible(el){var rect=el.getBoundingClientRect(),vWidth=window.innerWidth||doc.documentElement.clientWidth,vHeight=window.innerHeight||doc.documentElement.clientHeight,efp=function(x,y){return document.elementFromPoint(x,y)};return rect.right<0||rect.bottom<0||rect.left>vWidth||rect.top>vHeight%3F!1:el.contains(efp(rect.left,rect.top))||el.contains(efp(rect.right,rect.top))||el.contains(efp(rect.right,rect.bottom))||el.contains(efp(rect.left,rect.bottom))}"undefined"==typeof window.isElementVisible;{var imgs=document.querySelectorAll(".irc_mi");imgs.forEach(function(img){isElementVisible(img)%26%26window.open(img.src)})}}();';
- var span = document.createElement("span");
- span.classList.add("_WKw");
- span.appendChild(document.createTextNode("View Image"));
- link.appendChild(span);
- newElement.appendChild(link);
- for (var i = 0; i < element.length;i++) {
- element[i].after(newElement.cloneNode(true));
- }
- clearInterval(elementtimer);
- }
- },100);
- })();
Add Comment
Please, Sign In to add comment