mirror of https://github.com/espruino/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
|
// Set up source code URL
|
||||||
(function() {
|
(function() {
|
||||||
let username = "espruino";
|
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];
|
if (githubMatch) username = githubMatch[1];
|
||||||
Const.APP_SOURCECODE_URL = `https://github.com/${username}/BangleApps/tree/master/apps`;
|
Const.APP_SOURCECODE_URL = `https://github.com/${username}/BangleApps/tree/master/apps`;
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in New Issue