middleman/middleman-cli/lib/middleman-templates/html5/source/js/plugins.js

25 lines
733 B
JavaScript
Raw Normal View History

2012-09-04 18:48:52 +02:00
// Avoid `console` errors in browsers that lack a console.
2014-04-12 21:17:38 +02:00
(function() {
var method;
var noop = function () {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
'timeStamp', 'trace', 'warn'
];
var length = methods.length;
var console = (window.console = window.console || {});
while (length--) {
method = methods[length];
// Only stub undefined methods.
if (!console[method]) {
console[method] = noop;
2012-09-04 18:48:52 +02:00
}
2014-04-12 21:17:38 +02:00
}
}());
2012-09-04 18:48:52 +02:00
// Place any jQuery/helper plugins in here.