{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/bedrock/pulls/comments/52445736","id":52445736,"diff_hunk":"@@ -0,0 +1,106 @@\n+/* This Source Code Form is subject to the terms of the Mozilla Public\n+ * License, v. 2.0. If a copy of the MPL was not distributed with this\n+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n+\n+// set up namespace\n+if (typeof Mozilla == 'undefined') {\n+    var Mozilla = {};\n+}\n+\n+Mozilla.Firefox = window.Mozilla.Firefox || {};\n+\n+;(function($, dataLayer, MFNew) {\n+    'use strict';\n+\n+    var $html = $(document.documentElement);\n+    var $document = $(document);\n+    var scene2URL = '/' + MFNew.locale + '/firefox/new/?scene=2&v=2';\n+    var state; // track page state\n+\n+    var uiTourSendEvent = function(action, data) {\n+        var event = new CustomEvent('mozUITour', {\n+            bubbles: true,\n+            detail: {\n+                action: action,\n+                data: data || {}\n+            }\n+        });\n+\n+        document.dispatchEvent(event);\n+    };\n+\n+    if (MFNew.client.isFirefoxDesktop || MFNew.client.isFirefoxAndroid) {\n+        // Detect whether the Firefox is up-to-date in a non-strict way. The minor version and channel are not\n+        // considered. This can/should be strict, once the UX especially for ESR users is decided. (Bug 939470)\n+        if (MFNew.client._isFirefoxUpToDate(false)) {\n+            // the firefox-latest class prevents the download from triggering\n+            // and scene 2 from showing, which we want if the user lands on\n+            // /firefox/new/ but if the user visits /firefox/new/?scene=2#download-fx\n+            // (from a download button) then we want them to see the same scene 2\n+            // as non-firefox users and initiate a download\n+            $html.addClass('firefox-latest');\n+\n+            // if user is on desktop release channel and has latest version, offer refresh button\n+            if (MFNew.client.isFirefoxDesktop) {\n+                MFNew.client.getFirefoxDetails(function(data) {\n+                    if (data.channel === 'release' && data.isUpToDate) {\n+                        $html.addClass('show-refresh');\n+\n+                        // DOM may not be ready yet, so bind filtered click handler to document\n+                        $document.on('click', '#refresh-firefox', function() {\n+                            uiTourSendEvent('resetFirefox');\n+                        });\n+                    }\n+                });\n+            }\n+        } else {\n+            $html.addClass('firefox-old');\n+        }\n+    }\n+\n+    // Add GA custom tracking and external link tracking\n+    state = 'Desktop, not Firefox';\n+\n+    if (MFNew.client.platform === 'android') {\n+        if ($html.hasClass('firefox-latest')) {\n+            state = 'Android, Firefox up-to-date';\n+        } else if ($html.hasClass('firefox-old')) {\n+            state = 'Android, Firefox not up-to-date';\n+        } else {\n+            state = 'Android, not Firefox';\n+        }\n+    } else if (MFNew.client.platform === 'ios') {\n+        state = 'iOS';\n+    } else if (MFNew.client.platform === 'fxos') {\n+        state = 'FxOS';\n+    } else {\n+        if ($html.hasClass('firefox-latest')) {\n+            state = 'Desktop, Firefox up-to-date';\n+        } else if ($html.hasClass('firefox-old')) {\n+            state = 'Desktop, Firefox not up-to-date';\n+        }\n+    }\n+\n+    //GA Custom Dimension in Pageview\n+    window.dataLayer.push({\n+        'event': 'set-state',\n+        'state': state\n+    });\n+\n+    // point download links to new version of scene 2\n+    $('.download-link').attr('href', scene2URL);","path":"media/js/firefox/new/scene1.js","position":91,"original_position":91,"commit_id":"21b8b735a1dd3ba2bff721bf99cd034930589614","original_commit_id":"21b8b735a1dd3ba2bff721bf99cd034930589614","user":{"login":"alexgibson","id":400117,"avatar_url":"https://avatars.githubusercontent.com/u/400117?v=3","gravatar_id":"","url":"https://api.github.com/users/alexgibson","html_url":"https://github.com/alexgibson","followers_url":"https://api.github.com/users/alexgibson/followers","following_url":"https://api.github.com/users/alexgibson/following{/other_user}","gists_url":"https://api.github.com/users/alexgibson/gists{/gist_id}","starred_url":"https://api.github.com/users/alexgibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexgibson/subscriptions","organizations_url":"https://api.github.com/users/alexgibson/orgs","repos_url":"https://api.github.com/users/alexgibson/repos","events_url":"https://api.github.com/users/alexgibson/events{/privacy}","received_events_url":"https://api.github.com/users/alexgibson/received_events","type":"User","site_admin":false},"body":"This is over-writing all download button URL's, including iOS and Android buttons that should link directly to the app stores. Do we need to re-introduce the concept of platforms that are eligible for scene 2?","created_at":"2016-02-10T11:31:11Z","updated_at":"2016-02-10T11:31:11Z","html_url":"https://github.com/mozilla/bedrock/pull/3837#discussion_r52445736","pull_request_url":"https://api.github.com/repos/mozilla/bedrock/pulls/3837","_links":{"self":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/comments/52445736"},"html":{"href":"https://github.com/mozilla/bedrock/pull/3837#discussion_r52445736"},"pull_request":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/3837"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/bedrock/pulls/3837","id":58573575,"html_url":"https://github.com/mozilla/bedrock/pull/3837","diff_url":"https://github.com/mozilla/bedrock/pull/3837.diff","patch_url":"https://github.com/mozilla/bedrock/pull/3837.patch","issue_url":"https://api.github.com/repos/mozilla/bedrock/issues/3837","number":3837,"state":"open","locked":false,"title":"[fix bug 1245148] Split /firefox/new/ into 2 templates.","user":{"login":"jpetto","id":317532,"avatar_url":"https://avatars.githubusercontent.com/u/317532?v=3","gravatar_id":"","url":"https://api.github.com/users/jpetto","html_url":"https://github.com/jpetto","followers_url":"https://api.github.com/users/jpetto/followers","following_url":"https://api.github.com/users/jpetto/following{/other_user}","gists_url":"https://api.github.com/users/jpetto/gists{/gist_id}","starred_url":"https://api.github.com/users/jpetto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpetto/subscriptions","organizations_url":"https://api.github.com/users/jpetto/orgs","repos_url":"https://api.github.com/users/jpetto/repos","events_url":"https://api.github.com/users/jpetto/events{/privacy}","received_events_url":"https://api.github.com/users/jpetto/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-08T06:00:04Z","updated_at":"2016-02-10T11:31:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"128c7ecc4d94c1c691b39566809bb4a998754cb4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/bedrock/pulls/3837/commits","review_comments_url":"https://api.github.com/repos/mozilla/bedrock/pulls/3837/comments","review_comment_url":"https://api.github.com/repos/mozilla/bedrock/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/bedrock/issues/3837/comments","statuses_url":"https://api.github.com/repos/mozilla/bedrock/statuses/21b8b735a1dd3ba2bff721bf99cd034930589614","head":{"label":"jpetto:bug-1245148-firefox-new-split-scenes","ref":"bug-1245148-firefox-new-split-scenes","sha":"21b8b735a1dd3ba2bff721bf99cd034930589614","user":{"login":"jpetto","id":317532,"avatar_url":"https://avatars.githubusercontent.com/u/317532?v=3","gravatar_id":"","url":"https://api.github.com/users/jpetto","html_url":"https://github.com/jpetto","followers_url":"https://api.github.com/users/jpetto/followers","following_url":"https://api.github.com/users/jpetto/following{/other_user}","gists_url":"https://api.github.com/users/jpetto/gists{/gist_id}","starred_url":"https://api.github.com/users/jpetto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpetto/subscriptions","organizations_url":"https://api.github.com/users/jpetto/orgs","repos_url":"https://api.github.com/users/jpetto/repos","events_url":"https://api.github.com/users/jpetto/events{/privacy}","received_events_url":"https://api.github.com/users/jpetto/received_events","type":"User","site_admin":false},"repo":{"id":3984574,"name":"bedrock","full_name":"jpetto/bedrock","owner":{"login":"jpetto","id":317532,"avatar_url":"https://avatars.githubusercontent.com/u/317532?v=3","gravatar_id":"","url":"https://api.github.com/users/jpetto","html_url":"https://github.com/jpetto","followers_url":"https://api.github.com/users/jpetto/followers","following_url":"https://api.github.com/users/jpetto/following{/other_user}","gists_url":"https://api.github.com/users/jpetto/gists{/gist_id}","starred_url":"https://api.github.com/users/jpetto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpetto/subscriptions","organizations_url":"https://api.github.com/users/jpetto/orgs","repos_url":"https://api.github.com/users/jpetto/repos","events_url":"https://api.github.com/users/jpetto/events{/privacy}","received_events_url":"https://api.github.com/users/jpetto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jpetto/bedrock","description":"Making mozilla.org awesome, one pebble at a time","fork":true,"url":"https://api.github.com/repos/jpetto/bedrock","forks_url":"https://api.github.com/repos/jpetto/bedrock/forks","keys_url":"https://api.github.com/repos/jpetto/bedrock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jpetto/bedrock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jpetto/bedrock/teams","hooks_url":"https://api.github.com/repos/jpetto/bedrock/hooks","issue_events_url":"https://api.github.com/repos/jpetto/bedrock/issues/events{/number}","events_url":"https://api.github.com/repos/jpetto/bedrock/events","assignees_url":"https://api.github.com/repos/jpetto/bedrock/assignees{/user}","branches_url":"https://api.github.com/repos/jpetto/bedrock/branches{/branch}","tags_url":"https://api.github.com/repos/jpetto/bedrock/tags","blobs_url":"https://api.github.com/repos/jpetto/bedrock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jpetto/bedrock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jpetto/bedrock/git/refs{/sha}","trees_url":"https://api.github.com/repos/jpetto/bedrock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jpetto/bedrock/statuses/{sha}","languages_url":"https://api.github.com/repos/jpetto/bedrock/languages","stargazers_url":"https://api.github.com/repos/jpetto/bedrock/stargazers","contributors_url":"https://api.github.com/repos/jpetto/bedrock/contributors","subscribers_url":"https://api.github.com/repos/jpetto/bedrock/subscribers","subscription_url":"https://api.github.com/repos/jpetto/bedrock/subscription","commits_url":"https://api.github.com/repos/jpetto/bedrock/commits{/sha}","git_commits_url":"https://api.github.com/repos/jpetto/bedrock/git/commits{/sha}","comments_url":"https://api.github.com/repos/jpetto/bedrock/comments{/number}","issue_comment_url":"https://api.github.com/repos/jpetto/bedrock/issues/comments{/number}","contents_url":"https://api.github.com/repos/jpetto/bedrock/contents/{+path}","compare_url":"https://api.github.com/repos/jpetto/bedrock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jpetto/bedrock/merges","archive_url":"https://api.github.com/repos/jpetto/bedrock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jpetto/bedrock/downloads","issues_url":"https://api.github.com/repos/jpetto/bedrock/issues{/number}","pulls_url":"https://api.github.com/repos/jpetto/bedrock/pulls{/number}","milestones_url":"https://api.github.com/repos/jpetto/bedrock/milestones{/number}","notifications_url":"https://api.github.com/repos/jpetto/bedrock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jpetto/bedrock/labels{/name}","releases_url":"https://api.github.com/repos/jpetto/bedrock/releases{/id}","deployments_url":"https://api.github.com/repos/jpetto/bedrock/deployments","created_at":"2012-04-10T16:43:41Z","updated_at":"2015-03-12T13:14:18Z","pushed_at":"2016-02-09T20:34:00Z","git_url":"git://github.com/jpetto/bedrock.git","ssh_url":"git@github.com:jpetto/bedrock.git","clone_url":"https://github.com/jpetto/bedrock.git","svn_url":"https://github.com/jpetto/bedrock","homepage":"http://mozilla.org","size":350287,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"e350b454b8df634dc4f560dcf7108749370ffad1","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":1616665,"name":"bedrock","full_name":"mozilla/bedrock","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/bedrock","description":"Making mozilla.org awesome, one pebble at a time","fork":false,"url":"https://api.github.com/repos/mozilla/bedrock","forks_url":"https://api.github.com/repos/mozilla/bedrock/forks","keys_url":"https://api.github.com/repos/mozilla/bedrock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/bedrock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/bedrock/teams","hooks_url":"https://api.github.com/repos/mozilla/bedrock/hooks","issue_events_url":"https://api.github.com/repos/mozilla/bedrock/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/bedrock/events","assignees_url":"https://api.github.com/repos/mozilla/bedrock/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/bedrock/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/bedrock/tags","blobs_url":"https://api.github.com/repos/mozilla/bedrock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/bedrock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/bedrock/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/bedrock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/bedrock/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/bedrock/languages","stargazers_url":"https://api.github.com/repos/mozilla/bedrock/stargazers","contributors_url":"https://api.github.com/repos/mozilla/bedrock/contributors","subscribers_url":"https://api.github.com/repos/mozilla/bedrock/subscribers","subscription_url":"https://api.github.com/repos/mozilla/bedrock/subscription","commits_url":"https://api.github.com/repos/mozilla/bedrock/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/bedrock/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/bedrock/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/bedrock/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/bedrock/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/bedrock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/bedrock/merges","archive_url":"https://api.github.com/repos/mozilla/bedrock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/bedrock/downloads","issues_url":"https://api.github.com/repos/mozilla/bedrock/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/bedrock/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/bedrock/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/bedrock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/bedrock/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/bedrock/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/bedrock/deployments","created_at":"2011-04-14T22:57:57Z","updated_at":"2016-02-05T15:37:21Z","pushed_at":"2016-02-10T11:14:36Z","git_url":"git://github.com/mozilla/bedrock.git","ssh_url":"git@github.com:mozilla/bedrock.git","clone_url":"https://github.com/mozilla/bedrock.git","svn_url":"https://github.com/mozilla/bedrock","homepage":"https://www.mozilla.org","size":440586,"stargazers_count":286,"watchers_count":286,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":401,"mirror_url":null,"open_issues_count":21,"forks":401,"open_issues":21,"watchers":286,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/3837"},"html":{"href":"https://github.com/mozilla/bedrock/pull/3837"},"issue":{"href":"https://api.github.com/repos/mozilla/bedrock/issues/3837"},"comments":{"href":"https://api.github.com/repos/mozilla/bedrock/issues/3837/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/3837/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/3837/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/bedrock/statuses/21b8b735a1dd3ba2bff721bf99cd034930589614"}}}}