]> BookStack Code Mirror - hacks/log
hacks
3 days agoReviewed mermaid viewer hack main
Dan Brown [Fri, 27 Jun 2025 13:54:59 +0000 (14:54 +0100)]
Reviewed mermaid viewer hack

Modified with the changes:
- Split out files to make use of the public files system, and so it's
  not a massive chunk of head content loaded on all pages.
- Added a little extra size control during load to reduce bouncing.
- Updated code block targeting just to avoid potention editor conflicts.
- Removed some non-existing CSS variable usages.
- Tweaked hack wording/guidance a little.

4 days agofeat(mermaid-viewer): Recenter diagrams on window resize 9/head
Alexander Wilms [Fri, 27 Jun 2025 01:08:57 +0000 (03:08 +0200)]
feat(mermaid-viewer): Recenter diagrams on window resize

Adds event listener to recenter mermaid diagrams when the window is resized.

4 days agorefactor(mermaid-viewer): Move shared button styles to base class
Alexander Wilms [Thu, 26 Jun 2025 23:39:59 +0000 (01:39 +0200)]
refactor(mermaid-viewer): Move shared button styles to base class

4 days agofeat(mermaid-viewer): Improve button styles for light/dark modes
Alexander Wilms [Thu, 26 Jun 2025 23:37:42 +0000 (01:37 +0200)]
feat(mermaid-viewer): Improve button styles for light/dark modes

4 days agofix(mermaid-viewer): Handle clipboard API failure gracefully
Alexander Wilms [Thu, 26 Jun 2025 22:34:48 +0000 (00:34 +0200)]
fix(mermaid-viewer): Handle clipboard API failure gracefully

Adds a fallback mechanism and logs the error when the clipboard API fails.

4 days agofeat(mermaid-viewer): Add accessibility attributes to buttons
Alexander Wilms [Thu, 26 Jun 2025 22:32:58 +0000 (00:32 +0200)]
feat(mermaid-viewer): Add accessibility attributes to buttons

Adds role and tabindex attributes to mermaid viewer buttons for improved accessibility.

4 days agorefactor(mermaid-viewer): Simplify mermaid viewer initialization
Alexander Wilms [Thu, 26 Jun 2025 22:23:35 +0000 (00:23 +0200)]
refactor(mermaid-viewer): Simplify mermaid viewer initialization

Removes unnecessary comment about CMS wrapping and dynamic content handling.

4 days agofix(mermaid-viewer): Improve error message on diagram rendering failure
Alexander Wilms [Thu, 26 Jun 2025 22:22:06 +0000 (00:22 +0200)]
fix(mermaid-viewer): Improve error message on diagram rendering failure

4 days agorefactor(mermaid-viewer): Use AbortController for event listener cleanup
Alexander Wilms [Thu, 26 Jun 2025 22:20:35 +0000 (00:20 +0200)]
refactor(mermaid-viewer): Use AbortController for event listener cleanup

4 days agorefactor(mermaid-viewer): Use bind to pass direction to handleZoomClick
Alexander Wilms [Thu, 26 Jun 2025 22:18:15 +0000 (00:18 +0200)]
refactor(mermaid-viewer): Use bind to pass direction to handleZoomClick

4 days agofeat(mermaid-viewer): Update mermaid CDN link to v11.7.0
Alexander Wilms [Thu, 26 Jun 2025 22:06:56 +0000 (00:06 +0200)]
feat(mermaid-viewer): Update mermaid CDN link to v11.7.0

4 days agorefactor(mermaid-viewer): Construct viewer DOM programmatically
Alexander Wilms [Thu, 26 Jun 2025 22:06:42 +0000 (00:06 +0200)]
refactor(mermaid-viewer): Construct viewer DOM programmatically

4 days agofeat(mermaid-viewer): Improve dark mode button hover
Alexander Wilms [Thu, 26 Jun 2025 22:01:07 +0000 (00:01 +0200)]
feat(mermaid-viewer): Improve dark mode button hover

Uses BookStack's CSS variables for hover state consistency.

4 days agofeat(mermaid-viewer): Improve theme integration and styling
Alexander Wilms [Thu, 26 Jun 2025 21:58:48 +0000 (23:58 +0200)]
feat(mermaid-viewer): Improve theme integration and styling

Use BookStack's CSS variables and detect dark mode for Mermaid theme.
Replaces custom styles with BookStack's for better consistency.

4 days agofeat(mermaid-viewer): Use event system for notifications
Alexander Wilms [Thu, 26 Jun 2025 21:49:07 +0000 (23:49 +0200)]
feat(mermaid-viewer): Use event system for notifications

This commit replaces the custom notification system with the BookStack event system for displaying success and error messages.
If the event system is not available, it falls back to console log.

4 days agorefactor(mermaid-viewer): Bind event handlers to class instance
Alexander Wilms [Thu, 26 Jun 2025 21:42:33 +0000 (23:42 +0200)]
refactor(mermaid-viewer): Bind event handlers to class instance

This ensures proper addition and removal of event listeners and fixes a memory leak. Also increases the z-index of the notification.

6 days agofeat: Add interactive Mermaid diagram viewer
Alexander Wilms [Sat, 14 Jun 2025 16:28:54 +0000 (18:28 +0200)]
feat: Add interactive Mermaid diagram viewer

8 days agoAdded interactive drawings hack
Dan Brown [Sun, 22 Jun 2025 11:43:00 +0000 (12:43 +0100)]
Added interactive drawings hack

7 months agoFixed glossary term replacement when words at start of line
Dan Brown [Tue, 19 Nov 2024 17:08:28 +0000 (17:08 +0000)]
Fixed glossary term replacement when words at start of line

7 months agoAdded glossary hack
Dan Brown [Wed, 13 Nov 2024 16:21:58 +0000 (16:21 +0000)]
Added glossary hack

8 months agoUpdated username login hack after testing
Dan Brown [Tue, 8 Oct 2024 11:35:32 +0000 (12:35 +0100)]
Updated username login hack after testing

10 months agoUpdated notify-tagged-page-updates after re-test
Dan Brown [Tue, 13 Aug 2024 13:54:23 +0000 (14:54 +0100)]
Updated notify-tagged-page-updates after re-test

11 months agoUpdated license year, and changed repo refereces to Codeberg
Dan Brown [Sat, 27 Jul 2024 10:53:57 +0000 (11:53 +0100)]
Updated license year, and changed repo refereces to Codeberg

11 months agoUpdated autosort tagged books hack
Dan Brown [Fri, 12 Jul 2024 14:01:51 +0000 (15:01 +0100)]
Updated autosort tagged books hack

Upon request via hack update service

11 months agoUpdated notify-favourite-pages hack
Dan Brown [Fri, 5 Jul 2024 14:09:56 +0000 (15:09 +0100)]
Updated notify-favourite-pages hack

12 months agoUpdated tested verison of docx hack
Dan Brown [Tue, 25 Jun 2024 10:30:22 +0000 (11:30 +0100)]
Updated tested verison of docx hack

Re-tested against release via support update request.
No change found to be needed, so only version check bump.

13 months agoAdded prune revisions command hack
Dan Brown [Thu, 23 May 2024 13:24:53 +0000 (14:24 +0100)]
Added prune revisions command hack

14 months agoRe-tested and updated iframe hack
Dan Brown [Mon, 22 Apr 2024 16:11:27 +0000 (17:11 +0100)]
Re-tested and updated iframe hack

19 months agoUpdated "notify-tagged-page-updates" hack for v23.10.4
Dan Brown [Mon, 20 Nov 2023 22:05:19 +0000 (22:05 +0000)]
Updated "notify-tagged-page-updates" hack for v23.10.4

HTTP Fns Hack update service
pi_3OEeE4DUTTfhFsjz3bvEcZwE

20 months agoAdded note regarding hack update service to readme
Dan Brown [Fri, 20 Oct 2023 16:32:56 +0000 (17:32 +0100)]
Added note regarding hack update service to readme

20 months agoAdded pushover webhook hack
Dan Brown [Fri, 20 Oct 2023 16:27:57 +0000 (17:27 +0100)]
Added pushover webhook hack

2 years agoMerge branch 'main' of github.com:BookStackApp/hacks
Dan Brown [Wed, 7 Jun 2023 09:58:33 +0000 (10:58 +0100)]
Merge branch 'main' of github.com:BookStackApp/hacks

2 years agoAdded wysiwyg docx import hack
Dan Brown [Wed, 7 Jun 2023 09:58:18 +0000 (10:58 +0100)]
Added wysiwyg docx import hack

2 years agoMerge remote-tracking branch 'origin/main'
Dan Brown [Sat, 13 May 2023 15:16:30 +0000 (16:16 +0100)]
Merge remote-tracking branch 'origin/main'

2 years agoFixed bad link in new tab code
Dan Brown [Sat, 13 May 2023 15:15:32 +0000 (16:15 +0100)]
Fixed bad link in new tab code

Updated to module instead of using dom ready.

2 years agoDone review pass of #4, mainly updated comments/wording
Dan Brown [Thu, 4 May 2023 16:42:38 +0000 (17:42 +0100)]
Done review pass of #4, mainly updated comments/wording

2 years agoAdded wysiwyg autocompleter hack 4/head
julian.pieles [Thu, 4 May 2023 15:50:54 +0000 (17:50 +0200)]
Added wysiwyg  autocompleter hack

2 years agoAdded wysiwyg footnotes hack
Dan Brown [Wed, 3 May 2023 23:41:07 +0000 (00:41 +0100)]
Added wysiwyg footnotes hack

2 years agoMerge branch 'hacks/page-as-iframe'
Dan Brown [Mon, 27 Mar 2023 13:57:21 +0000 (14:57 +0100)]
Merge branch 'hacks/page-as-iframe'

2 years agoConverted iframe hack to visual theme system hack
Dan Brown [Mon, 27 Mar 2023 13:56:54 +0000 (14:56 +0100)]
Converted iframe hack to visual theme system hack

2 years agoclean up unused classes 3/head
Vincent Lark [Sun, 26 Mar 2023 14:44:04 +0000 (16:44 +0200)]
clean up unused classes

2 years agoFixed date on new hack
Dan Brown [Fri, 24 Mar 2023 11:01:36 +0000 (11:01 +0000)]
Fixed date on new hack

2 years agoAdded hack: example of custom WYSWIYG editor buttons
Dan Brown [Fri, 24 Mar 2023 10:59:25 +0000 (10:59 +0000)]
Added hack: example of custom WYSWIYG editor buttons

2 years agoAdd a hack for a simpler Bootstack pages layout inside iframes.
Vincent Lark [Mon, 20 Mar 2023 14:48:46 +0000 (15:48 +0100)]
Add a hack for a simpler Bootstack pages layout inside iframes.

2 years agoAdded page export contents hack
Dan Brown [Thu, 16 Mar 2023 04:22:01 +0000 (04:22 +0000)]
Added page export contents hack

2 years agoFixed repeated word
Dan Brown [Wed, 1 Mar 2023 11:48:31 +0000 (11:48 +0000)]
Fixed repeated word

2 years agoRenamed mathjax+tex hack directory
Dan Brown [Wed, 1 Mar 2023 11:36:03 +0000 (11:36 +0000)]
Renamed mathjax+tex hack directory

2 years agoUpdated mathjax hack text after review
Dan Brown [Wed, 1 Mar 2023 11:34:39 +0000 (11:34 +0000)]
Updated mathjax hack text after review

2 years agoAdd LaTeX/MathJax hack 1/head
AKP [Mon, 27 Feb 2023 11:53:58 +0000 (11:53 +0000)]
Add LaTeX/MathJax hack

Signed-off-by: AKP <redacted>
2 years agoAdded .gitignore file
Dan Brown [Tue, 14 Feb 2023 16:08:21 +0000 (16:08 +0000)]
Added .gitignore file

2 years agoAdded funding and readme files
Dan Brown [Sun, 12 Feb 2023 23:35:18 +0000 (23:35 +0000)]
Added funding and readme files

2 years agoAdded license and hacks from gists
Dan Brown [Sun, 12 Feb 2023 22:53:28 +0000 (22:53 +0000)]
Added license and hacks from gists

2 years agoInitial copy of content from site repo
Dan Brown [Sun, 12 Feb 2023 18:40:45 +0000 (18:40 +0000)]
Initial copy of content from site repo