File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
// ==UserScript==
2
2
// @name GitHub Custom Navigation
3
- // @version 1.1.9
3
+ // @version 1.1.10
4
4
// @description A userscript that allows you to customize GitHub's main navigation bar
5
5
// @license MIT
6
6
// @author Rob Garrison
592
592
indx = els . length ;
593
593
while ( indx -- ) {
594
594
item = els [ indx ] . getAttribute ( "data-ghcn" ) ;
595
- if ( item !== "separator" && ! settings . items . hasOwnProperty ( item ) ) {
595
+ if ( item !== "separator" && ! settings . items ?. item ) {
596
596
destroyLink ( item ) ;
597
597
}
598
598
}
742
742
hasGists = false ,
743
743
hasItems = false ;
744
744
if ( val ) {
745
- hasGitHub = val . hasOwnProperty ( " github" ) ;
746
- hasGists = val . hasOwnProperty ( " gists" ) ;
747
- hasItems = val . hasOwnProperty ( " items" ) ;
745
+ hasGitHub = val ?. github ;
746
+ hasGists = val ?. gists ;
747
+ hasItems = val ?. items ;
748
748
// simple validation
749
749
if ( hasGitHub && hasGists && hasItems ) {
750
750
if ( ! init ) {
856
856
}
857
857
if ( obj . attr ) {
858
858
for ( key in obj . attr ) {
859
- if ( obj . attr . hasOwnProperty ( key ) ) {
859
+ if ( obj . attr ?. [ key ] ) {
860
860
el . setAttribute ( key , obj . attr [ key ] ) ;
861
861
}
862
862
}
You can’t perform that action at this time.
0 commit comments