Last active
May 2, 2016 14:31
-
-
Save motiejus/063233890c207c0e9dce to your computer and use it in GitHub Desktop.
Preload full images on aruodas.lt detail page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name preload images on aruodas.lt | |
// @namespace motiejus | |
// @description Preload images on detail pages in aruodas.lt | |
// @include http*://*.aruodas.lt/* | |
// @version 4 | |
// @grant none | |
// @downloadURL https://gist.github.com/raw/063233890c207c0e9dce/aruodas.user.js | |
// | |
// ==/UserScript== | |
if (window.top != window.self) //-- Don't run on frames or iframes. | |
return; | |
$.fn.fancybox.defaults.changeSpeed = 0; | |
var num_iframes = 0; | |
jQuery("a.link-obj-thumb[href]").each(function() { | |
var iframe = '<iframe class="GM_hiddenIFrame" src="'+this.href+'"></iframe>'; | |
$("body").append(iframe); | |
num_iframes++; | |
}); | |
console.log("[aruodas.lt preloader] Loaded " + num_iframes + " iframes"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment