Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,7 @@ TEST: addTests('isRepo', [
export const hasRepoHeader = (url: URL | HTMLAnchorElement | Location = location): boolean => isRepo(url) && !isRepoSearch(url);
TEST: addTests('hasRepoHeader', combinedTestOnly);

// On empty repos, there's only isRepoHome; this element is found in `<head>`
export const isEmptyRepoRoot = (): boolean => isRepoHome() && !exists('link[rel="canonical"]');
export const isEmptyRepoRoot = (): boolean => isRepoHome() && exists('.blankslate-icon, #empty-setup-clone-url');
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.blankslate-icon

If you don't have write access

Image

#empty-setup-clone-ur

If you do

Image


export const isEmptyRepo = (): boolean => exists('[aria-label="Cannot fork because repository is empty."]');

Expand Down