File tree 1 file changed +7
-4
lines changed
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 16
16
function (xhr , el ) {
17
17
18
18
/* Evaluate embedded scripts inside the toolbar */
19
- var rx= / <script>(. *? )<\/ script>/ g , s;
20
- while (s = rx .exec (el .innerHTML )) {eval (s[1 ]);};
19
+ var i, scripts = [].slice .call (el .querySelectorAll (' script' ));
20
+
21
+ for (i = 0 ; i < scripts .length ; ++ i) {
22
+ eval (scripts[i].firstChild .nodeValue );
23
+ }
21
24
22
25
el .style .display = - 1 !== xhr .responseText .indexOf (' sf-toolbarreset' ) ? ' block' : ' none' ;
23
26
38
41
Sfjs .renderAjaxRequests ();
39
42
40
43
/* Handle toolbar-info position */
41
- var toolbarBlocks = document . querySelectorAll (' .sf-toolbar-block' );
42
- for (var i = 0 ; i < toolbarBlocks .length ; i += 1 ) {
44
+ var toolbarBlocks = []. slice . call ( el . querySelectorAll (' .sf-toolbar-block' ) );
45
+ for (i = 0 ; i < toolbarBlocks .length ; ++ i ) {
43
46
toolbarBlocks[i].onmouseover = function () {
44
47
var toolbarInfo = this .querySelectorAll (' .sf-toolbar-info' )[0 ];
45
48
var pageWidth = document .body .clientWidth ;
You can’t perform that action at this time.
0 commit comments