{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/comments/177204339","pull_request_review_id":107037799,"id":177204339,"diff_hunk":"@@ -5,277 +5,321 @@\n \n \"use strict\";\n \n-var DEBUG_ENABLED = false;\n-var MATCH_HIGHLIGHT_ACTIVE = \"#f19750\";\n-var MATCH_HIGHLIGHT_INACTIVE = \"#ffde49\";\n-var SCROLL_INTERVAL_INCREMENT = 5;\n-var SCROLL_INTERVAL_DURATION = 400;\n-var SCROLL_OFFSET = 60;\n-\n-var activeHighlightSpan = null;\n-var lastSearch;\n-var scrollInterval;\n-var activeIndex = 0;\n-var highlightSpans = [];\n-\n-function debug(str) {\n-  if (DEBUG_ENABLED) {\n-    console.log(\"FindInPage: \" + str);\n-  }\n-}\n-\n-function isElementVisible(elem) {\n-  return getComputedStyle(elem).visibility !== \"hidden\";\n-}\n-\n-function isRectInViewport(rect) {\n-  var left = rect.left + document.body.scrollLeft;\n-  var right = rect.right + document.body.scrollLeft;\n-  var top = rect.top + document.body.scrollTop;\n-  var bottom = rect.bottom + document.body.scrollTop;\n-\n-  return rect.width > 0 &&\n-         rect.height > 0 &&\n-         right >= 0 &&\n-         bottom >= 0 &&\n-         left <= document.body.scrollWidth &&\n-         top <= document.body.scrollHeight;\n+const MAXIMUM_HIGHLIGHT_COUNT = 500;\n+const SCROLL_OFFSET_Y = 40;\n+\n+const HIGHLIGHT_CLASS_NAME = \"__firefox__find-highlight\";\n+const HIGHLIGHT_CLASS_NAME_ACTIVE = \"__firefox__find-highlight-active\";\n+\n+const HIGHLIGHT_COLOR = \"#ffde49\";\n+const HIGHLIGHT_COLOR_ACTIVE = \"#f19750\";\n+\n+const HIGHLIGHT_CSS =\n+`.${HIGHLIGHT_CLASS_NAME} {\n+  color: #000;\n+  background-color: ${HIGHLIGHT_COLOR};\n+  border-radius: 1px;\n+  box-shadow: 0 0 0 2px ${HIGHLIGHT_COLOR};\n+  transition: all 100ms ease;\n }\n+.${HIGHLIGHT_CLASS_NAME}.${HIGHLIGHT_CLASS_NAME_ACTIVE} {\n+  background-color: ${HIGHLIGHT_COLOR_ACTIVE};\n+  box-shadow: 0 0 0 3px ${HIGHLIGHT_COLOR_ACTIVE},0 1px 3px 3px rgba(0,0,0,.75);\n+}`;\n+\n+var lastEscapedQuery = \"\";\n+var lastFindOperation = null;\n+var lastReplacements = null;\n+var lastHighlights = null;\n+var activeHighlightIndex = -1;\n+\n+var highlightSpan = document.createElement(\"span\");\n+highlightSpan.className = HIGHLIGHT_CLASS_NAME;\n+\n+var styleElement = document.createElement(\"style\");\n+styleElement.innerHTML = HIGHLIGHT_CSS;\n+\n+function find(query) {\n+  console.log(\"find()\", arguments);","path":"Client/Frontend/UserContent/UserScripts/MainFrame/AtDocumentEnd/FindInPage.js","position":null,"original_position":74,"commit_id":"3681acf2d3c1ea4be7006682f1e4f601d38317e9","original_commit_id":"8916c6e5152f496ddef6430a51400a42b0549708","user":{"login":"garvankeeley","id":5495083,"avatar_url":"https://avatars1.githubusercontent.com/u/5495083?v=4","gravatar_id":"","url":"https://api.github.com/users/garvankeeley","html_url":"https://github.com/garvankeeley","followers_url":"https://api.github.com/users/garvankeeley/followers","following_url":"https://api.github.com/users/garvankeeley/following{/other_user}","gists_url":"https://api.github.com/users/garvankeeley/gists{/gist_id}","starred_url":"https://api.github.com/users/garvankeeley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garvankeeley/subscriptions","organizations_url":"https://api.github.com/users/garvankeeley/orgs","repos_url":"https://api.github.com/users/garvankeeley/repos","events_url":"https://api.github.com/users/garvankeeley/events{/privacy}","received_events_url":"https://api.github.com/users/garvankeeley/received_events","type":"User","site_admin":false},"body":"should this be removed?","created_at":"2018-03-26T19:18:06Z","updated_at":"2018-03-26T19:18:06Z","html_url":"https://github.com/mozilla-mobile/firefox-ios/pull/3794#discussion_r177204339","pull_request_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/3794","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/comments/177204339"},"html":{"href":"https://github.com/mozilla-mobile/firefox-ios/pull/3794#discussion_r177204339"},"pull_request":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/3794"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/3794","id":177168634,"html_url":"https://github.com/mozilla-mobile/firefox-ios/pull/3794","diff_url":"https://github.com/mozilla-mobile/firefox-ios/pull/3794.diff","patch_url":"https://github.com/mozilla-mobile/firefox-ios/pull/3794.patch","issue_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/3794","number":3794,"state":"open","locked":false,"title":"Bug 1386797 - FInd in page js is slow due to DOM node additions to show highlights","user":{"login":"justindarc","id":207595,"avatar_url":"https://avatars0.githubusercontent.com/u/207595?v=4","gravatar_id":"","url":"https://api.github.com/users/justindarc","html_url":"https://github.com/justindarc","followers_url":"https://api.github.com/users/justindarc/followers","following_url":"https://api.github.com/users/justindarc/following{/other_user}","gists_url":"https://api.github.com/users/justindarc/gists{/gist_id}","starred_url":"https://api.github.com/users/justindarc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justindarc/subscriptions","organizations_url":"https://api.github.com/users/justindarc/orgs","repos_url":"https://api.github.com/users/justindarc/repos","events_url":"https://api.github.com/users/justindarc/events{/privacy}","received_events_url":"https://api.github.com/users/justindarc/received_events","type":"User","site_admin":false},"body":"https://bugzilla.mozilla.org/show_bug.cgi?id=1386797","created_at":"2018-03-23T19:49:52Z","updated_at":"2018-03-26T19:18:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3700b1ced1eee3984dceb28c14083c06e89d8bf9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/3794/commits","review_comments_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/3794/comments","review_comment_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/3794/comments","statuses_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/statuses/3681acf2d3c1ea4be7006682f1e4f601d38317e9","head":{"label":"justindarc:bug1386797","ref":"bug1386797","sha":"3681acf2d3c1ea4be7006682f1e4f601d38317e9","user":{"login":"justindarc","id":207595,"avatar_url":"https://avatars0.githubusercontent.com/u/207595?v=4","gravatar_id":"","url":"https://api.github.com/users/justindarc","html_url":"https://github.com/justindarc","followers_url":"https://api.github.com/users/justindarc/followers","following_url":"https://api.github.com/users/justindarc/following{/other_user}","gists_url":"https://api.github.com/users/justindarc/gists{/gist_id}","starred_url":"https://api.github.com/users/justindarc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justindarc/subscriptions","organizations_url":"https://api.github.com/users/justindarc/orgs","repos_url":"https://api.github.com/users/justindarc/repos","events_url":"https://api.github.com/users/justindarc/events{/privacy}","received_events_url":"https://api.github.com/users/justindarc/received_events","type":"User","site_admin":false},"repo":{"id":83705237,"name":"firefox-ios","full_name":"justindarc/firefox-ios","owner":{"login":"justindarc","id":207595,"avatar_url":"https://avatars0.githubusercontent.com/u/207595?v=4","gravatar_id":"","url":"https://api.github.com/users/justindarc","html_url":"https://github.com/justindarc","followers_url":"https://api.github.com/users/justindarc/followers","following_url":"https://api.github.com/users/justindarc/following{/other_user}","gists_url":"https://api.github.com/users/justindarc/gists{/gist_id}","starred_url":"https://api.github.com/users/justindarc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justindarc/subscriptions","organizations_url":"https://api.github.com/users/justindarc/orgs","repos_url":"https://api.github.com/users/justindarc/repos","events_url":"https://api.github.com/users/justindarc/events{/privacy}","received_events_url":"https://api.github.com/users/justindarc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/justindarc/firefox-ios","description":"Firefox for iOS","fork":true,"url":"https://api.github.com/repos/justindarc/firefox-ios","forks_url":"https://api.github.com/repos/justindarc/firefox-ios/forks","keys_url":"https://api.github.com/repos/justindarc/firefox-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/justindarc/firefox-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/justindarc/firefox-ios/teams","hooks_url":"https://api.github.com/repos/justindarc/firefox-ios/hooks","issue_events_url":"https://api.github.com/repos/justindarc/firefox-ios/issues/events{/number}","events_url":"https://api.github.com/repos/justindarc/firefox-ios/events","assignees_url":"https://api.github.com/repos/justindarc/firefox-ios/assignees{/user}","branches_url":"https://api.github.com/repos/justindarc/firefox-ios/branches{/branch}","tags_url":"https://api.github.com/repos/justindarc/firefox-ios/tags","blobs_url":"https://api.github.com/repos/justindarc/firefox-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/justindarc/firefox-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/justindarc/firefox-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/justindarc/firefox-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/justindarc/firefox-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/justindarc/firefox-ios/languages","stargazers_url":"https://api.github.com/repos/justindarc/firefox-ios/stargazers","contributors_url":"https://api.github.com/repos/justindarc/firefox-ios/contributors","subscribers_url":"https://api.github.com/repos/justindarc/firefox-ios/subscribers","subscription_url":"https://api.github.com/repos/justindarc/firefox-ios/subscription","commits_url":"https://api.github.com/repos/justindarc/firefox-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/justindarc/firefox-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/justindarc/firefox-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/justindarc/firefox-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/justindarc/firefox-ios/contents/{+path}","compare_url":"https://api.github.com/repos/justindarc/firefox-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/justindarc/firefox-ios/merges","archive_url":"https://api.github.com/repos/justindarc/firefox-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/justindarc/firefox-ios/downloads","issues_url":"https://api.github.com/repos/justindarc/firefox-ios/issues{/number}","pulls_url":"https://api.github.com/repos/justindarc/firefox-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/justindarc/firefox-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/justindarc/firefox-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/justindarc/firefox-ios/labels{/name}","releases_url":"https://api.github.com/repos/justindarc/firefox-ios/releases{/id}","deployments_url":"https://api.github.com/repos/justindarc/firefox-ios/deployments","created_at":"2017-03-02T17:21:49Z","updated_at":"2018-03-22T19:25:58Z","pushed_at":"2018-03-26T16:30:14Z","git_url":"git://github.com/justindarc/firefox-ios.git","ssh_url":"git@github.com:justindarc/firefox-ios.git","clone_url":"https://github.com/justindarc/firefox-ios.git","svn_url":"https://github.com/justindarc/firefox-ios","homepage":"","size":479123,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-mobile:master","ref":"master","sha":"494a70e3c5523d020c0bc1f2cfabe60070d4302e","user":{"login":"mozilla-mobile","id":22351667,"avatar_url":"https://avatars3.githubusercontent.com/u/22351667?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":26133979,"name":"firefox-ios","full_name":"mozilla-mobile/firefox-ios","owner":{"login":"mozilla-mobile","id":22351667,"avatar_url":"https://avatars3.githubusercontent.com/u/22351667?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-mobile/firefox-ios","description":"Firefox for iOS","fork":false,"url":"https://api.github.com/repos/mozilla-mobile/firefox-ios","forks_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/forks","keys_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/teams","hooks_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/hooks","issue_events_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/events","assignees_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/tags","blobs_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/languages","stargazers_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/stargazers","contributors_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/contributors","subscribers_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/subscribers","subscription_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/subscription","commits_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/merges","archive_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/downloads","issues_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/deployments","created_at":"2014-11-03T19:07:02Z","updated_at":"2018-03-26T12:31:52Z","pushed_at":"2018-03-26T18:54:01Z","git_url":"git://github.com/mozilla-mobile/firefox-ios.git","ssh_url":"git@github.com:mozilla-mobile/firefox-ios.git","clone_url":"https://github.com/mozilla-mobile/firefox-ios.git","svn_url":"https://github.com/mozilla-mobile/firefox-ios","homepage":"","size":576776,"stargazers_count":7905,"watchers_count":7905,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1738,"mirror_url":null,"archived":false,"open_issues_count":54,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":1738,"open_issues":54,"watchers":7905,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/3794"},"html":{"href":"https://github.com/mozilla-mobile/firefox-ios/pull/3794"},"issue":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/3794"},"comments":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/3794/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/3794/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/3794/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/statuses/3681acf2d3c1ea4be7006682f1e4f601d38317e9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"garvankeeley"}}