github-url-detection
Advanced tools
Comparing version 5.9.0 to 5.10.0
@@ -63,2 +63,3 @@ export declare const is404: () => boolean; | ||
export declare const isEmptyRepo: () => boolean; | ||
export declare const isBlank: () => boolean; | ||
export declare const isRepoTaxonomyConversationList: (url?: URL | HTMLAnchorElement | Location) => boolean; | ||
@@ -84,2 +85,3 @@ export declare const isRepoConversationList: (url?: URL | HTMLAnchorElement | Location) => boolean; | ||
export declare const isSingleGist: (url?: URL | HTMLAnchorElement | Location) => boolean; | ||
export declare const isGistRevision: (url?: URL | HTMLAnchorElement | Location) => boolean; | ||
export declare const isTrending: (url?: URL | HTMLAnchorElement | Location) => boolean; | ||
@@ -86,0 +88,0 @@ export declare const isBranches: (url?: URL | HTMLAnchorElement | Location) => boolean; |
@@ -211,2 +211,4 @@ var reservedNames = [ "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", "430", "431", "500", "501", "502", "503", "504", "505", "506", "507", "508", "509", "510", "511", "about", "access", "account", "admin", "advisories", "anonymous", "any", "api", "apps", "attributes", "auth", "billing", "blob", "blog", "bounty", "branches", "business", "businesses", "c", "cache", "case-studies", "categories", "central", "certification", "changelog", "cla", "cloud", "codereview", "collection", "collections", "comments", "commit", "commits", "community", "companies", "compare", "contact", "contributing", "cookbook", "coupons", "customer-stories", "customer", "customers", "dashboard", "dashboards", "design", "develop", "developer", "diff", "discover", "discussions", "docs", "downloads", "downtime", "editor", "editors", "edu", "enterprise", "events", "explore", "featured", "features", "files", "fixtures", "forked", "garage", "ghost", "gist", "gists", "graphs", "guide", "guides", "help", "help-wanted", "home", "hooks", "hosting", "hovercards", "identity", "images", "inbox", "individual", "info", "integration", "interfaces", "introduction", "invalid-email-address", "investors", "issues", "jobs", "join", "journal", "journals", "lab", "labs", "languages", "launch", "layouts", "learn", "legal", "library", "linux", "listings", "lists", "login", "logos", "logout", "mac", "maintenance", "malware", "man", "marketplace", "mention", "mentioned", "mentioning", "mentions", "migrating", "milestones", "mine", "mirrors", "mobile", "navigation", "network", "new", "news", "none", "nonprofit", "nonprofits", "notices", "notifications", "oauth", "offer", "open-source", "organisations", "organizations", "orgs", "pages", "partners", "payments", "personal", "plans", "plugins", "popular", "popularity", "posts", "press", "pricing", "professional", "projects", "pulls", "raw", "readme", "recommendations", "redeem", "releases", "render", "reply", "repositories", "resources", "restore", "revert", "save-net-neutrality", "saved", "scraping", "search", "security", "services", "sessions", "settings", "shareholders", "shop", "showcases", "signin", "signup", "site", "spam", "sponsors", "ssh", "staff", "starred", "stars", "static", "status", "statuses", "storage", "store", "stories", "styleguide", "subscriptions", "suggest", "suggestion", "suggestions", "support", "suspended", "talks", "teach", "teacher", "teachers", "teaching", "team", "teams", "ten", "terms", "timeline", "topic", "topics", "tos", "tour", "train", "training", "translations", "tree", "trending", "updates", "username", "users", "visualization", "w", "watching", "wiki", "windows", "works-with", "www0", "www1", "www2", "www3", "www4", "www5", "www6", "www7", "www8", "www9" ]; | ||
const isBlank = () => exists("main .blankslate"); | ||
const isRepoTaxonomyConversationList = (url = location) => { | ||
@@ -294,2 +296,4 @@ var _a; | ||
const isGistRevision = (url = location) => isGist(url) && /^\/(gist\/)?[^/]+\/[\da-f]{32}\/revisions$/.test(url.pathname); | ||
const isTrending = (url = location) => "/trending" === url.pathname || url.pathname.startsWith("/trending/"); | ||
@@ -323,3 +327,3 @@ | ||
const hasCode = (url = location) => hasComments(url) || isRepoTree(url) || isSingleFile(url) || isGist(url) || isCompare(url) || isBlame(url); | ||
const hasCode = (url = location) => hasComments(url) || isRepoTree(url) || isRepoSearch(url) || isGlobalSearchResults(url) || isSingleFile(url) || isGist(url) || isCompare(url) || isBlame(url); | ||
@@ -392,2 +396,2 @@ const hasFiles = (url = location) => isCommit(url) || isCompare(url) || isPRFiles(url); | ||
export { canUserEditOrganization, canUserEditRepo, hasCode, hasComments, hasFileEditor, hasFiles, hasReleaseEditor, hasRichTextEditor, hasWikiPageEditor, is404, is500, isActionJobRun, isActionRun, isBlame, isBranches, isClosedPR, isCommit, isCommitList, isCompare, isConversation, isConversationList, isDashboard, isDeletingFile, isDiscussion, isDiscussionList, isDraftPR, isEditingFile, isEditingRelease, isEditingWikiPage, isEmptyRepo, isEmptyRepoRoot, isEnterprise, isFileFinder, isForkedRepo, isGist, isGlobalConversationList, isGlobalSearchResults, isIssue, isLabelList, isMarketplaceAction, isMergedPR, isMilestone, isMilestoneList, isNewAction, isNewFile, isNewIssue, isNewRelease, isNewRepo, isNewRepoTemplate, isNewWikiPage, isNotifications, isOpenPR, isOrganizationDiscussion, isOrganizationProfile, isOrganizationRepo, isOwnOrganizationProfile, isOwnUserProfile, isPR, isPRCommit, isPRCommit404, isPRCommitList, isPRConflicts, isPRConversation, isPRFile404, isPRFiles, isPRList, isPasswordConfirmation, isProfile, isProject, isProjects, isQuickPR, isReleases, isReleasesOrTags, isRepliesSettings, isRepo, isRepoCommitList, isRepoConversationList, isRepoForksList, isRepoHome, isRepoIssueList, isRepoMainSettings, isRepoNetworkGraph, isRepoPRList, isRepoRoot, isRepoSearch, isRepoSettings, isRepoTaxonomyConversationList, isRepoTree, isRepoWiki, isRepositoryActions, isSingleCommit, isSingleFile, isSingleGist, isSingleTag, isTags, isTrending, isUserProfile, isUserProfileFollowersTab, isUserProfileFollowingTab, isUserProfileMainTab, isUserProfileRepoTab, isUserProfileStarsTab, isUserSettings, isUserTheOrganizationOwner, utils }; | ||
export { canUserEditOrganization, canUserEditRepo, hasCode, hasComments, hasFileEditor, hasFiles, hasReleaseEditor, hasRichTextEditor, hasWikiPageEditor, is404, is500, isActionJobRun, isActionRun, isBlame, isBlank, isBranches, isClosedPR, isCommit, isCommitList, isCompare, isConversation, isConversationList, isDashboard, isDeletingFile, isDiscussion, isDiscussionList, isDraftPR, isEditingFile, isEditingRelease, isEditingWikiPage, isEmptyRepo, isEmptyRepoRoot, isEnterprise, isFileFinder, isForkedRepo, isGist, isGistRevision, isGlobalConversationList, isGlobalSearchResults, isIssue, isLabelList, isMarketplaceAction, isMergedPR, isMilestone, isMilestoneList, isNewAction, isNewFile, isNewIssue, isNewRelease, isNewRepo, isNewRepoTemplate, isNewWikiPage, isNotifications, isOpenPR, isOrganizationDiscussion, isOrganizationProfile, isOrganizationRepo, isOwnOrganizationProfile, isOwnUserProfile, isPR, isPRCommit, isPRCommit404, isPRCommitList, isPRConflicts, isPRConversation, isPRFile404, isPRFiles, isPRList, isPasswordConfirmation, isProfile, isProject, isProjects, isQuickPR, isReleases, isReleasesOrTags, isRepliesSettings, isRepo, isRepoCommitList, isRepoConversationList, isRepoForksList, isRepoHome, isRepoIssueList, isRepoMainSettings, isRepoNetworkGraph, isRepoPRList, isRepoRoot, isRepoSearch, isRepoSettings, isRepoTaxonomyConversationList, isRepoTree, isRepoWiki, isRepositoryActions, isSingleCommit, isSingleFile, isSingleGist, isSingleTag, isTags, isTrending, isUserProfile, isUserProfileFollowersTab, isUserProfileFollowingTab, isUserProfileMainTab, isUserProfileRepoTab, isUserProfileStarsTab, isUserSettings, isUserTheOrganizationOwner, utils }; |
{ | ||
"name": "github-url-detection", | ||
"version": "5.9.0", | ||
"version": "5.10.0", | ||
"description": "Which GitHub page are you on? Is it an issue? Is it a list? Perfect for your WebExtension or userscript.", | ||
@@ -13,3 +13,3 @@ "keywords": [ | ||
], | ||
"repository": "fregante/github-url-detection", | ||
"repository": "refined-github/github-url-detection", | ||
"funding": "https://github.com/sponsors/fregante", | ||
@@ -16,0 +16,0 @@ "license": "MIT", |
@@ -7,4 +7,4 @@ # <img width="438" align="right" src="https://user-images.githubusercontent.com/1402241/81425503-01b4d800-9158-11ea-9406-484a1ff37968.png"> github-url-detection | ||
- Try the live [demo](https://fregante.github.io/github-url-detection/) | ||
- See the code and expected URLs for [every detection](https://github.com/fregante/github-url-detection/blob/main/index.ts) | ||
- Try the live [demo](https://refined-github.github.io/github-url-detection/) | ||
- See the code and expected URLs for [every detection](https://github.com/refined-github/github-url-detection/blob/main/index.ts) | ||
@@ -25,3 +25,3 @@ ## Install | ||
```js | ||
const href = 'https://github.com/fregante/github-url-detection/issues/1'; | ||
const href = 'https://github.com/refined-github/github-url-detection/issues/1'; | ||
if (pageDetect.isIssue(new URL(href))) { // Pass the URL as an `URL` object | ||
@@ -55,3 +55,3 @@ alert('The passed URL is of an issue!') | ||
```js | ||
if (pageDetect.isConversationList(new URL('https://github.com/fregante/github-url-detection/pulls'))) { | ||
if (pageDetect.isConversationList(new URL('https://github.com/refined-github/github-url-detection/pulls'))) { | ||
alert('You’re looking at a issues or PRs list!') | ||
@@ -58,0 +58,0 @@ } |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
36442
421
0