htdocs: Tweak JS.

[ci skip]
This commit is contained in:
XhmikosR 2014-03-16 12:39:03 +02:00
parent bfd388dc15
commit 4ab04ef255
3 changed files with 16 additions and 12 deletions

View File

@ -17,22 +17,19 @@
"lint": "node run-tests"
},
"dependencies": {
"clean-css": "~2.1.0",
"clean-css": "~2.1.6",
"csslint": "~0.10.0",
"jshint": "~2.4.3",
"jshint": "~2.4.4",
"shelljs": "~0.2.6",
"uglify-js": "~2.4.12"
"uglify-js": "~2.4.13"
},
"jshintConfig": {
"bitwise": true,
"boss": true,
"browser": false,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"forin": true,
"indent": 4,
"latedef": true,
"multistr": true,
"noarg": true,
"node": true,
"noempty": true,
@ -40,6 +37,7 @@
"shelljs": true,
"strict": true,
"trailing": true,
"undef": true,
"unused": true
},
"engines": {

View File

@ -1,15 +1,21 @@
/*! Inspired by: http://aboutcode.net/2010/11/11/list-github-projects-using-javascript.html */
/* jshint jquery:true */
"use strict";
/* jshint browser:true, jquery:true */
// htmlEntities taken from http://css-tricks.com/snippets/javascript/htmlentities-for-javascript/
function htmlEntities(str) {
return String(str).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
"use strict";
var ret = String(str)
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;");
return ret;
}
jQuery.fn.listCommits = function(username, repository, branch) {
"use strict";
this.html("<span>Querying GitHub for recent commits&hellip;</span>");
var target = this;

File diff suppressed because one or more lines are too long