質問編集履歴
8
エラーの変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,17 +4,9 @@
|
|
4
4
|
|
5
5
|
### 発生している問題・エラーメッセージ
|
6
6
|
|
7
|
-
※追記 chromeの検証にて、下記エラーが出ておりました。
|
7
|
+
※追記02 chromeの検証にて、下記エラーが出ておりました。
|
8
8
|
```
|
9
|
-
Uncaught SyntaxError:
|
9
|
+
Uncaught SyntaxError: Unexpected token <
|
10
|
-
s_inner.html:46 Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
|
11
|
-
at https://satori.segs.jp/s_inner.html:46:27
|
12
|
-
(anonymous) @ s_inner.html:46
|
13
|
-
s_inner.html:46 Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
|
14
|
-
at https://satori.segs.jp/s_inner.html:46:27
|
15
|
-
(anonymous) @ s_inner.html:46
|
16
|
-
s_inner.html:46 Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
|
17
|
-
at https://satori.segs.jp/s_inner.html:46:27
|
18
10
|
```
|
19
11
|
|
20
12
|
### 該当のソースコード
|
7
エラーコードの修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,10 +6,15 @@
|
|
6
6
|
|
7
7
|
※追記 chromeの検証にて、下記エラーが出ておりました。
|
8
8
|
```
|
9
|
-
JQMIGRATE: Migrate is installed, version 1.4.1
|
10
|
-
|
9
|
+
Uncaught SyntaxError: Invalid or unexpected token
|
11
10
|
s_inner.html:46 Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
|
12
11
|
at https://satori.segs.jp/s_inner.html:46:27
|
12
|
+
(anonymous) @ s_inner.html:46
|
13
|
+
s_inner.html:46 Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
|
14
|
+
at https://satori.segs.jp/s_inner.html:46:27
|
15
|
+
(anonymous) @ s_inner.html:46
|
16
|
+
s_inner.html:46 Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
|
17
|
+
at https://satori.segs.jp/s_inner.html:46:27
|
13
18
|
```
|
14
19
|
|
15
20
|
### 該当のソースコード
|
6
インデントの修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -18,77 +18,82 @@
|
|
18
18
|
<div id="satori__creative_container"></div>
|
19
19
|
<script>
|
20
20
|
(function() {
|
21
|
-
"user strict";
|
21
|
+
"user strict";
|
22
|
-
var root = this;
|
22
|
+
var root = this;
|
23
|
-
var domain, creative_key, loadScript, queryBuilder, params;
|
23
|
+
var domain, creative_key, loadScript, queryBuilder, params;
|
24
|
-
root.SatoriForm = {
|
24
|
+
root.SatoriForm = {
|
25
|
-
configure: function(obj) {
|
25
|
+
configure: function(obj) {
|
26
|
-
var self = this;
|
26
|
+
var self = this;
|
27
|
-
root.__tempConfigureObj = obj;
|
27
|
+
root.__tempConfigureObj = obj;
|
28
|
-
}
|
28
|
+
}
|
29
|
-
};
|
29
|
+
};
|
30
|
-
domain = "delivery.satr.jp";
|
30
|
+
domain = "delivery.satr.jp";
|
31
|
-
creative_key = "フォームの作成キー";
|
31
|
+
creative_key = "フォームの作成キー";
|
32
|
-
loadScript = function(src, callback) {
|
32
|
+
loadScript = function(src, callback) {
|
33
|
-
var done = false;
|
33
|
+
var done = false;
|
34
|
-
var head = document.getElementsByTagName('head')[0];
|
34
|
+
var head = document.getElementsByTagName('head')[0];
|
35
|
-
var script = document.createElement('script');
|
35
|
+
var script = document.createElement('script');
|
36
|
-
script.src = src;
|
36
|
+
script.src = src;
|
37
|
-
head.appendChild(script);
|
37
|
+
head.appendChild(script);
|
38
38
|
|
39
|
-
// Attach handlers for all browsers
|
39
|
+
// Attach handlers for all browsers
|
40
|
-
script.onload = script.onreadystatechange = function() {
|
40
|
+
script.onload = script.onreadystatechange = function() {
|
41
|
-
if (!done && (!this.readyState || this.readyState === "loaded" || this.readyState ===
|
41
|
+
if (!done && (!this.readyState || this.readyState === "loaded" || this.readyState ===
|
42
|
+
"complete")) {
|
42
|
-
done = true;
|
43
|
+
done = true;
|
43
|
-
callback();
|
44
|
+
callback();
|
44
45
|
|
45
|
-
// Handle memory leak in IE
|
46
|
+
// Handle memory leak in IE
|
46
|
-
script.onload = script.onreadystatechange = null;
|
47
|
+
script.onload = script.onreadystatechange = null;
|
47
|
-
if (head && script.parentNode) {
|
48
|
+
if (head && script.parentNode) {
|
48
|
-
head.removeChild(script);
|
49
|
+
head.removeChild(script);
|
49
|
-
}
|
50
|
+
}
|
50
|
-
}
|
51
|
+
}
|
51
|
-
};
|
52
|
+
};
|
52
|
-
};
|
53
|
+
};
|
53
|
-
getCookie = function(key) {
|
54
|
+
getCookie = function(key) {
|
54
|
-
var cookieString, cookieKeyArray, i, len, targetCookie, valueIndex;
|
55
|
+
var cookieString, cookieKeyArray, i, len, targetCookie, valueIndex;
|
55
|
-
cookieString = document.cookie;
|
56
|
+
cookieString = document.cookie;
|
56
|
-
cookieKeyArray = cookieString.split(";");
|
57
|
+
cookieKeyArray = cookieString.split(";");
|
57
|
-
len = cookieKeyArray.length;
|
58
|
+
len = cookieKeyArray.length;
|
58
|
-
for (i = 0; i < len; i++) {
|
59
|
+
for (i = 0; i < len; i++) {
|
59
|
-
targetCookie = cookieKeyArray[i];
|
60
|
+
targetCookie = cookieKeyArray[i];
|
60
|
-
targetCookie = targetCookie.replace(/^\s+|\s+$/g, "");
|
61
|
+
targetCookie = targetCookie.replace(/^\s+|\s+$/g, "");
|
61
|
-
valueIndex = targetCookie.indexOf("=");
|
62
|
+
valueIndex = targetCookie.indexOf("=");
|
62
|
-
if (targetCookie.substring(0, valueIndex) == key) {
|
63
|
+
if (targetCookie.substring(0, valueIndex) == key) {
|
63
|
-
return unescape(targetCookie.slice(valueIndex + 1));
|
64
|
+
return unescape(targetCookie.slice(valueIndex + 1));
|
64
|
-
}
|
65
|
+
}
|
65
|
-
}
|
66
|
+
}
|
66
|
-
return "";
|
67
|
+
return "";
|
67
|
-
};
|
68
|
+
};
|
68
|
-
queryBuilder = function(params) {
|
69
|
+
queryBuilder = function(params) {
|
69
|
-
var result = [];
|
70
|
+
var result = [];
|
70
|
-
Object.keys(params).forEach(function(key) {
|
71
|
+
Object.keys(params).forEach(function(key) {
|
71
|
-
result.push(key + "=" + encodeURIComponent(params[key]))
|
72
|
+
result.push(key + "=" + encodeURIComponent(params[key]))
|
72
|
-
});
|
73
|
+
});
|
73
|
-
return result.join("&");
|
74
|
+
return result.join("&");
|
74
|
-
};
|
75
|
+
};
|
75
|
-
params = {
|
76
|
+
params = {
|
76
|
-
current_url: document.URL,
|
77
|
+
current_url: document.URL,
|
77
|
-
referer_url: document.referrer,
|
78
|
+
referer_url: document.referrer,
|
78
|
-
logging_status: "true",
|
79
|
+
logging_status: "true",
|
79
|
-
st_segs: getCookie("st_segs"),
|
80
|
+
st_segs: getCookie("st_segs"),
|
80
|
-
st_id: getCookie("satori_id")
|
81
|
+
st_id: getCookie("satori_id")
|
81
|
-
};
|
82
|
+
};
|
82
|
-
loadScript("//" + domain + "/creative_set/" + creative_key + "/f.js?" +
|
83
|
+
loadScript("//" + domain + "/creative_set/" + creative_key + "/f.js?" +
|
84
|
+
queryBuilder(params),
|
85
|
+
function() {
|
83
|
-
var config = root.__tempConfigureObj;
|
86
|
+
var config = root.__tempConfigureObj;
|
84
|
-
root.__tempConfigureObj = undefined;
|
87
|
+
root.__tempConfigureObj = undefined;
|
85
|
-
if (typeof configure == "object") {
|
88
|
+
if (typeof configure == "object") {
|
86
|
-
SatoriCreative.configure(config);
|
89
|
+
SatoriCreative.configure(config);
|
87
|
-
}
|
90
|
+
}
|
88
|
-
SatoriCreative.start();
|
91
|
+
SatoriCreative.start();
|
89
|
-
});
|
92
|
+
});
|
90
93
|
}).call(this);
|
94
|
+
|
91
95
|
</script>
|
96
|
+
|
92
97
|
```
|
93
98
|
|
94
99
|
### 試したこと
|
5
インデントの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -35,11 +35,13 @@
|
|
35
35
|
var script = document.createElement('script');
|
36
36
|
script.src = src;
|
37
37
|
head.appendChild(script);
|
38
|
+
|
38
39
|
// Attach handlers for all browsers
|
39
40
|
script.onload = script.onreadystatechange = function() {
|
40
41
|
if (!done && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) {
|
41
42
|
done = true;
|
42
43
|
callback();
|
44
|
+
|
43
45
|
// Handle memory leak in IE
|
44
46
|
script.onload = script.onreadystatechange = null;
|
45
47
|
if (head && script.parentNode) {
|
@@ -107,6 +109,7 @@
|
|
107
109
|
|
108
110
|
個別Javaスクリプト読み込みコード
|
109
111
|
```ここに言語を入力
|
112
|
+
|
110
113
|
//Custom JavaScript Widget
|
111
114
|
add_action('admin_menu', 'custom_js_hooks');
|
112
115
|
add_action('save_post', 'save_custom_js');
|
4
インデントの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -98,7 +98,8 @@
|
|
98
98
|
②個別Javaスクリプト読み込みのため、下記コードをfunctions.php最下部に記述し、個別Javaスクリプトの書き込み欄にスクリプトの設置コード
|
99
99
|
```ここに言語を入力
|
100
100
|
<div id="satori__creative_container">
|
101
|
-
<script id="-_-satori_creative-_-" src="//delivery.satr.jp/js/creative_set.js" data-key="フォームの生成キー">
|
101
|
+
<script id="-_-satori_creative-_-" src="//delivery.satr.jp/js/creative_set.js" data-key="フォームの生成キー">
|
102
|
+
</script>
|
102
103
|
</div>
|
103
104
|
```を記入
|
104
105
|
↓
|
3
エラーコードの追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,8 +4,12 @@
|
|
4
4
|
|
5
5
|
### 発生している問題・エラーメッセージ
|
6
6
|
|
7
|
+
※追記 chromeの検証にて、下記エラーが出ておりました。
|
7
8
|
```
|
9
|
+
JQMIGRATE: Migrate is installed, version 1.4.1
|
8
|
-
|
10
|
+
?p=1464&preview=true:167 Uncaught SyntaxError: Unexpected token <
|
11
|
+
s_inner.html:46 Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
|
12
|
+
at https://satori.segs.jp/s_inner.html:46:27
|
9
13
|
```
|
10
14
|
|
11
15
|
### 該当のソースコード
|
2
書式の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -91,7 +91,8 @@
|
|
91
91
|
↓
|
92
92
|
編集画面では表示されます。
|
93
93
|
|
94
|
-
②個別Javaスクリプト読み込みのため、下記コードをfunctions.php最下部に記述し、個別Javaスクリプトの書き込み欄にスクリプトの設置コード
|
94
|
+
②個別Javaスクリプト読み込みのため、下記コードをfunctions.php最下部に記述し、個別Javaスクリプトの書き込み欄にスクリプトの設置コード
|
95
|
+
```ここに言語を入力
|
95
96
|
<div id="satori__creative_container">
|
96
97
|
<script id="-_-satori_creative-_-" src="//delivery.satr.jp/js/creative_set.js" data-key="フォームの生成キー"></script>
|
97
98
|
</div>
|
1
マークアップを追加しました。ご指摘ありがとうございます。
title
CHANGED
File without changes
|
body
CHANGED
@@ -91,13 +91,16 @@
|
|
91
91
|
↓
|
92
92
|
編集画面では表示されます。
|
93
93
|
|
94
|
-
②個別Javaスクリプト読み込みのため、下記コードをfunctions.php最下部に記述し、個別Javaスクリプトの書き込み欄にスクリプトの設置コード
|
94
|
+
②個別Javaスクリプト読み込みのため、下記コードをfunctions.php最下部に記述し、個別Javaスクリプトの書き込み欄にスクリプトの設置コード```ここに言語を入力
|
95
|
+
<div id="satori__creative_container">
|
95
96
|
<script id="-_-satori_creative-_-" src="//delivery.satr.jp/js/creative_set.js" data-key="フォームの生成キー"></script>
|
96
|
-
</div>
|
97
|
+
</div>
|
98
|
+
```を記入
|
97
99
|
↓
|
98
100
|
編集画面でも表示されません。
|
99
101
|
|
100
102
|
個別Javaスクリプト読み込みコード
|
103
|
+
```ここに言語を入力
|
101
104
|
//Custom JavaScript Widget
|
102
105
|
add_action('admin_menu', 'custom_js_hooks');
|
103
106
|
add_action('save_post', 'save_custom_js');
|
@@ -127,9 +130,8 @@
|
|
127
130
|
rewind_posts();
|
128
131
|
}
|
129
132
|
}
|
133
|
+
```
|
130
134
|
|
131
|
-
|
132
|
-
|
133
135
|
### 補足情報(FW/ツールのバージョンなど)
|
134
136
|
|
135
137
|
WPバージョン:5.0.3(英語バージョン)
|