[ Launch: log jacking ] 5061473 by enjalot
-
-
Save enjalot/5061473 to your computer and use it in GitHub Desktop.
log jacking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"description":"log jacking","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"util.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/56h5fSq.png"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = 5; | |
//console.log("hi", a); | |
var b = [1,2] | |
var c = [a].concat(b); | |
console.log(c); | |
console.log("hi", a); | |
//tributary.asdf("HI",a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof console !== "undefined") { | |
console.logJack = console.log; | |
//tributary.asdf = function() { | |
console.log = function() { | |
var trace = new Error().stack; | |
//console.log("TRACE", trace); | |
var match = trace.match(/Object\.eval \[as initialize\].*\<anonymous\>:([0-9]+)/) | |
var args; | |
if(match) { | |
//console.logJack("MATCH", match[1]); | |
args = ["line " + (+match[1]-1) + ":"].concat([].splice.call(arguments,0)) | |
} else { | |
args = arguments | |
} | |
console.logJack.apply(console,args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment