Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

The New Coffee Room

  1. TNCR
  2. General Discussion
  3. Spoiler works again

Spoiler works again

Scheduled Pinned Locked Moved General Discussion
11 Posts 8 Posters 110 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Klaus
    wrote on 3 Feb 2022, 07:17 last edited by
    #1

    I asked around a little in the NodeBB community and found a replacement for our spoiler plugin.

    It's not as fancy as the old one (asynchronous loading of the content), so spoiler content may show up in previews, but at least it seems to work.

    click to show

    This is hidden

    1 Reply Last reply
    • K Offline
      K Offline
      Klaus
      wrote on 3 Feb 2022, 07:17 last edited by Klaus 2 Mar 2022, 08:47
      #2

      click to show

      This is a test whether the spoiler content shows up in the preview.

      Yes it does. If you want to prevent that, a workaround would be to add another post after the one you want to hide. Or add at least two lines of non-hidden text before the spoiler.

      1 Reply Last reply
      • M Offline
        M Offline
        mark
        wrote on 3 Feb 2022, 11:16 last edited by
        #3

        Nothing happens when I click the Show content button.

        1 Reply Last reply
        • C Offline
          C Offline
          Copper
          wrote on 3 Feb 2022, 11:39 last edited by
          #4

          It works for me, iPad Safari

          1 Reply Last reply
          • 8 Online
            8 Online
            89th
            wrote on 3 Feb 2022, 11:40 last edited by
            #5

            click to show

            Looks good, thanks!

            1 Reply Last reply
            • J Offline
              J Offline
              jon-nyc
              wrote on 3 Feb 2022, 11:53 last edited by
              #6

              Works for me IOS safari

              Only non-witches get due process.

              • Cotton Mather, Salem Massachusetts, 1692
              1 Reply Last reply
              • D Offline
                D Offline
                Doctor Phibes
                wrote on 3 Feb 2022, 13:11 last edited by Doctor Phibes 2 Mar 2022, 13:12
                #7

                click to show

                click to show

                click to show

                click to show

                click to show

                I found Jesus
                click to show

                HERE HE IS!





                I was only joking

                G 1 Reply Last reply 3 Feb 2022, 13:29
                • D Doctor Phibes
                  3 Feb 2022, 13:11

                  click to show

                  click to show

                  click to show

                  click to show

                  click to show

                  I found Jesus
                  click to show

                  HERE HE IS!





                  G Offline
                  G Offline
                  George K
                  wrote on 3 Feb 2022, 13:29 last edited by George K 2 Mar 2022, 13:30
                  #8

                  @doctor-phibes said in Spoiler works again:

                  click to show

                  click to show

                  click to show

                  click to show

                  click to show

                  I found Jesus
                  click to show

                  HERE HE IS!





                  MacOS Safari - works fine.

                  click to show

                  image.jpeg

                  "Now look here, you Baltic gas passer... " - Mik, 6/14/08

                  The saying, "Lite is just one damn thing after another," is a gross understatement. The damn things overlap.

                  1 Reply Last reply
                  • K Offline
                    K Offline
                    Klaus
                    wrote on 3 Feb 2022, 14:05 last edited by
                    #9

                    Any JavaScript programmers here? I think it wouldn't be too hard to change the spoiler plugin in such a way that the spoiler content is ROT13-encoded (say) and shows only up in mangled form in the preview but is then decoded when pressing on the button. The plugin is only around 50 lines of JavaScript code, see here.

                    1 Reply Last reply
                    • A Offline
                      A Offline
                      Axtremus
                      wrote on 3 Feb 2022, 16:24 last edited by
                      #10

                      @Klaus Did we ever have a spoiler module that handles the topic list preview correctly? If we can look at the code for that old spoiler module, maybe we can find the snippet that deals with topic list preview and adapt that just snippet to the new spoiler module.

                      K 1 Reply Last reply 3 Feb 2022, 16:33
                      • A Axtremus
                        3 Feb 2022, 16:24

                        @Klaus Did we ever have a spoiler module that handles the topic list preview correctly? If we can look at the code for that old spoiler module, maybe we can find the snippet that deals with topic list preview and adapt that just snippet to the new spoiler module.

                        K Offline
                        K Offline
                        Klaus
                        wrote on 3 Feb 2022, 16:33 last edited by
                        #11

                        @axtremus The code for the old plugin is here but it is way more complicated and works in a different way. Rather than merely hiding the text, the old plugin doesn't even transmit the hidden text from the server to the browser until the "show" button is clicked (async i/o).

                        1 Reply Last reply
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes

                        4/11

                        3 Feb 2022, 11:39

                        7 unread

                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        4 out of 11
                        • First post
                          4/11
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups