Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Dynamic injection of GlobalDisclaimer from URL #699

Open
whatnick opened this issue Oct 9, 2024 · 0 comments
Open

Allow Dynamic injection of GlobalDisclaimer from URL #699

whatnick opened this issue Oct 9, 2024 · 0 comments

Comments

@whatnick
Copy link

whatnick commented Oct 9, 2024

Currently GlobalDisclaimer.html is webpacked into index.js and cannot be overridden at runtime without recompiling a custom image. A client configuration variable such as globalDisclaimer.dynamic can be used to allow loading the disclaimer text dynamically via the require or fetch API.

          if (
            defined(globalDisclaimer.dynamic)
          ) {
            var protocol = window.location.protocol;
            message += require(protocol + "//" + hostname + "/GlobalDisclaimer.html");
          }
          else {
            message += require("./lib/Views/GlobalDisclaimer.html");
          }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant