|
1 | 1 | /* |
2 | | - * jQuery Github - v0.3.0 |
| 2 | + * jQuery Github - v0.3.1 |
3 | 3 | * A jQuery plugin to display your Github Repositories. |
4 | 4 | * https://github.com/zenorocha/jquery-github/ |
5 | 5 | * |
|
137 | 137 | pushed_at = self.parsePushedDate( repo.pushed_at ), |
138 | 138 | repo_url = self.parseRepositoryURL( repo.url ); |
139 | 139 |
|
140 | | - return $( $.parseHTML(" \ |
141 | | - <div class='github-box'> \ |
142 | | - <div class='github-box-header'> \ |
143 | | - <h3> \ |
144 | | - <a href='" + repo_url + "'>" + repo.name + "</a> \ |
145 | | - </h3> \ |
146 | | - <div class='github-stats'> \ |
147 | | - <a class='repo-stars' title='Stars' data-icon='7' href='" + repo_url + "/watchers'>" + repo.watchers + "</a> \ |
148 | | - <a class='repo-forks' title='Forks' data-icon='f' href='" + repo_url + "/network'>" + repo.forks + "</a> \ |
149 | | - <a class='repo-issues' title='Issues' data-icon='i' href='" + repo_url + "/issues'>" + repo.open_issues + "</a> \ |
150 | | - </div> \ |
151 | | - </div> \ |
152 | | - <div class='github-box-content'> \ |
153 | | - <p>" + repo.description + " — <a href='" + repo_url + "#readme'>Read More</a></p> \ |
154 | | - </div> \ |
155 | | - <div class='github-box-download'> \ |
156 | | - <p class='repo-update'>Latest commit to <strong>master</strong> on " + pushed_at + "</p> \ |
157 | | - <a class='repo-download' title='Download as zip' data-icon='w' href='" + repo_url + "/zipball/master'></a> \ |
158 | | - </div> \ |
159 | | - </div> \ |
160 | | - ") ); |
| 140 | + return $( |
| 141 | + "<div class='github-box'>" + |
| 142 | + "<div class='github-box-header'>" + |
| 143 | + "<h3>" + |
| 144 | + "<a href='" + repo_url + "'>" + repo.name + "</a>" + |
| 145 | + "</h3>" + |
| 146 | + "<div class='github-stats'>" + |
| 147 | + "<a class='repo-stars' title='Stars' data-icon='7' href='" + repo_url + "/watchers'>" + repo.watchers + "</a>" + |
| 148 | + "<a class='repo-forks' title='Forks' data-icon='f' href='" + repo_url + "/network'>" + repo.forks + "</a>" + |
| 149 | + "<a class='repo-issues' title='Issues' data-icon='i' href='" + repo_url + "/issues'>" + repo.open_issues + "</a>" + |
| 150 | + "</div>" + |
| 151 | + "</div>" + |
| 152 | + "<div class='github-box-content'>" + |
| 153 | + "<p>" + repo.description + " — <a href='" + repo_url + "#readme'>Read More</a></p>" + |
| 154 | + "</div>" + |
| 155 | + "<div class='github-box-download'>" + |
| 156 | + "<p class='repo-update'>Latest commit to <strong>master</strong> on " + pushed_at + "</p>" + |
| 157 | + "<a class='repo-download' title='Download as zip' data-icon='w' href='" + repo_url + "/zipball/master'></a>" + |
| 158 | + "</div>" + |
| 159 | + "</div>"); |
161 | 160 | }; |
162 | 161 |
|
163 | 162 | // Request repositories from Github |
|
181 | 180 | }); |
182 | 181 | }; |
183 | 182 |
|
184 | | - $.fn[ pluginName ] = function ( options ) { |
| 183 | + $.fn[pluginName] = function ( options ) { |
185 | 184 | return this.each(function () { |
186 | | - if ( !$.data( this, "plugin_" + pluginName ) ) { |
187 | | - $.data( this, "plugin_" + pluginName, new Plugin( this, options ) ); |
| 185 | + if ( !$( this ).data( "plugin_" + pluginName ) ) { |
| 186 | + $( this ).data( "plugin_" + pluginName, new Plugin( this, options ) ); |
188 | 187 | } |
189 | 188 | }); |
190 | 189 | }; |
191 | 190 |
|
192 | | -}( jQuery, window ) ); |
| 191 | +}( window.jQuery || window.Zepto, window )); |
0 commit comments