@@ -91,27 +91,14 @@ Github.prototype.init = function () {
91
91
92
92
// Display or hide icons
93
93
Github . prototype . displayIcons = function ( ) {
94
- $iconStars = $ ( ".repo-stars" ) ;
95
- $iconForks = $ ( ".repo-forks" ) ;
96
- $iconIssues = $ ( ".repo-issues" ) ;
97
-
98
- if ( this . options . iconStars ) {
99
- $iconStars . css ( "display" , "inline-block" ) ;
100
- } else {
101
- $iconStars . css ( "display" , "none" ) ;
102
- }
103
-
104
- if ( this . options . iconForks ) {
105
- $iconForks . css ( "display" , "inline-block" ) ;
106
- } else {
107
- $iconForks . css ( "display" , "none" ) ;
108
- }
109
-
110
- if ( this . options . iconIssues ) {
111
- $iconIssues . css ( "display" , "inline-block" ) ;
112
- } else {
113
- $iconIssues . css ( "display" , "none" ) ;
114
- }
94
+ var options = this . options ,
95
+ $iconStars = $ ( ".repo-stars" ) ,
96
+ $iconForks = $ ( ".repo-forks" ) ,
97
+ $iconIssues = $ ( ".repo-issues" ) ;
98
+
99
+ $iconStars . css ( "display" , options . iconStars ? "inline-block" : "none" ) ;
100
+ $iconForks . css ( "display" , options . iconForks ? "inline-block" : "none" ) ;
101
+ $iconIssues . css ( "display" , options . iconIssues ? "inline-block" : "none" ) ;
115
102
} ;
116
103
117
104
// Request repositories from Github
0 commit comments