From b67026d6b77ccebe26e9f262add82a845bd97c99 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Fri, 22 Sep 2017 13:34:51 -0500 Subject: [PATCH] Custom-hotkeys: Prevent reserved name partial matches. Fixes #26 --- github-custom-hotkeys.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github-custom-hotkeys.user.js b/github-custom-hotkeys.user.js index 72d485a..cc5b688 100644 --- a/github-custom-hotkeys.user.js +++ b/github-custom-hotkeys.user.js @@ -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", @@ -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,