[nodebb-plugin-ns-spoiler] NS Spoiler
-
Version 4.0.0
A new version is available. Summary: add compatibility with changes in NodeBB v1.1.0 and support for the images. Thanks to https://github.com/segura2010 user. The issue was a lazy loading for the images which was introduced in NodeBB v1.1.0
Changes:
- Add compatibility with NodeBB v1.1.0
- Change content rendering to accommodate image lazy loading
-
On nodebb 1.4.5, spoiler v4.1
I keep getting error:Uncaught TypeError: e.unloadImages is not a function
at p.<anonymous> (nodebb.min.js?v=8vda2olngi6:12)
at p.onack (nodebb.min.js?v=8vda2olngi6:6)
at p.onpacket (nodebb.min.js?v=8vda2olngi6:6)
at h.<anonymous> (nodebb.min.js?v=8vda2olngi6:6)
at h.i.emit (nodebb.min.js?v=8vda2olngi6:5)
at h.ondecoded (nodebb.min.js?v=8vda2olngi6:4)
at f.<anonymous> (nodebb.min.js?v=8vda2olngi6:6)
at f.n.emit (nodebb.min.js?v=8vda2olngi6:4)
at f.add (nodebb.min.js?v=8vda2olngi6:4)
at h.ondata (nodebb.min.js?v=8vda2olngi6:4) -
Did you see such error before? Before
1.4.5
? -
Hi Mr. @Nicolas ,
Do you try to fix it? I tried to install last version to my forum, It's still error when spoiler image
Uncaught TypeError: e.unloadImages is not a function at i.<anonymous> (spoiler.js:57) at i.onack (socket.io.js:2) at i.onpacket (socket.io.js:2) at i.<anonymous> (socket.io.js:2) at i.emit (socket.io.js:1) at i.ondecoded (socket.io.js:1) at a.<anonymous> (socket.io.js:2) at a.i.emit (socket.io.js:1) at a.add (socket.io.js:1) at i.ondata (socket.io.js:1)
I'm using NodeBB version
1.5.2
Many thanks.
P/s: Spoiler text is working normally, issue happen when spoiler a image
-
A new version of the package nodebb-plugin-ns-spoiler (5.0.1) is available.
Plugin updated to work with the latest changes (
NodeBB 1.8.x
). Also, the plugin should work better with a more complex post structure (multi-list, etc.)@Sam-Nguyen images should work well in v5.
-
@nicolas said in [nodebb-plugin-ns-spoiler] NS Spoiler:
A new version of the package nodebb-plugin-ns-spoiler (5.0.1) is available.
Plugin updated to work with the latest changes (
NodeBB 1.8.x
). Also, the plugin should work better with a more complex post structure (multi-list, etc.)@Sam-Nguyen images should work well in v5.
Thank you for this update, everything works fine at 1.9.0
-
@nicolas said in [nodebb-plugin-ns-spoiler] NS Spoiler:
A new version of the package nodebb-plugin-ns-spoiler (5.0.1) is available.
@Sam-Nguyen images should work well in v5.Hi @nicolas There is still 4.1.0 in my ACP. I installed NodeBB v1.9.3 a week ago.
-
Version 6.0.0
Summary: no new features, compatibility update only.
- Changed compatibility to work with NodeBB 1.11.x
-
Version 7.0.0
Summary: no new features, compatibility update only.
- Changed compatibility to work with NodeBB 1.12.x
-
This plugin isn't working anymore on my forum since a couple of months.
I'm on version 8.0.0 of the plugin, Nodebb version 1.19.1
The problem is that the spoilered text isn't loading when pressing on the spoiler header.
When turning on the JavaScript debugger, I get an
Error has occurred, error: [[error:no-privileges]]
in
spoiler.js:50
.The relevant JavaScript function that triggers the error is this one:
function toggle($button) { var $spoiler = $button.parents(elements.MAIN), $content = $spoiler.find(elements.CONTENT), open = $spoiler.attr('data-open') === 'true', postId = parseInt($spoiler.attr('data-pid')), index = parseInt($spoiler.attr('data-index')), icon = $button.find('i'); $spoiler.attr('data-open', !open); if (!open) { icon.removeClass(classes.OPEN_EYE).addClass(classes.CLOSE_EYE); } else { icon.removeClass(classes.CLOSE_EYE).addClass(classes.OPEN_EYE); } // Check if content is empty if ($content.html().length === 0) { socket.emit( 'plugins.ns-spoiler.getSpoilerContent', {index: index, postId: postId}, function (error, content) { if (error) { return console.error('Error has occurred, error: %s', error.message); } $content.html(content); } ); } }
The
socket.emit
call always yields the "no privilege" error.Any ideas?
-
@Klaus6 said in [nodebb-plugin-ns-spoiler] NS Spoiler:
Is there really no way to get a working spoiler plugin for the current version of NodeBB? All alternatives seem to be even more outdated than this one.
Do you think you can switch to this one?
https://github.com/prosas82/nodebb-plugin-btn-spoilers#readme
this one works with 1.19.1 , I can confirm.