File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
sources/net.sf.j2s.ajax/store/net/sf/j2s/store Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,11 @@ private SimpleStore() {
15
15
/**
16
16
* @j2sNative
17
17
* var ua = navigator.userAgent.toLowerCase ();
18
- * var isIE = ( ua.indexOf ("msie") != -1) ;
18
+ * var isOldIE = ua.indexOf ("msie 5.5 ") != -1 || ua.indexOf ("msie 5.0") != -1 ;
19
19
* var cookieURL = window["j2s.xss.cookie.url"];
20
- * var isLocal = window.location.protocol == "file:";
21
- * if (!isLocal && cookieURL != null && !isIE) {
20
+ * var isLocal = window.location.protocol == "file:"
21
+ * || window.location.host.toLowerCase ().indexOf ("localhost") != -1;
22
+ * if (!isLocal && cookieURL != null && !isOldIE) {
22
23
* this.store = new net.sf.j2s.store.XSSCookieStore(cookieURL);
23
24
* } else {
24
25
* this.store = new net.sf.j2s.store.CookieStore();
Original file line number Diff line number Diff line change 8
8
*
9
9
* @j2sSuffix
10
10
* var ua = navigator.userAgent.toLowerCase ();
11
- * var isIE = ( ua.indexOf ("msie") != -1) ;
11
+ * var isOldIE = ua.indexOf ("msie 5.5 ") != -1 || ua.indexOf ("msie 5.0") != -1 ;
12
12
* var xssCookieURL = window["j2s.xss.cookie.url"];
13
- * var isLocal = window.location.protocol == "file:";
14
- * if (!isLocal && xssCookieURL != null && !isIE) {
13
+ * var isLocal = window.location.protocol == "file:"
14
+ * || window.location.host.toLowerCase ().indexOf ("localhost") != -1;
15
+ * if (!isLocal && xssCookieURL != null && !isOldIE) {
15
16
* net.sf.j2s.store.XSSCookieStore.initialize(xssCookieURL);
16
17
* }
17
18
*/
@@ -32,10 +33,7 @@ public XSSCookieStore(String url) {
32
33
/**
33
34
* @j2sNative
34
35
var ua = navigator.userAgent.toLowerCase ();
35
- var isIE = (ua.indexOf ("msie") != -1);
36
- if (!isIE) {
37
- document.domain = document.domain;
38
- }
36
+ document.domain = document.domain;
39
37
var xssIfr = document.getElementById ("xss-cookie");
40
38
if (xssIfr != null) {
41
39
return;
You can’t perform that action at this time.
0 commit comments