{"action":"created","comment":{"url":"https://api.github.com/repos/GPII/gpii-chrome-extension/pulls/comments/64912748","id":64912748,"diff_hunk":"@@ -0,0 +1,87 @@\n+/*globals fluid */\n+\n+\"use strict\";\n+\n+var gpii = fluid.registerNamespace(\"gpii\");\n+var chrome = chrome || require(\"sinon-chrome\");\n+\n+// This component makes use of css/highContrast.css to perform the adaptations\n+// of the web content, and this is done through chrome.tabs.executeScript.\n+//\n+fluid.defaults(\"gpii.chrome.highContrast\", {\n+    gradeNames: [\"fluid.modelComponent\"],\n+    scriptTemplate: \"document.documentElement.setAttribute('data-gpii-hc','__THEME__');\" +\n+                    \"[].forEach.call(document.querySelectorAll('body *'), function(node) {\" +\n+                        \"node.setAttribute('data-gpii-hc', '__THEME__');\" +\n+                    \"});\" +\n+                    \"document.documentElement.setAttribute('data-gpii-hc', '__THEME__');\",\n+    disableScript: \"document.documentElement.removeAttribute('data-gpii-hc');\" +\n+                    \"[].forEach.call(document.querySelectorAll('body *'), function(node) {\" +\n+                        \"node.removeAttribute('data-gpii-hc');\" +\n+                    \"});\",\n+    commonToPlatform: {\n+        highContrastTheme: {\n+            transform: {\n+                type: \"fluid.transforms.valueMapper\",\n+                inputPath: \"highContrastTheme\",\n+                defaultInputValue: \"black-white\",\n+                options: {\n+                    \"black-white\": {\n+                        outputValue: \"bw\"\n+                    },\n+                    \"white-black\": {\n+                        outputValue: \"wb\"\n+                    },\n+                    \"black-yellow\": {\n+                        outputValue: \"by\"\n+                    },\n+                    \"yellow-black\": {\n+                        outputValue: \"yb\"\n+                    }\n+                }\n+            }\n+        }\n+    },\n+    model: {\n+        highContrastEnabled: undefined,\n+        highContrastTheme: undefined\n+    },\n+    modelListeners: {\n+        \"*\": {\n+            funcName: \"gpii.chrome.highContrast.modelChanged\",\n+            args: \"{that}\",\n+            excludeSource: \"init\"\n+        }\n+    }\n+});\n+\n+gpii.chrome.highContrast.modelChanged = function (that) {\n+    if (that.model.highContrastEnabled) {","path":"extension/src/lib/highContrast.js","position":59,"original_position":59,"commit_id":"1e8d0990dcaf29c0ca8df32d93e0ca31f769c7a5","original_commit_id":"1e8d0990dcaf29c0ca8df32d93e0ca31f769c7a5","user":{"login":"jobara","id":556024,"avatar_url":"https://avatars.githubusercontent.com/u/556024?v=3","gravatar_id":"","url":"https://api.github.com/users/jobara","html_url":"https://github.com/jobara","followers_url":"https://api.github.com/users/jobara/followers","following_url":"https://api.github.com/users/jobara/following{/other_user}","gists_url":"https://api.github.com/users/jobara/gists{/gist_id}","starred_url":"https://api.github.com/users/jobara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jobara/subscriptions","organizations_url":"https://api.github.com/users/jobara/orgs","repos_url":"https://api.github.com/users/jobara/repos","events_url":"https://api.github.com/users/jobara/events{/privacy}","received_events_url":"https://api.github.com/users/jobara/received_events","type":"User","site_admin":false},"body":"I wonder if these can be refactored into public functions and bound as model listeners to changes at specific model paths?","created_at":"2016-05-27T14:28:05Z","updated_at":"2016-05-27T14:28:05Z","html_url":"https://github.com/GPII/gpii-chrome-extension/pull/1#discussion_r64912748","pull_request_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/GPII/gpii-chrome-extension/pulls/comments/64912748"},"html":{"href":"https://github.com/GPII/gpii-chrome-extension/pull/1#discussion_r64912748"},"pull_request":{"href":"https://api.github.com/repos/GPII/gpii-chrome-extension/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/GPII/gpii-chrome-extension/pulls/1","id":59829205,"html_url":"https://github.com/GPII/gpii-chrome-extension/pull/1","diff_url":"https://github.com/GPII/gpii-chrome-extension/pull/1.diff","patch_url":"https://github.com/GPII/gpii-chrome-extension/pull/1.patch","issue_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/issues/1","number":1,"state":"open","locked":false,"title":"Initial implementation","user":{"login":"javihernandez","id":821790,"avatar_url":"https://avatars.githubusercontent.com/u/821790?v=3","gravatar_id":"","url":"https://api.github.com/users/javihernandez","html_url":"https://github.com/javihernandez","followers_url":"https://api.github.com/users/javihernandez/followers","following_url":"https://api.github.com/users/javihernandez/following{/other_user}","gists_url":"https://api.github.com/users/javihernandez/gists{/gist_id}","starred_url":"https://api.github.com/users/javihernandez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javihernandez/subscriptions","organizations_url":"https://api.github.com/users/javihernandez/orgs","repos_url":"https://api.github.com/users/javihernandez/repos","events_url":"https://api.github.com/users/javihernandez/events{/privacy}","received_events_url":"https://api.github.com/users/javihernandez/received_events","type":"User","site_admin":false},"body":"This is an initial implementation of this work. \r\nFull description is here: https://issues.gpii.net/browse/GPII-1575","created_at":"2016-02-18T16:56:37Z","updated_at":"2016-05-27T14:28:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"567c4170d6eea2bb7dd3990e947a06e4f1eb0244","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/pulls/1/commits","review_comments_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/pulls/1/comments","review_comment_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/issues/1/comments","statuses_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/statuses/1e8d0990dcaf29c0ca8df32d93e0ca31f769c7a5","head":{"label":"javihernandez:initial-implementation","ref":"initial-implementation","sha":"1e8d0990dcaf29c0ca8df32d93e0ca31f769c7a5","user":{"login":"javihernandez","id":821790,"avatar_url":"https://avatars.githubusercontent.com/u/821790?v=3","gravatar_id":"","url":"https://api.github.com/users/javihernandez","html_url":"https://github.com/javihernandez","followers_url":"https://api.github.com/users/javihernandez/followers","following_url":"https://api.github.com/users/javihernandez/following{/other_user}","gists_url":"https://api.github.com/users/javihernandez/gists{/gist_id}","starred_url":"https://api.github.com/users/javihernandez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javihernandez/subscriptions","organizations_url":"https://api.github.com/users/javihernandez/orgs","repos_url":"https://api.github.com/users/javihernandez/repos","events_url":"https://api.github.com/users/javihernandez/events{/privacy}","received_events_url":"https://api.github.com/users/javihernandez/received_events","type":"User","site_admin":false},"repo":{"id":52020572,"name":"gpii-chrome-extension","full_name":"javihernandez/gpii-chrome-extension","owner":{"login":"javihernandez","id":821790,"avatar_url":"https://avatars.githubusercontent.com/u/821790?v=3","gravatar_id":"","url":"https://api.github.com/users/javihernandez","html_url":"https://github.com/javihernandez","followers_url":"https://api.github.com/users/javihernandez/followers","following_url":"https://api.github.com/users/javihernandez/following{/other_user}","gists_url":"https://api.github.com/users/javihernandez/gists{/gist_id}","starred_url":"https://api.github.com/users/javihernandez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javihernandez/subscriptions","organizations_url":"https://api.github.com/users/javihernandez/orgs","repos_url":"https://api.github.com/users/javihernandez/repos","events_url":"https://api.github.com/users/javihernandez/events{/privacy}","received_events_url":"https://api.github.com/users/javihernandez/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/javihernandez/gpii-chrome-extension","description":"GPII Google Chrome extension","fork":true,"url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension","forks_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/forks","keys_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/keys{/key_id}","collaborators_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/teams","hooks_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/hooks","issue_events_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/issues/events{/number}","events_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/events","assignees_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/assignees{/user}","branches_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/branches{/branch}","tags_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/tags","blobs_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/git/refs{/sha}","trees_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/git/trees{/sha}","statuses_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/statuses/{sha}","languages_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/languages","stargazers_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/stargazers","contributors_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/contributors","subscribers_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/subscribers","subscription_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/subscription","commits_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/commits{/sha}","git_commits_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/git/commits{/sha}","comments_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/comments{/number}","issue_comment_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/issues/comments{/number}","contents_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/contents/{+path}","compare_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/compare/{base}...{head}","merges_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/merges","archive_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/downloads","issues_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/issues{/number}","pulls_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/pulls{/number}","milestones_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/milestones{/number}","notifications_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/labels{/name}","releases_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/releases{/id}","deployments_url":"https://api.github.com/repos/javihernandez/gpii-chrome-extension/deployments","created_at":"2016-02-18T16:16:56Z","updated_at":"2016-04-27T15:49:14Z","pushed_at":"2016-05-26T16:29:10Z","git_url":"git://github.com/javihernandez/gpii-chrome-extension.git","ssh_url":"git@github.com:javihernandez/gpii-chrome-extension.git","clone_url":"https://github.com/javihernandez/gpii-chrome-extension.git","svn_url":"https://github.com/javihernandez/gpii-chrome-extension","homepage":null,"size":219,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GPII:master","ref":"master","sha":"882a14bd490afc980ada67f83f06bf4c123f52ca","user":{"login":"GPII","id":1343050,"avatar_url":"https://avatars.githubusercontent.com/u/1343050?v=3","gravatar_id":"","url":"https://api.github.com/users/GPII","html_url":"https://github.com/GPII","followers_url":"https://api.github.com/users/GPII/followers","following_url":"https://api.github.com/users/GPII/following{/other_user}","gists_url":"https://api.github.com/users/GPII/gists{/gist_id}","starred_url":"https://api.github.com/users/GPII/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GPII/subscriptions","organizations_url":"https://api.github.com/users/GPII/orgs","repos_url":"https://api.github.com/users/GPII/repos","events_url":"https://api.github.com/users/GPII/events{/privacy}","received_events_url":"https://api.github.com/users/GPII/received_events","type":"Organization","site_admin":false},"repo":{"id":52020552,"name":"gpii-chrome-extension","full_name":"GPII/gpii-chrome-extension","owner":{"login":"GPII","id":1343050,"avatar_url":"https://avatars.githubusercontent.com/u/1343050?v=3","gravatar_id":"","url":"https://api.github.com/users/GPII","html_url":"https://github.com/GPII","followers_url":"https://api.github.com/users/GPII/followers","following_url":"https://api.github.com/users/GPII/following{/other_user}","gists_url":"https://api.github.com/users/GPII/gists{/gist_id}","starred_url":"https://api.github.com/users/GPII/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GPII/subscriptions","organizations_url":"https://api.github.com/users/GPII/orgs","repos_url":"https://api.github.com/users/GPII/repos","events_url":"https://api.github.com/users/GPII/events{/privacy}","received_events_url":"https://api.github.com/users/GPII/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GPII/gpii-chrome-extension","description":"GPII Google Chrome extension","fork":false,"url":"https://api.github.com/repos/GPII/gpii-chrome-extension","forks_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/forks","keys_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/teams","hooks_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/hooks","issue_events_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/issues/events{/number}","events_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/events","assignees_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/assignees{/user}","branches_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/branches{/branch}","tags_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/tags","blobs_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/git/refs{/sha}","trees_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/statuses/{sha}","languages_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/languages","stargazers_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/stargazers","contributors_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/contributors","subscribers_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/subscribers","subscription_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/subscription","commits_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/commits{/sha}","git_commits_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/git/commits{/sha}","comments_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/comments{/number}","issue_comment_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/issues/comments{/number}","contents_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/contents/{+path}","compare_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/merges","archive_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/downloads","issues_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/issues{/number}","pulls_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/pulls{/number}","milestones_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/milestones{/number}","notifications_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/labels{/name}","releases_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/releases{/id}","deployments_url":"https://api.github.com/repos/GPII/gpii-chrome-extension/deployments","created_at":"2016-02-18T16:16:44Z","updated_at":"2016-04-27T15:47:41Z","pushed_at":"2016-05-26T16:29:11Z","git_url":"git://github.com/GPII/gpii-chrome-extension.git","ssh_url":"git@github.com:GPII/gpii-chrome-extension.git","clone_url":"https://github.com/GPII/gpii-chrome-extension.git","svn_url":"https://github.com/GPII/gpii-chrome-extension","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GPII/gpii-chrome-extension/pulls/1"},"html":{"href":"https://github.com/GPII/gpii-chrome-extension/pull/1"},"issue":{"href":"https://api.github.com/repos/GPII/gpii-chrome-extension/issues/1"},"comments":{"href":"https://api.github.com/repos/GPII/gpii-chrome-extension/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/GPII/gpii-chrome-extension/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/GPII/gpii-chrome-extension/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GPII/gpii-chrome-extension/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/GPII/gpii-chrome-extension/statuses/1e8d0990dcaf29c0ca8df32d93e0ca31f769c7a5"}}}}
{"actor":{"display_login":"jobara"}}