Add a hook to allow filtering of the target in URL before displaying the story #8165
Defenso-QTH
started this conversation in
Ideas
Replies: 1 comment 9 replies
-
I think that's the wrong place. I think what you need is a possibility to filter the locationhash before it is converted to a storyList. But I would have to have a closer look at the code first. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
This discussion is a follow up of this thread on the talk.tiddlywiki.org forums: https://talk.tiddlywiki.org/t/how-can-i-prevent-tw-from-creating-a-tiddler-based-on-the-url-fragment-hash-part/9665/
I want to be able to blacklist some URL fragments (hash-parts) that are returned to my Tiddlywiki in an authentication flow.
I think the most elegant manner to let users / plugins implement this kind of features would be through a hook in
$:/core/modules/startup/story.js
as I propose in my post. It takes only one line and avoids having to overwrite this tiddler with a customized one, which would break on upgrades.An alternative could be to move the invocation of
th-opening-default-tiddlers-list
to after we put the target in the list, so we could use that hook and avoid adding a new one:Before
After
But it would still be added to the History by the code below, though, so a bit of a larger change might be required to make it clean.
Beta Was this translation helpful? Give feedback.
All reactions