This repository has been archived by the owner on Nov 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Close #367
- Loading branch information
Showing
4 changed files
with
71 additions
and
52 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-US"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Flash Click-To-Play Demo</title> | ||
<meta name="og:title" content="Flash Click-To-Play"> | ||
<meta name="description" content="Provide a seamless user experience on sites requiring Adobe Flash."> | ||
<meta name="keywords" content="Misc, Flash"> | ||
<meta name="author" content="erikadoyle"> | ||
<link rel="stylesheet" href="https://edgeportal.blob.core.windows.net/media/demotemplate.css"/> | ||
<link rel="stylesheet" href="styles/demo.css"> | ||
<script> | ||
document.addEventListener("DOMContentLoaded", function() { | ||
var hasFlash = false; | ||
try { | ||
var objFlash = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); | ||
if (objFlash) { | ||
hasFlash = true; | ||
} | ||
} catch (e) { | ||
if (navigator.mimeTypes | ||
&& navigator.mimeTypes['application/x-shockwave-flash'] != undefined | ||
&& navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin) { | ||
hasFlash = true; | ||
} | ||
} | ||
|
||
if (hasFlash) { | ||
document.querySelector(".status").textContent = "Enabled"; | ||
document.querySelector(".getflash img").style.display = "none"; | ||
document.querySelector(".getflash label").style.display = "none"; | ||
document.querySelector(".flashbox embed").style.display = "block"; | ||
} | ||
}); | ||
</script> | ||
<meta charset="utf-8"> | ||
<title>Flash Click-To-Play Demo</title> | ||
<meta name="og:title" content="Flash Click-To-Play"> | ||
<meta name="description" content="Provide a seamless user experience on sites requiring Adobe Flash."> | ||
<meta name="keywords" content="Misc, Flash"> | ||
<meta name="author" content="erikadoyle"> | ||
<link rel="stylesheet" href="https://edgeportal.blob.core.windows.net/media/demotemplate.css"> | ||
<link rel="stylesheet" href="styles/demo.css"> | ||
</head> | ||
<body> | ||
<h1>Enabling Flash from Microsoft Edge</h1> | ||
<div class="flashbox"> | ||
<div>Flash: <span class="status">Not Enabled</span></div> | ||
<div class="getflash" onclick="window.open('http://get.adobe.com/flashplayer', '_blank')"> | ||
<label for="flashlink">Click the image to display the browser prompt to enable Flash.</label> | ||
<img id="flashlink" src="images/GetAdobeFlashPlayer_icon.png"/> | ||
</div> | ||
<embed src="https://helpx.adobe.com/content/dam/help/en/flash-player/assets/tree_grow_small.swf" type="application/x-shockwave-flash"> | ||
</div> | ||
<h1>Enabling Flash from Microsoft Edge</h1> | ||
<div class="flashbox"> | ||
<div>Flash: <span class="status">Not Enabled</span></div> | ||
<div class="getflash"> | ||
<label for="flashlink">Click the image to display the browser prompt to enable Flash.</label> | ||
<img id="flashlink" src="images/GetAdobeFlashPlayer_icon.png"/> | ||
</div> | ||
<embed src="https://helpx.adobe.com/content/dam/help/en/flash-player/assets/tree_grow_small.swf" type="application/x-shockwave-flash"> | ||
<script src="scripts/demo.js"></script> | ||
</div> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* global ActiveXObject */ | ||
|
||
(function () { | ||
'use strict'; | ||
|
||
document.querySelector('.getflash').addEventListener('click', function () { | ||
var otherWindow = window.open(); | ||
|
||
otherWindow.opener = null; | ||
otherWindow.location = 'https://get.adobe.com/flashplayer'; | ||
|
||
return false; | ||
}); | ||
|
||
document.addEventListener('DOMContentLoaded', function() { | ||
var hasFlash = false; | ||
|
||
try { | ||
var objFlash = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); | ||
if (objFlash) { | ||
hasFlash = true; | ||
} | ||
} catch (e) { | ||
if (navigator.mimeTypes && | ||
(typeof navigator.mimeTypes['application/x-shockwave-flash'] !== 'undefined') && | ||
navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin) { | ||
hasFlash = true; | ||
} | ||
} | ||
|
||
if (hasFlash) { | ||
document.querySelector('.status').textContent = 'Enabled'; | ||
document.querySelector('.getflash img').style.display = 'none'; | ||
document.querySelector('.getflash label').style.display = 'none'; | ||
document.querySelector('.flashbox embed').style.display = 'block'; | ||
} | ||
}); | ||
}()); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
body { | ||
margin: 1.5em; | ||
margin: 1.5em; | ||
} | ||
|
||
.flashbox { | ||
margin: 2em; | ||
margin: 2em; | ||
} | ||
|
||
.flashbox label { | ||
display: block; | ||
font-size: .8em; | ||
margin-top: 2em; | ||
display: block; | ||
font-size: .8em; | ||
margin-top: 2em; | ||
} | ||
|
||
.flashbox img { | ||
margin: 20px 0; | ||
margin: 20px 0; | ||
} | ||
|
||
.flashbox embed { | ||
display: none; | ||
height: 100px; | ||
margin: 20px 0; | ||
width: 300px; | ||
} | ||
display: none; | ||
height: 100px; | ||
margin: 20px 0; | ||
width: 300px; | ||
} |