1
0
Fork 0

URL matching when hyphens in github username

master
Gordon Williams 2022-04-28 10:14:10 +01:00
parent a9ac37fe17
commit 966acedd0c
1 changed files with 1 additions and 1 deletions

View File

@ -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`;
})();