From 024405e4f1a645f640803ad41e24e59a43f27890 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Mon, 13 Feb 2012 13:02:54 +0100 Subject: [PATCH] Added function for later testing. --- apps/contacts/js/contacts.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js index 9071038b50a..d61489b63c3 100644 --- a/apps/contacts/js/contacts.js +++ b/apps/contacts/js/contacts.js @@ -3,6 +3,21 @@ function ucwords (str) { return $1.toUpperCase(); }); } +/* TODO: Test this. + * http://snipplr.com/view/45323/remove-duplicate-values-from-array/ +Array.prototype.unique = function unique() { + var i = 0; + while (i < this.length) { + var current = this[i]; + for (k = this.length; k > i; k--) { + if (this[k] === current) { + this.splice(k,1); + } + } i++; + } + return this; +} +*/ String.prototype.strip_tags = function(){ tags = this; -- 2.39.5