@@ -61,6 +61,9 @@ TEST: addTests('isCompareWikiPage', [
6161 'https://github.com/brookhong/Surfingkeys/wiki/Color-Themes/_compare/8ebb46b1a12d16fc1af442b7df0ca13ca3bb34dc...80e51eeabe69b15a3f23880ecc36f800b71e6c6d' ,
6262] ) ;
6363
64+ /**
65+ * @deprecated Use `isHome` and/or `isFeed` instead
66+ */
6467export const isDashboard = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => ! isGist ( url ) && / ^ $ | ^ ( o r g s \/ [ ^ / ] + \/ ) ? d a s h b o a r d ( - f e e d ) ? ( \/ | $ ) / . test ( getCleanPathname ( url ) ) ;
6568TEST: addTests ( 'isDashboard' , [
6669 'https://github.com///' ,
@@ -84,6 +87,18 @@ TEST: addTests('isDashboard', [
8487 'https://github.com/dashboard-feed' ,
8588] ) ;
8689
90+ export const isHome = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => ! isGist ( url ) && / ^ $ | ^ d a s h b o a r d ( \/ | $ ) / . test ( getCleanPathname ( url ) ) ;
91+ TEST: addTests ( 'isHome' , [
92+ 'https://github.com' ,
93+ 'https://github.com/dashboard' ,
94+ ] ) ;
95+
96+ export const isFeed = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => ! isGist ( url ) && / ^ ( f e e d | o r g s \/ [ ^ / ] + \/ d a s h b o a r d ) ( \/ | $ ) / . test ( getCleanPathname ( url ) ) ;
97+ TEST: addTests ( 'isFeed' , [
98+ 'https://github.com/feed' ,
99+ 'https://github.com/orgs/refined-github/dashboard' ,
100+ ] ) ;
101+
87102export const isEnterprise = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => url . hostname !== 'github.com' && url . hostname !== 'gist.github.com' ;
88103TEST: addTests ( 'isEnterprise' , [
89104 'https://github.big-corp.com/' ,
0 commit comments