SHOW:
|
|
- or go back to the newest paste.
1 | //Define This hacky function | |
2 | ||
3 | function sclone_hack(obj){ | |
4 | var oldState = history.state; | |
5 | history.replaceState(obj, null); | |
6 | var clonedObj = history.state; | |
7 | history.replaceState(oldState, null); | |
8 | return clonedObj; | |
9 | } | |
10 | ||
11 | // Replace this | |
12 | unsafeWindow.rawReview = cloneInto(data.reviews[i], unsafeWindow); //2689 | |
13 | //With | |
14 | if ((typeof cloneInto != 'undefined') && (typeof cloneInto == 'function')){ | |
15 | unsafeWindow.rawReview = cloneInto(data.reviews[i], unsafeWindow); | |
16 | } else { | |
17 | - | unsafeWindow.rawReview = sclone_hack(data); |
17 | + | unsafeWindow.rawReview = sclone_hack(data.reviews[i]); |
18 | } | |
19 | ||
20 | ||
21 | ||
22 | // Replace this | |
23 | unsafeWindow.legacyUrls = cloneInto (data, unsafeWindow); //2756 | |
24 | // With | |
25 | if ((typeof cloneInto != 'undefined') && (typeof cloneInto == 'function')){ | |
26 | unsafeWindow.legacyUrls = cloneInto (data, unsafeWindow); | |
27 | } else { | |
28 | unsafeWindow.legacyUrls = sclone_hack(data); | |
29 | } |