Skip to content

Instantly share code, notes, and snippets.

@cannibalox
Last active February 10, 2024 17:08
Show Gist options
  • Save cannibalox/3498f6b678bf3dc0c6f5e5425557f102 to your computer and use it in GitHub Desktop.
Save cannibalox/3498f6b678bf3dc0c6f5e5425557f102 to your computer and use it in GitHub Desktop.
diigo - display images in better resolution in bookmarks view
// ==UserScript==
// @name Diigo bigger pic
// @namespace https://gist.github.com/cannibalox
// @updateURL https://gist.github.com/cannibalox/3498f6b678bf3dc0c6f5e5425557f102
// @version 0.2
// @description load bigger images
// @author _Ph
// @match *://*.diigo.com/*
// @icon https://www.google.com/s2/favicons?domain=diigo.com
// @grant unsafeWindow
// @grant GM_addStyle
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_xmlhttpRequest
// @grant GM_info
// @grant GM_getMetadata
// @run-at document-end
// ==/UserScript==
console.info('====== DIIGO LOAD BIGGER IMAGES =====');
setTimeout(CheckForZero, 0); // OR just call CheckForZero() if you don't need to defer until processing is complete
function CheckForZero() {
var tags = document.querySelectorAll('.attachImage img');
console.log(tags);
// This loops over all of the <img> tags.
for (var i = 0; i < tags.length; i++) {
// This replaces the src attribute of the tag with the modified one
tags[i].src = tags[i].src.replace('image_size=160', 'image_size=640');
}
setTimeout(CheckForZero, 6000); // set timer before start
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment