Skip to content

Instantly share code, notes, and snippets.

@markknol
Last active January 25, 2018 22:18
Show Gist options
  • Save markknol/f675edfd2e4c383fd5ef to your computer and use it in GitHub Desktop.
Save markknol/f675edfd2e4c383fd5ef to your computer and use it in GitHub Desktop.
Console Log Viewer for haxe development
class Main {
static function main() {
addConsoleLogViewer();
}
public static inline function addConsoleLogViewer(align = "bottom", minimized = true, totalItems = 45) {
#if consolelogviewer
var script = js.Browser.document.createScriptElement();
script.type = "text/javascript";
script.src = 'https://markknol.github.io/console-log-viewer/console-log-viewer.js?align=$align&minimized=$minimized';
js.Browser.document.body.appendChild(script);
// oh well
haxe.Timer.delay(function() ConsoleLogViewer.TOTAL = totalItems, 100);
#end
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment