From 966acedd0cc3ab14ba51085e5d08317c52890b0b Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Thu, 28 Apr 2022 10:14:10 +0100 Subject: [PATCH] URL matching when hyphens in github username --- loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loader.js b/loader.js index ee7b584a2..42db3f430 100644 --- a/loader.js +++ b/loader.js @@ -25,7 +25,7 @@ DEVICEINFO = DEVICEINFO.filter(x=>x.id.startsWith("BANGLEJS")); // Set up source code URL (function() { let username = "espruino"; - let githubMatch = window.location.href.match(/\/(\w+)\.github\.io/); + let githubMatch = window.location.href.match(/\/([\w-]+)\.github\.io/); if (githubMatch) username = githubMatch[1]; Const.APP_SOURCECODE_URL = `https://github.com/${username}/BangleApps/tree/master/apps`; })();