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
var rnd = Math.floor(Math.random()*10000000000); | |
var myVar = "myString" + "_" + rnd; | |
window[ myVar + "_optionalID"] = new classname(); |
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
var youTubeID; | |
var videoURL = "http://youtube.com/v/youtubeid" | |
if ( isYoutubeFile( videoURL ) == true ) { | |
//do something | |
} | |
function isYoutubeFile(vidURL) { | |
//console.log( "javascript: isYoutubeFile: vidURL: " +vidURL ); | |
var videoURL; |
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
var numLoaded=0; | |
var minimumToLoad=1; | |
function loadScript( file, type, title ) { | |
//console.log( "javascript: " + "loadScript: " + file ); | |
if ( type == 'js' ){ | |
var script = document.createElement( 'script' ); | |
script.type = 'text/javascript'; | |
script.src = file; | |
if (script.readyState){ |
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
var ua = navigator.userAgent; | |
var isIE = ua.indexOf("MSIE") != -1; | |
var ieVersion; | |
var mode = document.documentMode || | |
((/back/i).test(document.compatMode || "") ? 5 : ieVersion) || | |
((/MSIE\s*(\d+\.?\d*)/i).test(navigator.userAgent || "") ? parseFloat(RegExp.$1, 10) : null); | |
function getIEVersion(dataString) { | |
var index = dataString.indexOf("MSIE"); | |
if (index == -1) return; | |
return parseFloat(dataString.substring(index+5)); |
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
var alertFallback = true; | |
if ( typeof console === "undefined" || typeof console.log === "undefined" ) { | |
console = {}; | |
if (alertFallback) { | |
console.log = function(msg) { | |
alert(msg); | |
}; | |
} else { | |
console.log = function() {}; | |
} |
NewerOlder