{"action":"created","comment":{"url":"https://api.github.com/repos/OiWorld/MindTheWord/pulls/comments/25566268","id":25566268,"diff_hunk":"@@ -1,38 +1,45 @@\n console.log(\"Starting up MindTheWord background page\");\n var storage = chrome.storage.sync;\n \n+/**\n+ * @desc Storage Initialization for blacklist, patterns, option languages\n+ */\n function initializeStorage() {\n-  storage.get(\"initialized\", function(result) {\n-    if (!(result.initialized)) {\n-      var data = {\n-        initialized: true,\n-        activation: true,\n-        blacklist: \"(stackoverflow.com|github.com|code.google.com|developer.*.com|duolingo.com)\",\n-        savedPatterns: JSON.stringify([[[\"en\",\"English\"],[\"it\",\"Italian\"],\"25\",true], [[\"en\",\"English\"],[\"la\",\"Latin\"],\"15\",false]]),\n-        sourceLanguage: \"en\",\n-        targetLanguage: \"it\",\n-        translatedWordStyle: \"font-style: inherit;\\ncolor: rgba(255,153,0,1);\\nbackground-color: rgba(256, 100, 50, 0);\",\n-        userBlacklistedWords: \"(this|that)\",\n-        translationProbability: 15,\n-        minimumSourceWordLength: 3,\n-        ngramMin: 1,\n-        ngramMax: 1,\n-        userDefinedTranslations: '{\"the\":\"the\", \"a\":\"a\"}',\n-      };\n-      console.log(\"setting defaults: \");\n-      console.log(data);\n-      storage.set(data);\n-    }\n-  });\n+    storage.get(\"initialized\", function(result) {\n+        if (!(result.initialized)) {\n+            var data = {\n+                initialized: true,\n+                activation: true,\n+                blacklist: \"(stackoverflow.com|github.com|code.google.com|developer.*.com|duolingo.com)\",\n+                savedPatterns: JSON.stringify([[[\"en\",\"English\"],[\"it\",\"Italian\"],\"25\",true], [[\"en\",\"English\"],[\"la\",\"Latin\"],\"15\",false]]),\n+                sourceLanguage: \"en\",\n+                targetLanguage: \"it\",\n+                translatedWordStyle: \"font-style: inherit;\\ncolor: rgba(255,153,0,1);\\nbackground-color: rgba(256, 100, 50, 0);\",\n+                userBlacklistedWords: \"(this|that)\",\n+                translationProbability: 15,\n+                minimumSourceWordLength: 3,\n+                ngramMin: 1,\n+                ngramMax: 1,\n+                userDefinedTranslations: '{\"the\":\"the\", \"a\":\"a\"}',\n+            };\n+        console.log(\"setting defaults: \");\n+        console.log(data);\n+        storage.set(data);\n+        }\n+    });\n }\n initializeStorage();\n \n-\n+/**\n+ * @desc Constructs google translate url\n+ * @params User saved preferences","path":"Source/background.js","position":58,"original_position":58,"commit_id":"956094636dfe5d67df54b2b9a8903ec055ada417","original_commit_id":"956094636dfe5d67df54b2b9a8903ec055ada417","user":{"login":"Ceilican","id":1809436,"avatar_url":"https://avatars.githubusercontent.com/u/1809436?v=3","gravatar_id":"","url":"https://api.github.com/users/Ceilican","html_url":"https://github.com/Ceilican","followers_url":"https://api.github.com/users/Ceilican/followers","following_url":"https://api.github.com/users/Ceilican/following{/other_user}","gists_url":"https://api.github.com/users/Ceilican/gists{/gist_id}","starred_url":"https://api.github.com/users/Ceilican/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ceilican/subscriptions","organizations_url":"https://api.github.com/users/Ceilican/orgs","repos_url":"https://api.github.com/users/Ceilican/repos","events_url":"https://api.github.com/users/Ceilican/events{/privacy}","received_events_url":"https://api.github.com/users/Ceilican/received_events","type":"User","site_admin":false},"body":"From google's style guide:\r\n\r\n```\r\n/**\r\n * Some class, initialized with a value.\r\n * @param {Object} value Some value.\r\n * @constructor\r\n */\r\nfunction MyClass(value) {\r\n  /**\r\n   * Some value.\r\n   * @type {Object}\r\n   * @private\r\n   */\r\n  this.myValue_ = value;\r\n}\r\n```","created_at":"2015-03-01T11:07:19Z","updated_at":"2015-03-01T11:07:19Z","html_url":"https://github.com/OiWorld/MindTheWord/pull/41#discussion_r25566268","pull_request_url":"https://api.github.com/repos/OiWorld/MindTheWord/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/OiWorld/MindTheWord/pulls/comments/25566268"},"html":{"href":"https://github.com/OiWorld/MindTheWord/pull/41#discussion_r25566268"},"pull_request":{"href":"https://api.github.com/repos/OiWorld/MindTheWord/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/OiWorld/MindTheWord/pulls/41","id":30237887,"html_url":"https://github.com/OiWorld/MindTheWord/pull/41","diff_url":"https://github.com/OiWorld/MindTheWord/pull/41.diff","patch_url":"https://github.com/OiWorld/MindTheWord/pull/41.patch","issue_url":"https://api.github.com/repos/OiWorld/MindTheWord/issues/41","number":41,"state":"open","locked":false,"title":"Improving Javascript style","user":{"login":"Vandan-V-Phadke","id":6550649,"avatar_url":"https://avatars.githubusercontent.com/u/6550649?v=3","gravatar_id":"","url":"https://api.github.com/users/Vandan-V-Phadke","html_url":"https://github.com/Vandan-V-Phadke","followers_url":"https://api.github.com/users/Vandan-V-Phadke/followers","following_url":"https://api.github.com/users/Vandan-V-Phadke/following{/other_user}","gists_url":"https://api.github.com/users/Vandan-V-Phadke/gists{/gist_id}","starred_url":"https://api.github.com/users/Vandan-V-Phadke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vandan-V-Phadke/subscriptions","organizations_url":"https://api.github.com/users/Vandan-V-Phadke/orgs","repos_url":"https://api.github.com/users/Vandan-V-Phadke/repos","events_url":"https://api.github.com/users/Vandan-V-Phadke/events{/privacy}","received_events_url":"https://api.github.com/users/Vandan-V-Phadke/received_events","type":"User","site_admin":false},"body":"As per our conversation I am sending this PR.\r\nPlease guide me if I am not going in the right direction.","created_at":"2015-03-01T06:37:44Z","updated_at":"2015-03-01T11:07:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"312e4e8a39a3e1e2ec681e12969c162e3bd0d241","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OiWorld/MindTheWord/pulls/41/commits","review_comments_url":"https://api.github.com/repos/OiWorld/MindTheWord/pulls/41/comments","review_comment_url":"https://api.github.com/repos/OiWorld/MindTheWord/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OiWorld/MindTheWord/issues/41/comments","statuses_url":"https://api.github.com/repos/OiWorld/MindTheWord/statuses/956094636dfe5d67df54b2b9a8903ec055ada417","head":{"label":"Vandan-V-Phadke:jsStyle","ref":"jsStyle","sha":"956094636dfe5d67df54b2b9a8903ec055ada417","user":{"login":"Vandan-V-Phadke","id":6550649,"avatar_url":"https://avatars.githubusercontent.com/u/6550649?v=3","gravatar_id":"","url":"https://api.github.com/users/Vandan-V-Phadke","html_url":"https://github.com/Vandan-V-Phadke","followers_url":"https://api.github.com/users/Vandan-V-Phadke/followers","following_url":"https://api.github.com/users/Vandan-V-Phadke/following{/other_user}","gists_url":"https://api.github.com/users/Vandan-V-Phadke/gists{/gist_id}","starred_url":"https://api.github.com/users/Vandan-V-Phadke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vandan-V-Phadke/subscriptions","organizations_url":"https://api.github.com/users/Vandan-V-Phadke/orgs","repos_url":"https://api.github.com/users/Vandan-V-Phadke/repos","events_url":"https://api.github.com/users/Vandan-V-Phadke/events{/privacy}","received_events_url":"https://api.github.com/users/Vandan-V-Phadke/received_events","type":"User","site_admin":false},"repo":{"id":31296341,"name":"MindTheWord","full_name":"Vandan-V-Phadke/MindTheWord","owner":{"login":"Vandan-V-Phadke","id":6550649,"avatar_url":"https://avatars.githubusercontent.com/u/6550649?v=3","gravatar_id":"","url":"https://api.github.com/users/Vandan-V-Phadke","html_url":"https://github.com/Vandan-V-Phadke","followers_url":"https://api.github.com/users/Vandan-V-Phadke/followers","following_url":"https://api.github.com/users/Vandan-V-Phadke/following{/other_user}","gists_url":"https://api.github.com/users/Vandan-V-Phadke/gists{/gist_id}","starred_url":"https://api.github.com/users/Vandan-V-Phadke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vandan-V-Phadke/subscriptions","organizations_url":"https://api.github.com/users/Vandan-V-Phadke/orgs","repos_url":"https://api.github.com/users/Vandan-V-Phadke/repos","events_url":"https://api.github.com/users/Vandan-V-Phadke/events{/privacy}","received_events_url":"https://api.github.com/users/Vandan-V-Phadke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Vandan-V-Phadke/MindTheWord","description":"An extension for Google Chrome that helps people learn new languages while they browse the web.","fork":true,"url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord","forks_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/forks","keys_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/teams","hooks_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/hooks","issue_events_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/issues/events{/number}","events_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/events","assignees_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/assignees{/user}","branches_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/branches{/branch}","tags_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/tags","blobs_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/statuses/{sha}","languages_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/languages","stargazers_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/stargazers","contributors_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/contributors","subscribers_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/subscribers","subscription_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/subscription","commits_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/contents/{+path}","compare_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/merges","archive_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/downloads","issues_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/issues{/number}","pulls_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/pulls{/number}","milestones_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/milestones{/number}","notifications_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/labels{/name}","releases_url":"https://api.github.com/repos/Vandan-V-Phadke/MindTheWord/releases{/id}","created_at":"2015-02-25T04:02:34Z","updated_at":"2015-02-25T04:02:35Z","pushed_at":"2015-03-01T06:35:52Z","git_url":"git://github.com/Vandan-V-Phadke/MindTheWord.git","ssh_url":"git@github.com:Vandan-V-Phadke/MindTheWord.git","clone_url":"https://github.com/Vandan-V-Phadke/MindTheWord.git","svn_url":"https://github.com/Vandan-V-Phadke/MindTheWord","homepage":null,"size":10604,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"OiWorld:master","ref":"master","sha":"fa2a20878969723031c678c21ea3cdba87c416ef","user":{"login":"OiWorld","id":3678147,"avatar_url":"https://avatars.githubusercontent.com/u/3678147?v=3","gravatar_id":"","url":"https://api.github.com/users/OiWorld","html_url":"https://github.com/OiWorld","followers_url":"https://api.github.com/users/OiWorld/followers","following_url":"https://api.github.com/users/OiWorld/following{/other_user}","gists_url":"https://api.github.com/users/OiWorld/gists{/gist_id}","starred_url":"https://api.github.com/users/OiWorld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OiWorld/subscriptions","organizations_url":"https://api.github.com/users/OiWorld/orgs","repos_url":"https://api.github.com/users/OiWorld/repos","events_url":"https://api.github.com/users/OiWorld/events{/privacy}","received_events_url":"https://api.github.com/users/OiWorld/received_events","type":"Organization","site_admin":false},"repo":{"id":8381792,"name":"MindTheWord","full_name":"OiWorld/MindTheWord","owner":{"login":"OiWorld","id":3678147,"avatar_url":"https://avatars.githubusercontent.com/u/3678147?v=3","gravatar_id":"","url":"https://api.github.com/users/OiWorld","html_url":"https://github.com/OiWorld","followers_url":"https://api.github.com/users/OiWorld/followers","following_url":"https://api.github.com/users/OiWorld/following{/other_user}","gists_url":"https://api.github.com/users/OiWorld/gists{/gist_id}","starred_url":"https://api.github.com/users/OiWorld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OiWorld/subscriptions","organizations_url":"https://api.github.com/users/OiWorld/orgs","repos_url":"https://api.github.com/users/OiWorld/repos","events_url":"https://api.github.com/users/OiWorld/events{/privacy}","received_events_url":"https://api.github.com/users/OiWorld/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OiWorld/MindTheWord","description":"An extension for Google Chrome that helps people learn new languages while they browse the web.","fork":false,"url":"https://api.github.com/repos/OiWorld/MindTheWord","forks_url":"https://api.github.com/repos/OiWorld/MindTheWord/forks","keys_url":"https://api.github.com/repos/OiWorld/MindTheWord/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OiWorld/MindTheWord/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OiWorld/MindTheWord/teams","hooks_url":"https://api.github.com/repos/OiWorld/MindTheWord/hooks","issue_events_url":"https://api.github.com/repos/OiWorld/MindTheWord/issues/events{/number}","events_url":"https://api.github.com/repos/OiWorld/MindTheWord/events","assignees_url":"https://api.github.com/repos/OiWorld/MindTheWord/assignees{/user}","branches_url":"https://api.github.com/repos/OiWorld/MindTheWord/branches{/branch}","tags_url":"https://api.github.com/repos/OiWorld/MindTheWord/tags","blobs_url":"https://api.github.com/repos/OiWorld/MindTheWord/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OiWorld/MindTheWord/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OiWorld/MindTheWord/git/refs{/sha}","trees_url":"https://api.github.com/repos/OiWorld/MindTheWord/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OiWorld/MindTheWord/statuses/{sha}","languages_url":"https://api.github.com/repos/OiWorld/MindTheWord/languages","stargazers_url":"https://api.github.com/repos/OiWorld/MindTheWord/stargazers","contributors_url":"https://api.github.com/repos/OiWorld/MindTheWord/contributors","subscribers_url":"https://api.github.com/repos/OiWorld/MindTheWord/subscribers","subscription_url":"https://api.github.com/repos/OiWorld/MindTheWord/subscription","commits_url":"https://api.github.com/repos/OiWorld/MindTheWord/commits{/sha}","git_commits_url":"https://api.github.com/repos/OiWorld/MindTheWord/git/commits{/sha}","comments_url":"https://api.github.com/repos/OiWorld/MindTheWord/comments{/number}","issue_comment_url":"https://api.github.com/repos/OiWorld/MindTheWord/issues/comments{/number}","contents_url":"https://api.github.com/repos/OiWorld/MindTheWord/contents/{+path}","compare_url":"https://api.github.com/repos/OiWorld/MindTheWord/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OiWorld/MindTheWord/merges","archive_url":"https://api.github.com/repos/OiWorld/MindTheWord/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OiWorld/MindTheWord/downloads","issues_url":"https://api.github.com/repos/OiWorld/MindTheWord/issues{/number}","pulls_url":"https://api.github.com/repos/OiWorld/MindTheWord/pulls{/number}","milestones_url":"https://api.github.com/repos/OiWorld/MindTheWord/milestones{/number}","notifications_url":"https://api.github.com/repos/OiWorld/MindTheWord/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OiWorld/MindTheWord/labels{/name}","releases_url":"https://api.github.com/repos/OiWorld/MindTheWord/releases{/id}","created_at":"2013-02-23T20:57:46Z","updated_at":"2015-02-27T21:57:04Z","pushed_at":"2015-02-27T21:57:03Z","git_url":"git://github.com/OiWorld/MindTheWord.git","ssh_url":"git@github.com:OiWorld/MindTheWord.git","clone_url":"https://github.com/OiWorld/MindTheWord.git","svn_url":"https://github.com/OiWorld/MindTheWord","homepage":null,"size":10604,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":23,"forks":13,"open_issues":23,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OiWorld/MindTheWord/pulls/41"},"html":{"href":"https://github.com/OiWorld/MindTheWord/pull/41"},"issue":{"href":"https://api.github.com/repos/OiWorld/MindTheWord/issues/41"},"comments":{"href":"https://api.github.com/repos/OiWorld/MindTheWord/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/OiWorld/MindTheWord/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/OiWorld/MindTheWord/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OiWorld/MindTheWord/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/OiWorld/MindTheWord/statuses/956094636dfe5d67df54b2b9a8903ec055ada417"}}}}