diff --git a/app/server/lib/sendAppPage.ts b/app/server/lib/sendAppPage.ts index 991b39fb..f1a8bc10 100644 --- a/app/server/lib/sendAppPage.ts +++ b/app/server/lib/sendAppPage.ts @@ -116,6 +116,12 @@ export function makeSendAppPage(opts: { baseDomain?: string }) { const {server, staticDir, tag, testLogin} = opts; + + // If env var GRIST_INCLUDE_CUSTOM_SCRIPT_URL is set, load it in a ` : ''; + return async (req: express.Request, resp: express.Response, options: ISendAppPageOptions) => { const config = makeGristConfig({ homeUrl: !isSingleUserMode() ? server.getHomeUrl(req) : null, @@ -153,6 +159,7 @@ export function makeSendAppPage(opts: { .replace("", `` + tagManagerSnippet) .replace("", preloads) .replace("", customHeadHtmlSnippet) + .replace("", insertCustomScript) .replace( "", `` diff --git a/static/app.html b/static/app.html index f87de801..fe174090 100644 --- a/static/app.html +++ b/static/app.html @@ -17,6 +17,7 @@ + <!-- INSERT TITLE --><!-- INSERT TITLE SUFFIX --> diff --git a/static/error.html b/static/error.html index fe068f02..d1b8dff5 100644 --- a/static/error.html +++ b/static/error.html @@ -8,6 +8,7 @@ + Loading...<!-- INSERT TITLE SUFFIX -->