Skip to content

Commit

Permalink
Merge pull request #124 from dougma/FB-252
Browse files Browse the repository at this point in the history
Remove browser detection which broke on IE11
  • Loading branch information
taxilian committed Jan 27, 2014
2 parents 499b97b + 9ce4a22 commit d32faa7
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions examples/FBTestPlugin/switcher.html
Expand Up @@ -10,7 +10,6 @@
.hidden { display: none; } .hidden { display: none; }
#delay { width: 100px; border: none; } #delay { width: 100px; border: none; }
#counters span { margin-right: 80px; font-size: 120pt; } #counters span { margin-right: 80px; font-size: 120pt; }
#browserVersion { font-size: 18pt; color: #336699; }
</style> </style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
Expand All @@ -19,9 +18,6 @@
// Make sure the newest version of the plugin will be found. // Make sure the newest version of the plugin will be found.
navigator.plugins.refresh(false); navigator.plugins.refresh(false);
} }
var ua = $.browser;
var uaVersion = parseFloat(ua.version);
var browser = "";
var getUrlParameters = function() { var getUrlParameters = function() {
var map = {}; var map = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
Expand All @@ -33,23 +29,6 @@
var decode = function(str) { var decode = function(str) {
return unescape(str.replace(/\+/g, " ")); return unescape(str.replace(/\+/g, " "));
}; };
if (ua.mozilla) {
var r = RegExp(/(Firefox)\/([0-9.]+)/);
var matches = navigator.userAgent.match(r);
browser = matches[0].replace('/', ' ');
} else if (ua.webkit) {
var chrome = RegExp(/Chrome\/([0-9.]+)/);
var safari = RegExp(/Version\/([0-9.]+)/);
if (navigator.userAgent.match(chrome)) {
browser = "Chrome " + navigator.userAgent.match(chrome)[1];
} else {
browser = "Safari " + navigator.userAgent.match(safari)[1];
}
} else if (ua.msie) {
browser = "Internet Explorer " + ua.version;
} else {
browser = "Unknown";
}
var autoSwitch = false; var autoSwitch = false;
var nextSrc = "srcA"; var nextSrc = "srcA";
var updateDelay = function() { var updateDelay = function() {
Expand All @@ -62,7 +41,6 @@
$("#switch").trigger("click"); $("#switch").trigger("click");
}; };


$("#browserVersion").html(browser);
$("#pluginVersion").html("Plugin Version: " + plugin.pluginVersion); $("#pluginVersion").html("Plugin Version: " + plugin.pluginVersion);
$("#switch").click(function() { $("#switch").click(function() {
var elem = $(this); var elem = $(this);
Expand Down Expand Up @@ -109,7 +87,6 @@
</script> </script>
</head> </head>
<body> <body>
<div id="browserVersion"></div>
<iframe id="content" src=""></iframe> <iframe id="content" src=""></iframe>
<p id="pluginVersion"> <p id="pluginVersion">
<object type="application/x-fbtestplugin" id="plugin"></object> <object type="application/x-fbtestplugin" id="plugin"></object>
Expand Down

0 comments on commit d32faa7

Please sign in to comment.