<commit_before><!doctype html>
<?php
  /*
  All Emoncms code is released under the GNU Affero General Public License.
  See COPYRIGHT.txt and LICENSE.txt.

  ---------------------------------------------------------------------
  Emoncms - open source energy visualisation
  Part of the OpenEnergyMonitor project:
  http://openenergymonitor.org
  */
  global $ltime,$path,$fullwidth,$menucollapses,$emoncms_version,$theme,$themecolor,$favicon,$menu;

  $v = 2;

?>
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Emoncms - <?php echo $route->controller.' '.$route->action.' '.$route->subaction; ?></title>
        <link rel="shortcut icon" href="<?php echo $path; ?>Theme/<?php echo $theme; ?>/<?php echo $favicon; ?>" />
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-startup-image" href="<?php echo $path; ?>Theme/<?php echo $theme; ?>/ios_load.png">
        <link rel="apple-touch-icon" href="<?php echo $path; ?>Theme/<?php echo $theme; ?>/logo_normal.png">
        <link href="<?php echo $path; ?>Lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
        <link href="<?php echo $path; ?>Lib/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">
        <script>window.onerror = function(event){alert(event)}</script>
        <?php if ($themecolor=="blue") { ?>
            <link href="<?php echo $path; ?>Theme/<?php echo $theme; ?>/emon-blue.css?v=<?php echo $v; ?>" rel="stylesheet">
        <?php } else if ($themecolor=="sun") { ?>
            <link href="<?php echo $path; ?>Theme/<?php echo $theme; ?>/emon-sun.css?v=<?php echo $v; ?>" rel="stylesheet">
        <?php } else { ?>
            <link href="<?php echo $path; ?>Theme/<?php echo $theme; ?>/emon-standard.css?v=<?php echo $v; ?>" rel="stylesheet">
        <?php } ?>

        <?php //compute dynamic @media properties depending on numbers and lengths of shortcuts
        $maxwidth1=1200;
        $maxwidth2=480;
        $maxwidth3=340;
        $sumlength1 = 0;
        $sumlength2 = 0;
        $sumlength3 = 0;<commit_msg>added more detail to the window.onerror event<commit_after><!doctype html>
<?php
  /*
  All Emoncms code is released under the GNU Affero General Public License.
  See COPYRIGHT.txt and LICENSE.txt.

  ---------------------------------------------------------------------
  Emoncms - open source energy visualisation
  Part of the OpenEnergyMonitor project:
  http://openenergymonitor.org
  */
  global $ltime,$path,$fullwidth,$menucollapses,$emoncms_version,$theme,$themecolor,$favicon,$menu;

  $v = 2;

?>
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Emoncms - <?php echo $route->controller.' '.$route->action.' '.$route->subaction; ?></title>
        <link rel="shortcut icon" href="<?php echo $path; ?>Theme/<?php echo $theme; ?>/<?php echo $favicon; ?>" />
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-startup-image" href="<?php echo $path; ?>Theme/<?php echo $theme; ?>/ios_load.png">
        <link rel="apple-touch-icon" href="<?php echo $path; ?>Theme/<?php echo $theme; ?>/logo_normal.png">
        <link href="<?php echo $path; ?>Lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
        <link href="<?php echo $path; ?>Lib/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">
        <script>
            window.onerror = function(msg, source, lineno, colno, error){
                var string = msg.toLowerCase();
                var substring = "script error";
                if (string.indexOf(substring) > -1){
                    alert('Script Error: See Browser Console for Detail');
                } else {
                    var messages = [
                        'EmonCMS Error',
                        '----------------------',
                        'Message: ' + msg,
                        // 'URL: ' + source,
                        'Line: ' + lineno,
                        'Column: ' + colno
                    ];
                    if(Object.keys(error).length > 0){
                        messages.push('Error object: ' + JSON.stringify(error))
                    }
                    alert(messages.join("\n"));
                }
                return true; // true == prevents the firing of the default event handler.
            }
        </script>
        <?php if ($themecolor=="blue") { ?>
            <link href="<?php echo $path; ?>Theme/<?php echo $theme; ?>/emon-blue.css?v=<?php echo $v; ?>" rel="stylesheet">
        <?php } else if ($themecolor=="sun") { ?>
            <link href="<?php echo $path; ?>Theme/<?php echo $theme; ?>/emon-sun.css?v=<?php echo $v; ?>" rel="stylesheet">
        <?php } else { ?>
            <link href="<?php echo $path; ?>Theme/<?php echo $theme; ?>/emon-standard.css?v=<?php echo $v; ?>" rel="stylesheet">
        <?php } ?>

        <?php //compute dynamic @media properties depending on numbers and lengths of shortcuts
        $maxwidth1=1200;
        $maxwidth2=480;
        $maxwidth3=340;
        $sumlength1 = 0;
        $sumlength2 = 0;
        $sumlength3 = 0;
{'fraction_non_alphanumeric': 0.19760696156635243, 'fraction_numerical': 0.00870195794053662, 'mean_word_length': 2.2625665286812535, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 0, '>': 97, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6234360', 'n_tokens_mistral': 1690, 'n_tokens_neox': 1620, 'n_words': 388}