diff --git a/includes/GlModelViewer.php b/includes/GlModelViewer.php index e1f257e..12910f3 100644 --- a/includes/GlModelViewer.php +++ b/includes/GlModelViewer.php @@ -22,4 +22,11 @@ class GlModelViewer extends ImageHandler { } } + public static function console_log($data, $add_script_tags = false) { + $command = 'console.log('. json_encode($data, JSON_HEX_TAG).');'; + if ($add_script_tags) { + $command = ''; + } + echo $command; + } } \ No newline at end of file