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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user