Skip to content

Commit ad2babc

Browse files
committed
htdocs/site/js/github.js: switch to double quotes like the rest of the files.
1 parent 872b6e8 commit ad2babc

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

htdocs/site/js/github.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
/*! Inspired by: http://aboutcode.net/2010/11/11/list-github-projects-using-javascript.html */
22

3-
/* jshint quotmark:true, jquery:true */
3+
/* jshint jquery:true */
44

5-
'use strict';
5+
"use strict";
66

77
// htmlEntities taken from http://css-tricks.com/snippets/javascript/htmlentities-for-javascript/
88
function htmlEntities(str) {
9-
return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
9+
return String(str).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1010
}
1111

1212
jQuery.fn.listCommits = function(username, repository, branch) {
13-
this.html('<span>Querying GitHub for recent commits&hellip;</span>');
13+
this.html("<span>Querying GitHub for recent commits&hellip;</span>");
1414

1515
var target = this;
16-
$.getJSON('https://api.github.com/repos/' + username + '/' + repository + '/commits?sha=' + branch + '&callback=?', function(response) {
16+
$.getJSON("https://api.github.com/repos/" + username + "/" + repository + "/commits?sha=" + branch + "&callback=?", function(response) {
1717
var commits = response.data;
18-
var list = $('<ul class="rssfeeditems"/>');
18+
var list = $("<ul class='rssfeeditems'/>");
1919

2020
target.empty().append(list);
2121

2222
$(commits).each(function(i) {
23-
var githubUrl = 'https://github.com/' + username + '/' + repository + '/commit/' + this.sha;
23+
var githubUrl = "https://github.com/" + username + "/" + repository + "/commit/" + this.sha;
2424
var shortMessage = htmlEntities(cutLines(this.commit.message));
2525

2626
if (this.author !== null) {
27-
list.append('<li><a href="' + githubUrl + '">' + shortMessage + '</a> <em>by <strong><a class="author" href="' + 'https://github.com/' + this.author.login + '">' + this.author.login + '</a></strong></em></li>');
27+
list.append("<li><a href='" + githubUrl + "'>" + shortMessage + "</a> <em>by <strong><a class='author' href='" + "https://github.com/" + this.author.login + "'>" + this.author.login + "</a></strong></em></li>");
2828
} else {
29-
list.append('<li><a href="' + githubUrl + '">' + shortMessage + '</a> <em>by <strong>' + this.commit.author.name + '</strong></em></li>');
29+
list.append("<li><a href='" + githubUrl + "'>" + shortMessage + "</a> <em>by <strong>" + this.commit.author.name + "</strong></em></li>");
3030
}
3131

3232
if (i === 9) {
@@ -36,7 +36,7 @@ jQuery.fn.listCommits = function(username, repository, branch) {
3636
});
3737

3838
function cutLines(message) {
39-
var lineFeed = message.indexOf('\n');
39+
var lineFeed = message.indexOf("\n");
4040

4141
if (lineFeed > -1) {
4242
return message.slice(0, lineFeed);

0 commit comments

Comments
 (0)