1
0
Fork
You've already forked bookstack-rolltable-plugin
0
rolltable plugin for bookstack injects a roll-button into tables that indicate they can be rolled with a dice formula like "1d20" in their first header cell (first cell of first row, marked as headline)
  • JavaScript 100%
2024年06月02日 00:30:26 +02:00
plugin-rolltable.js faster rolling less flashy 2024年06月02日 00:30:26 +02:00
README.md init 2024年05月24日 17:00:45 +02:00

rolltable plugin for bookstack

injects a roll-button into tables that indicate they can be rolled with a dice formula like "1d20" in their first header cell (first cell of first row, marked as headline)

the plugin comes as a single file with bundled css and jquery-toast-plugin. jQuery is loaded externally

installation

save plugin-rolltable.js where it is publicly accessible (somewhere on your webserver)

add a script tag to "Custom HTML head content" in your bookstack under /settings/customization, like that: <script src="/path/to/plugin-rolltable.js?v=0.1"></script> the v parameter is a cachebuster and can be anything - just remember to change it on updates of the plugin

add a script tag for jQuery, like that: <script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script> in most cases it doesn't matter if you use the CDN or host it yourself

optional: find the line --plugin-rolltable-text-color: #fff; in plugin-rolltable.js and replace #fff with a color contrasting your --color-primary if #fff doesn't fit your color scheme

jquery-toast-plugin

bundles jquery-toast-plugin. If you've already enabled jquery-toast-plugin in your installation, you may wish to delete everything starting with the line // bundle jquery-toast-plugin from plugin-rolltable.js

v0.1, CC-BY-SA by Thomas Nesges https://nesg.es, 2024