Skip to content

Commit 347de13

Browse files
committed
htdocs: Tweak JS.
[ci skip]
1 parent 8573082 commit 347de13

3 files changed

Lines changed: 16 additions & 12 deletions

File tree

‎package.json‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,27 @@
1717
"lint": "node run-tests"
1818
},
1919
"dependencies": {
20-
"clean-css": "~2.1.0",
20+
"clean-css": "~2.1.6",
2121
"csslint": "~0.10.0",
22-
"jshint": "~2.4.3",
22+
"jshint": "~2.4.4",
2323
"shelljs": "~0.2.6",
24-
"uglify-js": "~2.4.12"
24+
"uglify-js": "~2.4.13"
2525
},
2626
"jshintConfig": {
27-
"bitwise": true,
28-
"boss": true,
29-
"browser": false,
3027
"camelcase": true,
3128
"curly": true,
3229
"eqeqeq": true,
30+
"forin": true,
3331
"indent": 4,
3432
"latedef": true,
35-
"multistr": true,
3633
"noarg": true,
3734
"node": true,
3835
"noempty": true,
3936
"quotmark": "double",
4037
"shelljs": true,
4138
"strict": true,
4239
"trailing": true,
40+
"undef": true,
4341
"unused": true
4442
},
4543
"engines": {

‎site/js/github.js‎

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

3-
/* jshint jquery:true */
4-
5-
"use strict";
3+
/* jshint browser:true, jquery:true */
64

75
// htmlEntities taken from http://css-tricks.com/snippets/javascript/htmlentities-for-javascript/
86
function htmlEntities(str) {
9-
return String(str).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
7+
"use strict";
8+
var ret = String(str)
9+
.replace(/&/g, "&amp;")
10+
.replace(/</g, "&lt;")
11+
.replace(/>/g, "&gt;")
12+
.replace(/"/g, "&quot;");
13+
14+
return ret;
1015
}
1116

1217
jQuery.fn.listCommits = function(username, repository, branch) {
18+
"use strict";
1319
this.html("<span>Querying GitHub for recent commits&hellip;</span>");
1420

1521
var target = this;

0 commit comments

Comments
 (0)