Skip to content

Commit 6496f50

Browse files
author
Zeno Rocha
committed
Source formatting zenorocha#29
1 parent e70d175 commit 6496f50

File tree

1 file changed

+8
-21
lines changed

1 file changed

+8
-21
lines changed

src/jquery.github.js

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -91,27 +91,14 @@ Github.prototype.init = function () {
9191

9292
// Display or hide icons
9393
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" );
115102
};
116103

117104
// Request repositories from Github

0 commit comments

Comments
 (0)