3 var random_count_threshold
= 25;
4 var random_seed
= 0.462;
5 Math
.random = function() {
7 if (random_count
> random_count_threshold
){
11 return (random_seed
% 1);
13 if (typeof(crypto
) == 'object' &&
14 typeof(crypto
.getRandomValues
) == 'function') {
15 crypto
.getRandomValues = function(arr
) {
16 var scale
= Math
.pow(256, arr
.BYTES_PER_ELEMENT
);
17 for (var i
= 0; i
< arr
.length
; i
++) {
18 arr
[i
] = Math
.floor(Math
.random() * scale
);
26 var date_count_threshold
= 25;
28 var time_seed
= 1204251968254;
30 if (this instanceof Date
) {
32 if (date_count
> date_count_threshold
){
36 switch (arguments
.length
) {
37 case 0: return new orig_date(time_seed
);
38 case 1: return new orig_date(arguments
[0]);
39 default: return new orig_date(arguments
[0], arguments
[1],
40 arguments
.length
>= 3 ? arguments
[2] : 1,
41 arguments
.length
>= 4 ? arguments
[3] : 0,
42 arguments
.length
>= 5 ? arguments
[4] : 0,
43 arguments
.length
>= 6 ? arguments
[5] : 0,
44 arguments
.length
>= 7 ? arguments
[6] : 0);
47 return new Date().toString();
49 Date
.__proto__
= orig_date
;
50 Date
.prototype = orig_date
.prototype;
51 Date
.prototype.constructor = Date
;
52 orig_date
.now = function() {
53 return new Date().getTime();
55 orig_date
.prototype.getTimezoneOffset = function() {
56 var dst2010Start
= 1268560800000;
57 var dst2010End
= 1289120400000;
58 if (this.getTime() >= dst2010Start
&& this.getTime() < dst2010End
)