Add some more reserved names.
This commit is contained in:
parent
66c7b64d01
commit
269d50ef18
|
@ -49,7 +49,24 @@
|
|||
if (!match) return false
|
||||
|
||||
// must not be a reserved `username`
|
||||
if (~['settings', 'organizations', 'site', 'blog'].indexOf(match[1])) return false
|
||||
var RESERVED_USERNAMES = [
|
||||
'settings',
|
||||
'organizations',
|
||||
'site',
|
||||
'blog',
|
||||
'about',
|
||||
'orgs',
|
||||
'styleguide',
|
||||
'showcases',
|
||||
'trending',
|
||||
'stars',
|
||||
'dashboard',
|
||||
'notifications'
|
||||
];
|
||||
var RESERVED_REPONAMES = ['followers', 'following'];
|
||||
|
||||
if (~RESERVED_USERNAMES.indexOf(match[1])) return false
|
||||
if (~RESERVED_REPONAMES.indexOf(match[2])) return false
|
||||
|
||||
// TODO: the intention is to hide the sidebar when users navigate to non-code areas (e.g. Issues, Pulls)
|
||||
// and show it again when users navigate back to the code area
|
||||
|
@ -194,4 +211,4 @@
|
|||
return localStorage.setItem(key, JSON.stringify(val))
|
||||
}
|
||||
}
|
||||
})()
|
||||
})()
|
||||
|
|
Loading…
Reference in New Issue