forked from FOSS/BangleApps
URL matching when hyphens in github username
parent
a9ac37fe17
commit
966acedd0c
|
@ -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`;
|
||||
})();
|
||||
|
|
Loading…
Reference in New Issue