mirror of
https://github.com/jsbin/jsbin.git
synced 2026-02-01 16:46:05 +00:00
Changed the internal console detection /not/ look for the string function name (since compressed functions don't match! Doh) - so we're using some object detection goodness.
This commit is contained in:
parent
6a4492e1be
commit
6a5a0353a4
@ -15,7 +15,9 @@ ConsoleContext.prototype = {
|
||||
hijack: function (method, args) {
|
||||
var context = this.executable ? this.context() : this.context;
|
||||
var re = new RegExp('console\.' + method + '\\((.*?)\\)');
|
||||
if (!/renderLivePreview/.test(arguments.callee.caller.caller.toString()) && context) {
|
||||
|
||||
// if the log was triggered via a jQuery.Event then it came from /within/ the preview
|
||||
if (!(arguments.callee.caller.caller.arguments[0] instanceof jQuery.Event) && context) {
|
||||
context.eval('console.' + method + '(' + arguments.callee.caller.caller.arguments[0].toString().match(re)[1] + ')');
|
||||
} else {
|
||||
this.original[method].apply(this.original, args);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user