152 res.inputs.push([input.name, input.value]); |
152 res.inputs.push([input.name, input.value]); |
153 }} |
153 }} |
154 return res; |
154 return res; |
155 }})()""" |
155 }})()""" |
156 return source.format(pos.x(), pos.y()) |
156 return source.format(pos.x(), pos.y()) |
|
157 |
|
158 |
|
159 def getAllMetaAttributes(): |
|
160 """ |
|
161 Function generating a script to extract all meta attributes of a web page. |
|
162 |
|
163 @return script to extract meta attributes |
|
164 @rtype str |
|
165 """ |
|
166 source = """ |
|
167 (function() { |
|
168 var out = []; |
|
169 var meta = document.getElementsByTagName('meta'); |
|
170 for (var i = 0; i < meta.length; ++i) { |
|
171 var e = meta[i]; |
|
172 out.push({ |
|
173 name: e.getAttribute('name'), |
|
174 content: e.getAttribute('content'), |
|
175 httpequiv: e.getAttribute('http-equiv') |
|
176 }); |
|
177 } |
|
178 return out; |
|
179 })()""" |
|
180 return source |