File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// ==UserScript==
22// @name GitHub Custom Navigation
3- // @version 1.1.9
3+ // @version 1.1.10
44// @description A userscript that allows you to customize GitHub's main navigation bar
55// @license MIT
66// @author Rob Garrison
592592 indx = els . length ;
593593 while ( indx -- ) {
594594 item = els [ indx ] . getAttribute ( "data-ghcn" ) ;
595- if ( item !== "separator" && ! settings . items . hasOwnProperty ( item ) ) {
595+ if ( item !== "separator" && ! settings . items ?. item ) {
596596 destroyLink ( item ) ;
597597 }
598598 }
742742 hasGists = false ,
743743 hasItems = false ;
744744 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 ;
748748 // simple validation
749749 if ( hasGitHub && hasGists && hasItems ) {
750750 if ( ! init ) {
856856 }
857857 if ( obj . attr ) {
858858 for ( key in obj . attr ) {
859- if ( obj . attr . hasOwnProperty ( key ) ) {
859+ if ( obj . attr ?. [ key ] ) {
860860 el . setAttribute ( key , obj . attr [ key ] ) ;
861861 }
862862 }
You can’t perform that action at this time.
0 commit comments