@@ -56,10 +56,13 @@ collect.set('isCompare', [
5656
5757export const isDashboard = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => ! isGist ( url ) && / ^ $ | ^ ( o r g s \/ [ ^ / ] + \/ ) ? d a s h b o a r d ( \/ | $ ) / . test ( getCleanPathname ( url ) ) ;
5858collect . set ( 'isDashboard' , [
59+ 'https://github.com///' ,
60+ 'https://github.com//' ,
5961 'https://github.com/' ,
6062 'https://github.com' ,
6163 'https://github.com/orgs/test/dashboard' ,
6264 'https://github.com/dashboard/index/2' ,
65+ 'https://github.com//dashboard' ,
6366 'https://github.com/dashboard' ,
6467 'https://github.com/orgs/edit/dashboard' ,
6568 'https://github.big-corp.com/' ,
@@ -372,6 +375,7 @@ collect.set('isRepoHome', [
372375 'https://github.com/sindresorhus/refined-github/' ,
373376 'https://github.com/sindresorhus/notifications/' ,
374377 'https://github.com/sindresorhus/edit' ,
378+ 'https://github.com/sindresorhus///edit' ,
375379 'https://github.com/sindresorhus/search' ,
376380 'https://github.com/sindresorhus/branches' ,
377381 'https://github.com/sindresorhus/refined-github?files=1' ,
@@ -641,8 +645,8 @@ collect.set('isNewRepoTemplate', [
641645/** Get the logged-in user’s username */
642646const getUsername = ( ) : string | undefined => document . querySelector ( 'meta[name="user-login"]' ) ?. getAttribute ( 'content' ) ! ;
643647
644- /** Drop leading and trailing slashes */
645- const getCleanPathname = ( url : URL | HTMLAnchorElement | Location = location ) : string => url . pathname . slice ( 1 , url . pathname . endsWith ( '/' ) ? - 1 : undefined ) ;
648+ /** Drop all duplicate slashes */
649+ const getCleanPathname = ( url : URL | HTMLAnchorElement | Location = location ) : string => url . pathname . replace ( / \/ + / g , '/' ) . slice ( 1 , url . pathname . endsWith ( '/' ) ? - 1 : undefined ) ;
646650
647651export interface RepositoryInfo {
648652 owner : string ;
0 commit comments