Not logged in. · Lost password · Register
Forum: General Help and Support Plugins RSS
Sideloading "jquery.lazyload-any.js"?
Avatar
MilchFlasche #1
Member since Feb 2007 · 10 posts · Location: Taichung, Taiwan
Group memberships: Members
Show profile · Link to this post
Subject: Sideloading "jquery.lazyload-any.js"?
I have long wished that some kind of lazy loading mechanism can be incorporated into DokuWiki core. (lazy loading of iframes at least)

Before that happens, a plugin is needed, or at least as I just read yesterday, a userscript or "pseudo-plugin" is needed.

I have found a similar thread 5 years ago being the latest and nearest result in this field (only dealing with images, and did not seem to work out eventually):
Help me developing a lazy load plugin - DokuWiki User Forum
And I regret that this thread is what we have got so far.

I have found a newer jQuery plugin: emn178/jquery-lazyload-any: A jQuery plugin provides a lazyload function for images, iframe or anything.
I have created a pseudo-plugin to contain that script and installed that in my DW instance, but nothing seems to work yet.
So far I just use a jQuery class selector to try to invoke jquery.lazyload-any functions on div.lazyload:
dokuwiki-plugin-lazyload/script.js at master · GJRobert/dokuwiki-plugin-lazyload, and on DW test page I use the following codes:
<html><div class="lazyload">
...<!-- some long paragraphs -->
    <!--
    <iframe src="https://www.dokuwiki.org/plugin:localization"></iframe>
    -->
</div></html>

But the script does not seem to load at all according to my browser console, and unfortunately my knowledge of JavaScript is far fewer than enough to figure out what's wrong.

Could you kindly give your insight on this?
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-04-02, 22:14:34 (UTC +02:00)