Skip to content

Commit

Permalink
Custom-hotkeys: Prevent reserved name partial matches. Fixes #26
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Sep 22, 2017
1 parent 9bca3a1 commit b67026d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions github-custom-hotkeys.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

// https://github.com/{nonUser}
// see https://github.com/Mottie/github-reserved-names v1.0.6
nonUser = new RegExp("(" + [
nonUser = new RegExp("^(" + [
"400", "401", "402", "403", "404", "405", "406", "407", "408", "409",
"410", "411", "412", "413", "414", "415", "416", "417", "418", "419",
"420", "421", "422", "423", "424", "425", "426", "427", "428", "429",
Expand All @@ -77,7 +77,7 @@
"tos", "tour", "translations", "trending", "updates", "username", "users",
"w", "watching", "wiki", "windows", "works-with", "www1", "www2", "www3",
"www4", "www5", "www6", "www7", "www8", "www9"
].join("|") + ")");
].join("|") + ")$");

function getUrlParts() {
const loc = window.location,
Expand Down

0 comments on commit b67026d

Please sign in to comment.