Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function isPluginInstalled() {
if (! browser.msie && navigator.plugins) {
var pluginArray = navigator.plugins;
for (var i=0, len=pluginArray.length; i= 0) {
debug('isPluginInstalled() | yes');
return true;
}
}
debug('isPluginInstalled() | no');
return false;
}
else {
try {
var axo = new global.ActiveXObject(pluginInfo.prefix + '.' + pluginInfo.plugName); // jshint ignore:line
debug('isPluginInstalled() | yes');
return true;
else {
var children = element.children;
for (var i=0, len=children.length; i !== len; i++) {
if (children[i].name === 'streamId') {
children[i].value = stream.id;
break;
}
}
element.setStreamId(stream.id);
}
var newElement = document.getElementById(elementId);
newElement.onplaying = (element.onplaying) ? element.onplaying : function () {};
// On IE the event needs to be plugged manually.
if (browser.msie) {
addEvent(newElement, 'playing', newElement.onplaying);
newElement.onclick = (element.onclick) ? element.onclick : function() {};
newElement._TemOnClick = function(id) {
newElement.onclick({
srcElement: document.getElementById(id)
});
};
}
return newElement;
}
else {
return element;
}
};
function injectPlugin() {
debug('injectPlugin()');
pluginState = PLUGIN_STATES.INJECTING;
// Internet Explorer <= 10.
if (browser.msie && browserVersion <= 10) {
var frag = document.createDocumentFragment();
plugin = document.createElement('div');
plugin.innerHTML = '' +
'' +
'' +
'' +
'' +
(pluginOptions.getAllCams ? '' : '') +
'';
while (plugin.firstChild) {
frag.appendChild(plugin.firstChild);
}
$(document).ready(function () {
if (browser.msie) {
$('html').addClass('msie');
}
// Asynchronously load our main CSS file.
loadcss('/css/main.css');
loadcss('http://fonts.googleapis.com/css?family=Source+Sans+Pro:' +
'300,400,600,300italic|Source+Serif+Pro:400,600&subset=latin,latin-ext');
// Initialize our main view.
var mainView = self.view = new MainView({
el: document.body
});
// Render it.
mainView.render();
},{}],2:[function(require,module,exports){
var bowser = require('bowser').browser;
if (bowser.android || bowser.iphone || bowser.ipad || bowser.touchpad) {
var hash = window.location.hash;
window.location.href = '/mobile.html' + hash;
}
if (bowser.msie && parseFloat(bowser.version) < 10) {
window.location.href = '/unsupported.html';
}
},{"bowser":1}]},{},[2])
var bowser = require("bowser").browser;
if (bowser.android || bowser.iphone || bowser.ipad || bowser.touchpad) {
var hash = window.location.hash;
window.location.href = "/mobile.html" + hash;
}
if (bowser.msie && parseFloat(bowser.version) < 10) {
window.location.href = "/unsupported.html";
}