github-url-detection 10.1.0 → 10.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/distribution/index.js +1 -1
- package/package.json +1 -1
package/distribution/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var isOrganizationRepo = () => exists('.AppHeader-context-full [data-hovercard-t
|
|
|
33
33
|
var isTeamDiscussion = (url = location) => Boolean(getOrg(url)?.path.startsWith("teams"));
|
|
34
34
|
var isOwnUserProfile = () => getCleanPathname() === getLoggedInUser();
|
|
35
35
|
var isOwnOrganizationProfile = () => isOrganizationProfile() && !exists('[href*="contact/report-abuse?report="]');
|
|
36
|
-
var isProject = (url = location) => /^projects\/\d+/.test(getRepo(url)?.path);
|
|
36
|
+
var isProject = (url = location) => /^projects\/\d+/.test(getRepo(url)?.path ?? getOrg(url)?.path);
|
|
37
37
|
var isProjects = (url = location) => getRepo(url)?.path === "projects";
|
|
38
38
|
var isDiscussion = (url = location) => /^discussions\/\d+/.test(getRepo(url)?.path ?? getOrg(url)?.path);
|
|
39
39
|
var isNewDiscussion = (url = location) => getRepo(url)?.path === "discussions/new" || getOrg(url)?.path === "discussions/new";
|