I'm not really sure, what the macro does, but if the .run function would look like this:
exports.run = function() { if ($tw.browser) { const queryString = window.location.search; try { const urlParams = new URLSearchParams(queryString); const wikicontext = urlParams.get('context'); var output = wikicontext; if ( (output !== "OffGridding") && (output !== "HydroCutting" ) && (output !== "Chromebook") ){ output = "ProductReviews"; }; document.title = output; } catch(err) { output = "ProductReviews"; } return output; } }; It will let the server start in a normal way. .. -mario On Saturday, August 14, 2021 at 9:48:25 PM UTC+2 PMario wrote: > Hi, > Yea, if those 2 tiddlers are removed it works. ... Will have a closer look > at the macro. ... > -m > > On Saturday, August 14, 2021 at 9:45:19 PM UTC+2 PMario wrote: > >> On Saturday, August 14, 2021 at 9:35:11 PM UTC+2 cj.v...@gmail.com wrote: >> >>> getstartupcontext.js, that I can get rid of going forward. >>> >>> If you want, delete that tiddler from the process. >>> >> >> It's astonishing that this mechanism works. ... Where did you get this >> implementation from? >> The mechanism in "Set Startup Context" is completely new to me. ... And >> it seems to cause a problem in the server because it references the >> "window" object, which is only available in the browser. ... >> >> So IMO there would only be a if($tw.browser) needed. ... Maybe >> >> -m >> >> -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f7e852a3-f28c-4dfc-83f0-20d912f1c1c9n%40googlegroups.com.