Open trailjeep opened 12 years ago
Me too.
so can't use this plugin.
there's no good way to detect this at javascript side, whether the link goes outside or not as the html is very similar
only thing i can do now, is to check that if the link is absolute (starts with http:// or https://) then it's likely link going outside. as in my installation, internal media links are relative.
so, i tried to do this with .filter()
call in jQuery, but adding .filter to chain makes my chrome take up 100% cpu and nothing works. even simple filter, that does return true
causes this. i have no idea what is happening.
i.e this simple change broke it all: from:
$('a[class=media]').each(function() {
to:
$('a[class=media]').filter(function() { return true }).each(function() {
Hello Glensc!
I used diffident method to solve this problem.
I can not make dokuwiki plugin. and I dont know how plugins works, but I want to show this you
I used this library for lightbox. ( http://serennz.sakura.ne.jp/toybox/lightbox/?en )
This codes are activated when there is rel=“lightbox” in <a href= tag.. so I edited manually xhtml.php for dokuwiki to know when to intercept link...
It works with both internal media and external media..
visit here to see my modified code.. & example.
http://vaslor.net/tech/lightbox_in_dokuwiki
Thanks.
any fix on this?
no, because fix that i made locks up browser. and i have not resolved it myself and don't know where to ask for extra help: https://github.com/glensc/dokuwiki-plugin-lightboxv2/issues/2#issuecomment-7598436
would be great to have a fix for that.
I noticed that it still shows the correct link as alternate text, maybe there is a way to filter it when this begins with 'http'.
Or make an optional flag to disable lightbox for those images (eg. &nolightbox) to return to default behaviour
displays as lightbox image when it should go to the link. Same behavior for internal & external links.