aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nicolist.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/nicolist.js b/nicolist.js
index 0ebb7a4..40f8414 100644
--- a/nicolist.js
+++ b/nicolist.js
@@ -249,7 +249,8 @@ function getToken (isWatchPage) {
}
}
-Array.prototype.shuffle = function() {
+Object.defineProperty(Array.prototype, 'shuffle', {value:
+ function() {
var i = this.length;
while(i){
var j = Math.floor(Math.random()*i);
@@ -258,4 +259,5 @@ Array.prototype.shuffle = function() {
this[j] = t;
}
return this;
-}
+ }
+});