File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1616 function (xhr , el ) {
1717
1818 /* 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+ }
2124
2225 el .style .display = - 1 !== xhr .responseText .indexOf (' sf-toolbarreset' ) ? ' block' : ' none' ;
2326
3841 Sfjs .renderAjaxRequests ();
3942
4043 /* 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 ) {
4346 toolbarBlocks[i].onmouseover = function () {
4447 var toolbarInfo = this .querySelectorAll (' .sf-toolbar-info' )[0 ];
4548 var pageWidth = document .body .clientWidth ;
You can’t perform that action at this time.
0 commit comments