This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jslint regexp: true, maxerr: 50, indent: 2 */ | |
(function (global) { | |
"use strict"; | |
function URLUtils(url, baseURL) { | |
var m = String(url).replace(/^\s+|\s+$/g, "").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/); | |
if (!m) { | |
throw new RangeError(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<script type="text/javascript"> | |
var addEvent = document.addEventListener ? | |
function(node, name, fn) { node.addEventListener(name, fn, false); } : | |
function(node, name, fn) { node.attachEvent('on' + name, fn); } | |
var begin = +new Date; | |
var log = []; | |
log.push('Event, Time: readyState, EOF'); | |
function logEvent(name) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<script> | |
(function(window, document, detector, timeout, scripts) { | |
var bootScript = $('script'); // bootScript is used in loadScript() | |
bootScript.setAttribute('onload', ';'); // old Safari will have a misleading ('onload' in bootScript) | |
if (typeof bootScript.onload !== 'function' || !detector()) { | |
alert('Browser not supported. No action'); // NOTE this alert pops-up twice on IE <= 8 - parsing restarts when charset is declared | |
return; | |
} |