1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00
woodpecker/static/scripts/utils.js
2015-09-29 18:21:17 -07:00

16 lines
362 B
JavaScript

Array.prototype.remove = function() {
var what, a = arguments, L = a.length, ax;
while (L && this.length) {
what = a[--L];
while ((ax = this.indexOf(what)) !== -1) {
this.splice(ax, 1);
}
}
return this;
};
function escapeHTML(html) {
return document.createElement('div').appendChild(
document.createTextNode(html)).parentNode.innerHTML;
}