Skip to content

Instantly share code, notes, and snippets.

@sgarrity
Created August 12, 2012 23:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgarrity/3335432 to your computer and use it in GitHub Desktop.
Save sgarrity/3335432 to your computer and use it in GitHub Desktop.
--- a.html 2012-08-12 20:42:21.431476584 -0300
+++ b.html 2012-08-12 20:42:29.513816581 -0300
@@ -17,16 +17,53 @@
require_once "{$config['file_root']}/includes/regions.php";
require_once "{$config['file_root']}/includes/email/prefs.php";
$form = new EmailPrefs();
+
+ if (isset($_GET['channel'])) {
+ $channel = $_GET['channel'];
+ if ($channel == 'fxaurora')
+ $channel = 'aurora';
+ }
+
@include_once "{$config['file_root']}/{$lang}/includes/header-portal-pages.inc.php";
?>
+
<div id="download-sidebar-contents" style="display: none;">
+
+<script type="text/javascript">
+<!--
+
+function popitup(url) {
+ newwindow=window.open(url,'name','height=500,width=500');
+ if (window.focus) {newwindow.focus()}
+ return false;
+}
+//-->
+</script>
+
+<div id="aurora-share">
+
+ <h3>
+ <img src="<?=$config['static_prefix']?>/img/covehead/download/aurora-share.png" alt=""> Share your love of Firefox Aurora:
+ </h3>
+
+ <a href="https://twitter.com/intent/user?screen_name=FirefoxAurora" onclick="return popitup('https://twitter.com/intent/user?screen_name=FirefoxAurora','twitter-follow'); return false;"><b>Follow @FirefoxAurora</b></a>
+
+ <a href="https://twitter.com/intent/tweet?url=http%3A%2F%2Fwww.mozilla.org%2Ffirefox%2Faurora%2F&amp;related=FirefoxAurora%2CFirefox" onclick="popitup('https://twitter.com/intent/tweet?url=http%3A%2F%2Fwww.mozilla.org%2Ffirefox%2Faurora%2F&amp;related=FirefoxAurora%2CFirefox','twitter-tweet'); return false;"><b>Tweet</b></a>
+
+</div>
+
<form action="/<?=$lang?>/newsletter/" method="post" id="newsletter-form">
<input type="hidden" name="mozilla-and-you" value="Y" />
<div id="form-column1">
+ <? if ($channel == 'aurora') { ?>
+ <h3>Get the latest Aurora news.</h3>
+ <p>Get the latest Firefox Aurora news in our monthly newsletter.</p>
+ <? } else { ?>
<h3>Monthly <em>Newsletter</em></h3>
<p>Want the latest tips and tricks delivered to your inbox? Sign up now!</p>
+ <? } ?>
</div>
<div id="form-column2">
<div class="field required email-field">
@@ -188,6 +225,10 @@
var lang = (get['lang']) ? get['lang'] : null;
var channel = (get['channel']) ? get['channel'] : null;
+if (channel == 'fxaurora') {
+ channel = 'aurora';
+}
+
var div = document.getElementById('download-message');
@@ -213,8 +254,11 @@
return;
}
-
+ if (channel == 'aurora') {
+ promotion_msg = '<p id="download-thanks">Thanks for downloading Firefox Aurora!';
+ } else {
promotion_msg = '<p id="download-thanks">Thanks for downloading Firefox! As a non-profit, we’re free to innovate on your behalf without any pressure to compromise. You’re going to love the difference.';
+ }
switch (os) {
case 'win' :
@@ -273,14 +317,20 @@
download_url += product + '&os=' + os + '&lang=' + lang;
if (typeof(channel != "undefined" && channel !== null)) {
- if (channel == 'fxaurora' || channel == 'aurora') {
+ if (channel == 'aurora') {
download_url = getDownloadURLForAuroraForLanguage(product, product_version, lang, os);
+ document.body.className += ' aurora';
}
}
// 4. display the download URL as a manual fall-back link
+ if (channel == 'aurora') {
+ var msg = '<div id="main-feature" class="main-feature-firefox main-feature-aurora">';
+ msg += '<h2>Welcome to the Future of Firefox.</em></h2>';
+ } else {
var msg = '<div id="main-feature" class="main-feature-firefox">';
msg += '<h2>Welcome to the only browser <em>that puts you first.</em></h2>';
+ }
// 5. display a promotional box with content based on the PRODUCT variable
msg += '</div>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment