Skip to content

Instantly share code, notes, and snippets.

@jokester
Created May 13, 2016 14:16
Show Gist options
  • Save jokester/96fe1bbb3306773604fe5e4d9c15a2e2 to your computer and use it in GitHub Desktop.
Save jokester/96fe1bbb3306773604fe5e4d9c15a2e2 to your computer and use it in GitHub Desktop.
Reverse of jquery.lazy-load.js
// ==UserScript==
// @name Buka eager load
// @description Reverse of jquery.lazy-load.js
// @include http://www.buka.cn/view/*/*
// @version 1.0
// ==/UserScript==
// inject the function as a <script> node, so it get executed in page context.
var execute = function (body) {
if(typeof body === "function") { body = "(" + body + ")();"; }
var el = document.createElement("script");
el.textContent = body;
document.body.appendChild(el);
return el;
};
execute(function() {
jQuery('img.lazy').trigger('appear');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment