[nodebb-plugin-cards] Show cards when hovering over user links!
-
@baris userslugs with a
-
in them, right? Just looked at the regex and realised that\w
doesn't include that character... Must've overlooked that.So what are all the allowed characters in a userslug? Maybe it's best to make a overkill regex like
\/user\/[^/]+$
? -
This might be useful to you: https://github.com/NodeBB/NodeBB/blob/master/public/src/utils.js#L104-L105
You could just call this from
utils
, to save you the trouble -
I've changed the regex and pushed a new version.
https://github.com/Schamper/nodebb-plugin-cards/commit/46724b7e52502af585ce2f67bd9164b4e76560a6@psychobunny I tried using
[\[global:{status}]]
in my template, but it didn't work... Just outputs as[\[global:online]]
. Using thetranslator.translate
now.
Just realised I could've also translated the other titles with this update... Oh well that's for the next oneEdit: funny... it translates it in my reply
Edit 2: I noticed there's no longer a
.container
anymore on this forum, guess I'll change that too.Edit 3: Fixed edit 2 and figured the translator out 0.0.8 published.
-
@zenkamal Still a bit glitchy...
-
Will look into it when I get the time.
-
@zenkamal I'm unable to reproduce...
My "updated regex" had a flaw though, so I fixed that.
@a_5mith @psychobunny I added an event handler to remove a card when you click/tap outside of it. I've also published a new version. Let me know how it works.
tldr 0.0.9 published.
-
@Schamper said:
@zenkamal I'm unable to reproduce...
My "updated regex" had a flaw though, so I fixed that.
@a_5mith @psychobunny I added an event handler to remove a card when you click/tap outside of it. I've also published a new version. Let me know how it works.
tldr 0.0.9 published.
Well this works way better.
-
@Schamper Yeah for the most part.