Created
May 13, 2016 14:16
-
-
Save jokester/96fe1bbb3306773604fe5e4d9c15a2e2 to your computer and use it in GitHub Desktop.
Reverse of jquery.lazy-load.js
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 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