diff --git a/index.ts b/index.ts index fe4450b..93aacc1 100644 --- a/index.ts +++ b/index.ts @@ -397,8 +397,12 @@ 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 `` -export const isEmptyRepoRoot = (): boolean => isRepoHome() && !exists('link[rel="canonical"]'); +export const isEmptyRepoRoot = (): boolean => isRepoHome() && exists([ + // If you don't have write access + '.blankslate-icon', + // If you have write access + '#empty-setup-clone-url', +].join(',')); export const isEmptyRepo = (): boolean => exists('[aria-label="Cannot fork because repository is empty."]');