Skip to content

Instantly share code, notes, and snippets.

@peterjaap
Forked from astorm/gist:992233
Last active July 16, 2017 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save peterjaap/5309852 to your computer and use it in GitHub Desktop.
Save peterjaap/5309852 to your computer and use it in GitHub Desktop.
Fix Magento console in Chrome
<!-- Add to the package layout (via local.xml or however you prefer) -->
<!-- Also, best to remove before deployment, as some users report -->
<!-- it makes IE 7 crash -->
<default>
<reference name="content">
<block type="core/text" name="fix.console" as="fix.console">
<action method="setText">
<text><![CDATA[<script type="text/javascript">
iframe = document.createElement('iframe');
iframe.style.display = 'none';
document.getElementsByTagName('body')[0].appendChild(iframe);
window.console = iframe.contentWindow.console;
console.firebug = "faketrue";
</script>]]></text>
</action>
</block>
</reference>
</default>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment