Fixed Flash detection on IE11, thanks @badbob as this was originally part of his pull request which I haven't merged earlier ;-)

This commit is contained in:
antisnatchor
2015-12-10 15:00:02 +01:00
parent 2999142247
commit e4afd12a9b

View File

@@ -1883,17 +1883,21 @@ beef.browser = {
flash_versions = 12;
flash_installed = false;
if (window.ActiveXObject) {
for (x = 2; x <= flash_versions; x++) {
try {
Flash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + x + "');");
if (Flash) {
flash_installed = true;
if (this.type().IE11) {
flash_installed = (navigator.plugins["Shockwave Flash"] != undefined);
} else {
if (window.ActiveXObject != null) {
for (x = 2; x <= flash_versions; x++) {
try {
Flash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + x + "');");
if (Flash) {
flash_installed = true;
}
} catch (e) {
beef.debug("Creating Flash ActiveX object failed: " + e.message);
}
}
catch (e) {
beef.debug("Creating Flash ActiveX object failed: " + e.message);
}
}
}
return flash_installed;