{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/bedrock/pulls/comments/90342472","pull_request_review_id":10861016,"id":90342472,"diff_hunk":"@@ -0,0 +1,57 @@\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+(function($) {\n+    'use strict';\n+\n+    var $searchBar = $('#moz-search');\n+    var terms = $searchBar.data('terms').split(',');\n+    var displayTerm = $('.search-label-term');\n+\n+    function changeTerm() {\n+        var term = displayTerm.data('term') || 0;\n+        displayTerm.data('term', term === terms.length -1 ? 0 : term + 1).text(terms[term]).fadeIn(150).delay(3500).fadeOut(150, changeTerm);\n+    }\n+    changeTerm();\n+\n+    displayTerm.on('click', function() {\n+        $('input.gsc-input').val(displayTerm.text());\n+    });\n+\n+    // Activist search\n+    var cx = '014783244707853607354:bbpl3emdsii';\n+    var gcse = document.createElement('script');\n+    gcse.type = 'text/javascript';\n+    gcse.async = true;\n+    gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;\n+    var s = document.getElementsByTagName('script')[0];\n+    s.parentNode.insertBefore(gcse, s);\n+\n+    var setGTMSearch = function() {\n+        var element = window.google.search.cse.element.getElement('mozsearch');\n+        var query = element.getInputQuery();\n+\n+        // GTM\n+        window.dataLayer.push({\n+            'search-query': query,\n+            'event': 'gcs-search'\n+        });\n+    };\n+\n+    // Add event handlers\n+    var initMozSearch = function() {\n+        $('input.gsc-search-button' ).on('click', setGTMSearch);\n+        $('input.gsc-input').keyup(function(e) {\n+            if (e.keyCode === 13 || e.which === 13) { // Enter\n+                setGTMSearch();\n+            }\n+        });","path":"media/js/base/search-activist.js","position":49,"original_position":49,"commit_id":"61a10fdd71741c56b455b9a831be44e695174873","original_commit_id":"61a10fdd71741c56b455b9a831be44e695174873","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":"Not sure if it's supported/possible, but would be nice to have `Escape` close the modal.","created_at":"2016-11-30T22:22:20Z","updated_at":"2016-11-30T22:22:20Z","html_url":"https://github.com/mozilla/bedrock/pull/4498#discussion_r90342472","pull_request_url":"https://api.github.com/repos/mozilla/bedrock/pulls/4498","_links":{"self":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/comments/90342472"},"html":{"href":"https://github.com/mozilla/bedrock/pull/4498#discussion_r90342472"},"pull_request":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/4498"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/bedrock/pulls/4498","id":95734804,"html_url":"https://github.com/mozilla/bedrock/pull/4498","diff_url":"https://github.com/mozilla/bedrock/pull/4498.diff","patch_url":"https://github.com/mozilla/bedrock/pull/4498.patch","issue_url":"https://api.github.com/repos/mozilla/bedrock/issues/4498","number":4498,"state":"open","locked":false,"title":"[bug 1319244] test Activist cross-site search","user":{"login":"craigcook","id":205591,"avatar_url":"https://avatars.githubusercontent.com/u/205591?v=3","gravatar_id":"","url":"https://api.github.com/users/craigcook","html_url":"https://github.com/craigcook","followers_url":"https://api.github.com/users/craigcook/followers","following_url":"https://api.github.com/users/craigcook/following{/other_user}","gists_url":"https://api.github.com/users/craigcook/gists{/gist_id}","starred_url":"https://api.github.com/users/craigcook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigcook/subscriptions","organizations_url":"https://api.github.com/users/craigcook/orgs","repos_url":"https://api.github.com/users/craigcook/repos","events_url":"https://api.github.com/users/craigcook/events{/privacy}","received_events_url":"https://api.github.com/users/craigcook/received_events","type":"User","site_admin":false},"body":"## Description\r\nAdds a Google custom search box to a few pages:\r\n* /about\r\n* /about/manifesto\r\n* /foundation/*\r\n\r\nThis is the \"Activist\" search indexing sites mostly focused on advocacy, web education, internet health, etc.\r\n\r\nThe test will be English only and uses the switch `mozorg-search-activist`.\r\n\r\n## Bugzilla link\r\nhttps://bugzilla.mozilla.org/show_bug.cgi?id=1319244\r\n\r\n## Testing\r\nMostly visual, since we're doing some CSS hackery to customize the look of their search box. Also verify searching works as expected and doesn't throw JavaScript errors.\r\n\r\n\r\n","created_at":"2016-11-29T17:09:43Z","updated_at":"2016-11-30T22:30:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"92e6f607ed0561fa8f4c74117a1f4586ae88a2af","assignee":{"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},"assignees":[{"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}],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/bedrock/pulls/4498/commits","review_comments_url":"https://api.github.com/repos/mozilla/bedrock/pulls/4498/comments","review_comment_url":"https://api.github.com/repos/mozilla/bedrock/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/bedrock/issues/4498/comments","statuses_url":"https://api.github.com/repos/mozilla/bedrock/statuses/61a10fdd71741c56b455b9a831be44e695174873","head":{"label":"craigcook:bug-1319244-test-cross-site-search","ref":"bug-1319244-test-cross-site-search","sha":"61a10fdd71741c56b455b9a831be44e695174873","user":{"login":"craigcook","id":205591,"avatar_url":"https://avatars.githubusercontent.com/u/205591?v=3","gravatar_id":"","url":"https://api.github.com/users/craigcook","html_url":"https://github.com/craigcook","followers_url":"https://api.github.com/users/craigcook/followers","following_url":"https://api.github.com/users/craigcook/following{/other_user}","gists_url":"https://api.github.com/users/craigcook/gists{/gist_id}","starred_url":"https://api.github.com/users/craigcook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigcook/subscriptions","organizations_url":"https://api.github.com/users/craigcook/orgs","repos_url":"https://api.github.com/users/craigcook/repos","events_url":"https://api.github.com/users/craigcook/events{/privacy}","received_events_url":"https://api.github.com/users/craigcook/received_events","type":"User","site_admin":false},"repo":{"id":3607632,"name":"bedrock","full_name":"craigcook/bedrock","owner":{"login":"craigcook","id":205591,"avatar_url":"https://avatars.githubusercontent.com/u/205591?v=3","gravatar_id":"","url":"https://api.github.com/users/craigcook","html_url":"https://github.com/craigcook","followers_url":"https://api.github.com/users/craigcook/followers","following_url":"https://api.github.com/users/craigcook/following{/other_user}","gists_url":"https://api.github.com/users/craigcook/gists{/gist_id}","starred_url":"https://api.github.com/users/craigcook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigcook/subscriptions","organizations_url":"https://api.github.com/users/craigcook/orgs","repos_url":"https://api.github.com/users/craigcook/repos","events_url":"https://api.github.com/users/craigcook/events{/privacy}","received_events_url":"https://api.github.com/users/craigcook/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/craigcook/bedrock","description":"Making mozilla.org awesome, one pebble at a time","fork":true,"url":"https://api.github.com/repos/craigcook/bedrock","forks_url":"https://api.github.com/repos/craigcook/bedrock/forks","keys_url":"https://api.github.com/repos/craigcook/bedrock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/craigcook/bedrock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/craigcook/bedrock/teams","hooks_url":"https://api.github.com/repos/craigcook/bedrock/hooks","issue_events_url":"https://api.github.com/repos/craigcook/bedrock/issues/events{/number}","events_url":"https://api.github.com/repos/craigcook/bedrock/events","assignees_url":"https://api.github.com/repos/craigcook/bedrock/assignees{/user}","branches_url":"https://api.github.com/repos/craigcook/bedrock/branches{/branch}","tags_url":"https://api.github.com/repos/craigcook/bedrock/tags","blobs_url":"https://api.github.com/repos/craigcook/bedrock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/craigcook/bedrock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/craigcook/bedrock/git/refs{/sha}","trees_url":"https://api.github.com/repos/craigcook/bedrock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/craigcook/bedrock/statuses/{sha}","languages_url":"https://api.github.com/repos/craigcook/bedrock/languages","stargazers_url":"https://api.github.com/repos/craigcook/bedrock/stargazers","contributors_url":"https://api.github.com/repos/craigcook/bedrock/contributors","subscribers_url":"https://api.github.com/repos/craigcook/bedrock/subscribers","subscription_url":"https://api.github.com/repos/craigcook/bedrock/subscription","commits_url":"https://api.github.com/repos/craigcook/bedrock/commits{/sha}","git_commits_url":"https://api.github.com/repos/craigcook/bedrock/git/commits{/sha}","comments_url":"https://api.github.com/repos/craigcook/bedrock/comments{/number}","issue_comment_url":"https://api.github.com/repos/craigcook/bedrock/issues/comments{/number}","contents_url":"https://api.github.com/repos/craigcook/bedrock/contents/{+path}","compare_url":"https://api.github.com/repos/craigcook/bedrock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/craigcook/bedrock/merges","archive_url":"https://api.github.com/repos/craigcook/bedrock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/craigcook/bedrock/downloads","issues_url":"https://api.github.com/repos/craigcook/bedrock/issues{/number}","pulls_url":"https://api.github.com/repos/craigcook/bedrock/pulls{/number}","milestones_url":"https://api.github.com/repos/craigcook/bedrock/milestones{/number}","notifications_url":"https://api.github.com/repos/craigcook/bedrock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/craigcook/bedrock/labels{/name}","releases_url":"https://api.github.com/repos/craigcook/bedrock/releases{/id}","deployments_url":"https://api.github.com/repos/craigcook/bedrock/deployments","created_at":"2012-03-03T00:55:00Z","updated_at":"2015-05-07T20:07:30Z","pushed_at":"2016-11-30T21:41:07Z","git_url":"git://github.com/craigcook/bedrock.git","ssh_url":"git@github.com:craigcook/bedrock.git","clone_url":"https://github.com/craigcook/bedrock.git","svn_url":"https://github.com/craigcook/bedrock","homepage":"http://mozilla.org","size":371431,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"fba481fdcd2bbf980d075f3ac8b637fe36c3c200","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-11-30T05:18:35Z","pushed_at":"2016-11-30T21:56:21Z","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":403045,"stargazers_count":340,"watchers_count":340,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":450,"mirror_url":null,"open_issues_count":21,"forks":450,"open_issues":21,"watchers":340,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/4498"},"html":{"href":"https://github.com/mozilla/bedrock/pull/4498"},"issue":{"href":"https://api.github.com/repos/mozilla/bedrock/issues/4498"},"comments":{"href":"https://api.github.com/repos/mozilla/bedrock/issues/4498/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/4498/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/4498/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/bedrock/statuses/61a10fdd71741c56b455b9a831be44e695174873"}}}}
{"actor":{"display_login":"jpetto"}}