ViewImage
ViewImage copied to clipboard
Add image size in related images for ones that do not have it ('JUL19' version)
While the extension works with the 'OCT19' version, it misses some images with the JUL19 version, but with some workarounds I can still reach the full sized image.
However, it is annoying when google doesn't even show the image size sometimes.
While it may be infeasible to grab the image url for the view image button from an element before clicking, it should be easier to add the size of the image before clicking in.
Related Image with Size (Image url in Red and Size info in Blue)
Related Image without Size
Basically, I need help with and/or would appreciate something that takes the &w=### and &h=### values from the href and injects an element after irc_rii that contains the size (w x h) (display always or on hover) for each related result tile.
This may or may not also help fixing the general issues with the button and the 'JUL19' version when it comes to fixing getting the full image url without relying on an raw source array or whatever clunky fix (like in issue #188).
'Oct19'version for reference
haven't figured out how to get the full size image by view image like with Google Image Search Restored with related images and such, but in the meantime I can at least see how big a related image is with this script before bypassing the google image layer all together
// ==UserScript==
// @name Related images Size
// @namespace http://localhost
// @description Adds image size to broken related images
// @version 1.0
// @include http*://*.google.tld/search*tbm=isch*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant GM_addStyle
// ==/UserScript==
waitForKeyElements (".irc_rimc", actionFunction);
function actionFunction () {
$(".rg_l:has(.irc-rito)").each(function() {
var url = this.href;
$(this).attr('href', url);
var width = url.substring(url.indexOf("&w=") + 3, url.indexOf("&h="));
var height = url.substring(url.indexOf("&h=") + 3, url.indexOf("&", url.indexOf("&h=") + 3));
var size = width + " × " + height;
//$(`<div class="rg_ilmbg.added">${size}</div>`).appendTo(this);
$(this).append(`<div class="rg_ilmbg">${size}</div>`);
//$(`<div class="rg_ilmbg.added">${size}</div>`).appendTo(this);
});
}
I've kinda made peace with it now...