質問編集履歴
3
コピペ防止のため
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
コメントをする機能を作りたい
|
test
CHANGED
File without changes
|
2
ソースコードの非公開化のため
test
CHANGED
File without changes
|
test
CHANGED
@@ -11,195 +11,3 @@
|
|
11
11
|
|
12
12
|
|
13
13
|
よろしくお願いいたします。
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
### タイトル、urlを取得するjavascriptのコード
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
```
|
24
|
-
|
25
|
-
window.onload = function() {
|
26
|
-
|
27
|
-
chrome.tabs.getSelected(null, function(tab) {
|
28
|
-
|
29
|
-
document.getElementById('title').innerHTML = tab.title;
|
30
|
-
|
31
|
-
document.getElementById('url').innerHTML = tab.url;
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
console.log(tab.title);
|
36
|
-
|
37
|
-
console.log(tab.url);
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
});
|
42
|
-
|
43
|
-
};
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
```
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
### タイトル+URL+コメントをGoogleフォームで送信するコード
|
52
|
-
|
53
|
-
```
|
54
|
-
|
55
|
-
<!DOCTYPE html>
|
56
|
-
|
57
|
-
<html lang="ja">
|
58
|
-
|
59
|
-
<head>
|
60
|
-
|
61
|
-
<meta charset="UTF-8">
|
62
|
-
|
63
|
-
<script src="style.js" type="text/javascript"></script>
|
64
|
-
|
65
|
-
</head>
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
<body>
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
<form action="https://docs.google.com/forms/d/e/XXXXXXXXXXXXXXX/formResponse" >
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
<p>タイトル:<br>
|
78
|
-
|
79
|
-
<input id="title" value=title name="entry.XXXX">
|
80
|
-
|
81
|
-
<p>URL:<br>
|
82
|
-
|
83
|
-
<input id="url" value=url name="entry.XXXXXXXX">
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
<p>コメント:<br>
|
88
|
-
|
89
|
-
<textarea name="entry.XXXXXXXXXXX"" cols="30" rows="5" ></textarea></p>
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
<button type="submit" name="button" value="送信"></button>
|
94
|
-
|
95
|
-
</form>
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
</body>
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
```
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
### manifest.json
|
112
|
-
|
113
|
-
```
|
114
|
-
|
115
|
-
{
|
116
|
-
|
117
|
-
"manifest_version": 2,
|
118
|
-
|
119
|
-
"author": "XXXXXXXXXXXX",
|
120
|
-
|
121
|
-
"homepage_url": "http://example.com",
|
122
|
-
|
123
|
-
"name": "XXXXXXXXXXXXXXX ",
|
124
|
-
|
125
|
-
"description": " XXXXXXXXXXX",
|
126
|
-
|
127
|
-
"version": "1.0.12.3456",
|
128
|
-
|
129
|
-
"icons": {
|
130
|
-
|
131
|
-
"32": "icon_32.png",
|
132
|
-
|
133
|
-
"48": "icon_48.png",
|
134
|
-
|
135
|
-
"128": "icon_128.png"
|
136
|
-
|
137
|
-
},
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
"content_scripts": [{
|
146
|
-
|
147
|
-
"matches": ["<all_urls>"],
|
148
|
-
|
149
|
-
"js": ["style.js","jquery.min.js"]
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
}],
|
158
|
-
|
159
|
-
"background": {
|
160
|
-
|
161
|
-
"scripts": ["background.js"]
|
162
|
-
|
163
|
-
},
|
164
|
-
|
165
|
-
"browser_action": {
|
166
|
-
|
167
|
-
"default_icon": "icon_32.png",
|
168
|
-
|
169
|
-
"default_popup": "form.html",
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
"default_title": "XXXXXXXXX"
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
},
|
178
|
-
|
179
|
-
"permissions": [
|
180
|
-
|
181
|
-
"tabs",
|
182
|
-
|
183
|
-
"background",
|
184
|
-
|
185
|
-
"http://*/*",
|
186
|
-
|
187
|
-
"https://*/*",
|
188
|
-
|
189
|
-
"http://docs.google.com",
|
190
|
-
|
191
|
-
"https://docs.google.com",
|
192
|
-
|
193
|
-
"https://*.google.com"
|
194
|
-
|
195
|
-
]
|
196
|
-
|
197
|
-
}
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
```
|
1
manifestの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,15 +2,7 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
|
5
|
+
ChromeExtensionのアプリを作っていて、ブラウザ開くと普通に動くのですが、Extensionだと、送信ボタンを押しても何も動作しません...
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
Googleフォームの項目は「タイトル」「URL」「コメント」で、タイトル、URLに関してはページを開いた段階で自動取得し、コメントのみ入力をすれば自動的にフォームにタイトルとUrlが入った状態で回答に落としたいと思っています。
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
現状だと、送信ボタンを押しても何も動作しません...
|
14
6
|
|
15
7
|
|
16
8
|
|
@@ -68,7 +60,7 @@
|
|
68
60
|
|
69
61
|
<meta charset="UTF-8">
|
70
62
|
|
71
|
-
<script src="s
|
63
|
+
<script src="style.js" type="text/javascript"></script>
|
72
64
|
|
73
65
|
</head>
|
74
66
|
|
@@ -78,27 +70,27 @@
|
|
78
70
|
|
79
71
|
|
80
72
|
|
81
|
-
<form action="https://docs.google.com/forms/d/e/
|
73
|
+
<form action="https://docs.google.com/forms/d/e/XXXXXXXXXXXXXXX/formResponse" >
|
74
|
+
|
75
|
+
|
76
|
+
|
82
|
-
|
77
|
+
<p>タイトル:<br>
|
83
|
-
|
84
|
-
|
78
|
+
|
85
|
-
<
|
79
|
+
<input id="title" value=title name="entry.XXXX">
|
80
|
+
|
86
|
-
|
81
|
+
<p>URL:<br>
|
87
|
-
|
88
|
-
|
82
|
+
|
89
|
-
<
|
83
|
+
<input id="url" value=url name="entry.XXXXXXXX">
|
90
84
|
|
91
85
|
|
92
86
|
|
93
87
|
<p>コメント:<br>
|
94
88
|
|
95
|
-
<textarea name="
|
89
|
+
<textarea name="entry.XXXXXXXXXXX"" cols="30" rows="5" ></textarea></p>
|
96
|
-
|
97
|
-
|
98
|
-
|
90
|
+
|
91
|
+
|
92
|
+
|
99
|
-
<
|
93
|
+
<button type="submit" name="button" value="送信"></button>
|
100
|
-
|
101
|
-
|
102
94
|
|
103
95
|
</form>
|
104
96
|
|
@@ -112,10 +104,102 @@
|
|
112
104
|
|
113
105
|
|
114
106
|
|
115
|
-
});
|
116
|
-
|
117
|
-
};
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
```
|
107
|
+
```
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
### manifest.json
|
112
|
+
|
113
|
+
```
|
114
|
+
|
115
|
+
{
|
116
|
+
|
117
|
+
"manifest_version": 2,
|
118
|
+
|
119
|
+
"author": "XXXXXXXXXXXX",
|
120
|
+
|
121
|
+
"homepage_url": "http://example.com",
|
122
|
+
|
123
|
+
"name": "XXXXXXXXXXXXXXX ",
|
124
|
+
|
125
|
+
"description": " XXXXXXXXXXX",
|
126
|
+
|
127
|
+
"version": "1.0.12.3456",
|
128
|
+
|
129
|
+
"icons": {
|
130
|
+
|
131
|
+
"32": "icon_32.png",
|
132
|
+
|
133
|
+
"48": "icon_48.png",
|
134
|
+
|
135
|
+
"128": "icon_128.png"
|
136
|
+
|
137
|
+
},
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
"content_scripts": [{
|
146
|
+
|
147
|
+
"matches": ["<all_urls>"],
|
148
|
+
|
149
|
+
"js": ["style.js","jquery.min.js"]
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
}],
|
158
|
+
|
159
|
+
"background": {
|
160
|
+
|
161
|
+
"scripts": ["background.js"]
|
162
|
+
|
163
|
+
},
|
164
|
+
|
165
|
+
"browser_action": {
|
166
|
+
|
167
|
+
"default_icon": "icon_32.png",
|
168
|
+
|
169
|
+
"default_popup": "form.html",
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
"default_title": "XXXXXXXXX"
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
},
|
178
|
+
|
179
|
+
"permissions": [
|
180
|
+
|
181
|
+
"tabs",
|
182
|
+
|
183
|
+
"background",
|
184
|
+
|
185
|
+
"http://*/*",
|
186
|
+
|
187
|
+
"https://*/*",
|
188
|
+
|
189
|
+
"http://docs.google.com",
|
190
|
+
|
191
|
+
"https://docs.google.com",
|
192
|
+
|
193
|
+
"https://*.google.com"
|
194
|
+
|
195
|
+
]
|
196
|
+
|
197
|
+
}
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
```
|