10 years later #1
6 changed files with 10 additions and 7 deletions
|
|
@ -3,8 +3,9 @@ function setup () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
console.info('\n', hippie.brand, '\n\n');
|
console.info('\n', hippie.brand, '\n\n');
|
||||||
|
console.info('Document information:\n', 'HTML:', hippie.screen, '\n', 'BODY:', hippie.body);
|
||||||
if (debugOn) {
|
if (debugOn) {
|
||||||
console.info('Debug information:\n', 'HTML:', hippie.screen, 'BODY:', hippie.body);
|
console.debug('Debug information:\n', 'HIPPIE:', hippie);
|
||||||
}
|
}
|
||||||
|
|
||||||
// WANNABE MODULE Mouse over effect
|
// WANNABE MODULE Mouse over effect
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
// Page specific
|
// Page specific
|
||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
assetsLoaded = true;
|
assetsLoaded = true;
|
||||||
logPerf('SCRIPT assets loaded.');
|
logPerf('Assets loaded.', assetsLoaded);
|
||||||
$( document ).ready(function () {
|
$( document ).ready(function () {
|
||||||
logPerf('JQ document \'ready\' event fired.');
|
logPerf('JQ document \'ready\' event fired.');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -575,7 +575,7 @@
|
||||||
// Page specific
|
// Page specific
|
||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
assetsLoaded = true;
|
assetsLoaded = true;
|
||||||
logPerf('Assets loaded.');
|
logPerf('Assets loaded.', assetsLoaded);
|
||||||
// Create instance of object made by contructor function
|
// Create instance of object made by contructor function
|
||||||
var scrollUi = new HippieScroll($('.js_scrolltop'), $('.js_scrolldown'));
|
var scrollUi = new HippieScroll($('.js_scrolltop'), $('.js_scrolldown'));
|
||||||
var helpUi = new HippieMeta($('.js_showmeta'), $('.js_pop'));
|
var helpUi = new HippieMeta($('.js_showmeta'), $('.js_pop'));
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
{% include "hippie/partials/_head_script.njk" %}
|
{% include "hippie/partials/_head_script.njk" %}
|
||||||
<script>
|
<script>
|
||||||
debugOn = true;
|
debugOn = true;
|
||||||
|
logPerf('Debugging performance', debugOn);
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
logPerf('Document \'DOMContentLoaded\' event fired.');
|
logPerf('Document \'DOMContentLoaded\' event fired.');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@
|
||||||
{% include "hippie/partials/_head_script.njk" %}
|
{% include "hippie/partials/_head_script.njk" %}
|
||||||
<script>
|
<script>
|
||||||
debugOn = true;
|
debugOn = true;
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
logPerf('Debugging performance', debugOn);
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
logPerf('Document \'DOMContentLoaded\' event fired.');
|
logPerf('Document \'DOMContentLoaded\' event fired.');
|
||||||
});
|
});
|
||||||
logPerf('On HEAD, starting...');
|
logPerf('On HEAD, starting...');
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ function getTimeDiff () {
|
||||||
|
|
||||||
// log message to console and add
|
// log message to console and add
|
||||||
// performance measuring information
|
// performance measuring information
|
||||||
function logPerf (msg) {
|
function logPerf (msg, arg) {
|
||||||
if (debugOn) {
|
if (debugOn) {
|
||||||
if (debugOnScreen && assetsLoaded) {
|
if (debugOnScreen && assetsLoaded) {
|
||||||
if (!$('#jsLogPerf').length) {
|
if (!$('#jsLogPerf').length) {
|
||||||
|
|
@ -29,7 +29,7 @@ function logPerf (msg) {
|
||||||
padding: '0 8px',
|
padding: '0 8px',
|
||||||
background: 'rgba(255,255,255,.8)',
|
background: 'rgba(255,255,255,.8)',
|
||||||
color: 'rgb(128)',
|
color: 'rgb(128)',
|
||||||
fontSize: '12px'
|
fontSize: '1rem'
|
||||||
})
|
})
|
||||||
.end()
|
.end()
|
||||||
.prependTo('body');
|
.prependTo('body');
|
||||||
|
|
@ -43,7 +43,7 @@ function logPerf (msg) {
|
||||||
// $log.append('<p style="margin-bottom:4px;font-size:.75em;"><b>' + getTimeDiff() + '</b>ms :: ' + msg);
|
// $log.append('<p style="margin-bottom:4px;font-size:.75em;"><b>' + getTimeDiff() + '</b>ms :: ' + msg);
|
||||||
}
|
}
|
||||||
if (window.console) {
|
if (window.console) {
|
||||||
console.log(getTimeDiff() + 'ms :: ' + msg);
|
console.debug(getTimeDiff() + 'ms :: ' + msg, (arg ? arg : ''));
|
||||||
// NOTE Non standard feature. Not available on IE
|
// NOTE Non standard feature. Not available on IE
|
||||||
if (console.timeStamp) {
|
if (console.timeStamp) {
|
||||||
console.timeStamp(msg);
|
console.timeStamp(msg);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue