CLI and local web plain text note‑taking, bookmarking, and archiving with linking, tagging, filtering, search, Git versioning & syncing, Pandoc conversion, + more, in a single portable script.
This PR introduces the ability to inject custom JavaScript and CSS into our application. By utilizing environment variables, we’re providing a flexible method to enhance and customize the UI and behavior of nb browse on demand.
Changes Introduced
The key updates involve the conditional inclusion of custom JavaScript and CSS files:
A script tag for custom JavaScript is added if the NB_CUSTOM_JS environment variable is set.
A link tag for custom CSS is inserted if the NB_CUSTOM_CSS environment variable is set.
Impact
Functionality: Users can now dynamically inject custom styling and functionality.
Maintainability: Environment variable checks are simple and maintainable.
Performance: There should be no performance hit as custom files are loaded conditionally and are not mandatory.
Testing
Confirmed that the absence of NB_CUSTOM_JS and NB_CUSTOM_CSS maintains existing functionality.
Test with valid URLs in NB_CUSTOM_JS and NB_CUSTOM_CSS to verify that custom styles and scripts are incorporated correctly.
This little enhancement should empower users to personalize their experience and addresses issue #284.
Overview
This PR introduces the ability to inject custom JavaScript and CSS into our application. By utilizing environment variables, we’re providing a flexible method to enhance and customize the UI and behavior of
nb browse
on demand.Changes Introduced
The key updates involve the conditional inclusion of custom JavaScript and CSS files:
NB_CUSTOM_JS
environment variable is set.NB_CUSTOM_CSS
environment variable is set.Impact
Testing
NB_CUSTOM_JS
andNB_CUSTOM_CSS
maintains existing functionality.NB_CUSTOM_JS
andNB_CUSTOM_CSS
to verify that custom styles and scripts are incorporated correctly.This little enhancement should empower users to personalize their experience and addresses issue #284.