{"action":"created","comment":{"url":"https://api.github.com/repos/isqua/asocial/pulls/comments/86748841","pull_request_review_id":7389826,"id":86748841,"diff_hunk":"@@ -1,63 +1,124 @@\n-'use strict';\n-\n-chrome.runtime.onMessage.addListener(function(message, sender) {\n-    shouldDisable(message, function(res) {\n-        chrome.tabs.sendMessage(\n-          sender.tab.id,\n-          res\n-        );\n-    });\n-});\n-\n-/**\n- * checkRule - checking rule\n- *\n- * @param  {String} network\n- * @param  {Date} time\n- * @param  {Object} rule\n- * @return {Boolean}\n- */\n-function checkRule(network, time, rule) {\n-    var disabledNetworks = Object.keys(rule.sites).filter(network => rule.sites[network]);\n-\n-    if (disabledNetworks.length > 0 && !rule.sites[network]) {\n-        return false;\n-    }\n-\n-    if (rule.days.length !== 0 && rule.days.indexOf(time.getDay()) === -1) {\n-        return false;\n-    }\n-\n-    var startTime = new Date();\n-    var endTime = new Date();\n-    var isAfterStart = true;\n-    var isBeforeEnd = true;\n-\n-    if (rule.start) {\n-        startTime.setHours(...rule.start, 0, 0);\n-        isAfterStart = startTime <= time;\n-    }\n-\n-    if (rule.end) {\n-        endTime.setHours(...rule.end, 0, 0);\n-        isBeforeEnd = time < endTime;\n-    }\n-\n-    return isAfterStart && isBeforeEnd;\n-}\n-\n-/**\n- * shouldDisable - network activity checking\n- *\n- * @param  {String} network\n- * @param  {Function} callback\n- */\n-function shouldDisable(network, callback) {\n-    chrome.storage.sync.get('rules', rulesContainer => {\n-        var currentTime = new Date();\n-\n-        var result = rulesContainer.rules.some(rule => checkRule(network, currentTime, rule));\n-\n-        callback(result);\n-    });\n-}\n+/******/ (function(modules) { // webpackBootstrap","path":"asocial/event/disable.js","position":64,"original_position":64,"commit_id":"4217573fa59929cbf2f3866aa3d4960572629087","original_commit_id":"4217573fa59929cbf2f3866aa3d4960572629087","user":{"login":"isqua","id":529247,"avatar_url":"https://avatars.githubusercontent.com/u/529247?v=3","gravatar_id":"","url":"https://api.github.com/users/isqua","html_url":"https://github.com/isqua","followers_url":"https://api.github.com/users/isqua/followers","following_url":"https://api.github.com/users/isqua/following{/other_user}","gists_url":"https://api.github.com/users/isqua/gists{/gist_id}","starred_url":"https://api.github.com/users/isqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isqua/subscriptions","organizations_url":"https://api.github.com/users/isqua/orgs","repos_url":"https://api.github.com/users/isqua/repos","events_url":"https://api.github.com/users/isqua/events{/privacy}","received_events_url":"https://api.github.com/users/isqua/received_events","type":"User","site_admin":false},"body":"Э-э-э.","created_at":"2016-11-07T10:36:48Z","updated_at":"2016-11-07T10:36:48Z","html_url":"https://github.com/isqua/asocial/pull/48#discussion_r86748841","pull_request_url":"https://api.github.com/repos/isqua/asocial/pulls/48","_links":{"self":{"href":"https://api.github.com/repos/isqua/asocial/pulls/comments/86748841"},"html":{"href":"https://github.com/isqua/asocial/pull/48#discussion_r86748841"},"pull_request":{"href":"https://api.github.com/repos/isqua/asocial/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/isqua/asocial/pulls/48","id":92464739,"html_url":"https://github.com/isqua/asocial/pull/48","diff_url":"https://github.com/isqua/asocial/pull/48.diff","patch_url":"https://github.com/isqua/asocial/pull/48.patch","issue_url":"https://api.github.com/repos/isqua/asocial/issues/48","number":48,"state":"open","locked":false,"title":"Highlithed current rules in the options page; Fix #39","user":{"login":"fyvfyv","id":3251438,"avatar_url":"https://avatars.githubusercontent.com/u/3251438?v=3","gravatar_id":"","url":"https://api.github.com/users/fyvfyv","html_url":"https://github.com/fyvfyv","followers_url":"https://api.github.com/users/fyvfyv/followers","following_url":"https://api.github.com/users/fyvfyv/following{/other_user}","gists_url":"https://api.github.com/users/fyvfyv/gists{/gist_id}","starred_url":"https://api.github.com/users/fyvfyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyvfyv/subscriptions","organizations_url":"https://api.github.com/users/fyvfyv/orgs","repos_url":"https://api.github.com/users/fyvfyv/repos","events_url":"https://api.github.com/users/fyvfyv/events{/privacy}","received_events_url":"https://api.github.com/users/fyvfyv/received_events","type":"User","site_admin":false},"body":"#39 ","created_at":"2016-11-05T19:44:12Z","updated_at":"2016-11-07T10:36:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9dccdf3d7b2154c773452e7dd5276a391ea54ae1","assignee":{"login":"isqua","id":529247,"avatar_url":"https://avatars.githubusercontent.com/u/529247?v=3","gravatar_id":"","url":"https://api.github.com/users/isqua","html_url":"https://github.com/isqua","followers_url":"https://api.github.com/users/isqua/followers","following_url":"https://api.github.com/users/isqua/following{/other_user}","gists_url":"https://api.github.com/users/isqua/gists{/gist_id}","starred_url":"https://api.github.com/users/isqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isqua/subscriptions","organizations_url":"https://api.github.com/users/isqua/orgs","repos_url":"https://api.github.com/users/isqua/repos","events_url":"https://api.github.com/users/isqua/events{/privacy}","received_events_url":"https://api.github.com/users/isqua/received_events","type":"User","site_admin":false},"assignees":[{"login":"isqua","id":529247,"avatar_url":"https://avatars.githubusercontent.com/u/529247?v=3","gravatar_id":"","url":"https://api.github.com/users/isqua","html_url":"https://github.com/isqua","followers_url":"https://api.github.com/users/isqua/followers","following_url":"https://api.github.com/users/isqua/following{/other_user}","gists_url":"https://api.github.com/users/isqua/gists{/gist_id}","starred_url":"https://api.github.com/users/isqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isqua/subscriptions","organizations_url":"https://api.github.com/users/isqua/orgs","repos_url":"https://api.github.com/users/isqua/repos","events_url":"https://api.github.com/users/isqua/events{/privacy}","received_events_url":"https://api.github.com/users/isqua/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/isqua/asocial/pulls/48/commits","review_comments_url":"https://api.github.com/repos/isqua/asocial/pulls/48/comments","review_comment_url":"https://api.github.com/repos/isqua/asocial/pulls/comments{/number}","comments_url":"https://api.github.com/repos/isqua/asocial/issues/48/comments","statuses_url":"https://api.github.com/repos/isqua/asocial/statuses/4217573fa59929cbf2f3866aa3d4960572629087","head":{"label":"isqua:issues/39","ref":"issues/39","sha":"4217573fa59929cbf2f3866aa3d4960572629087","user":{"login":"isqua","id":529247,"avatar_url":"https://avatars.githubusercontent.com/u/529247?v=3","gravatar_id":"","url":"https://api.github.com/users/isqua","html_url":"https://github.com/isqua","followers_url":"https://api.github.com/users/isqua/followers","following_url":"https://api.github.com/users/isqua/following{/other_user}","gists_url":"https://api.github.com/users/isqua/gists{/gist_id}","starred_url":"https://api.github.com/users/isqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isqua/subscriptions","organizations_url":"https://api.github.com/users/isqua/orgs","repos_url":"https://api.github.com/users/isqua/repos","events_url":"https://api.github.com/users/isqua/events{/privacy}","received_events_url":"https://api.github.com/users/isqua/received_events","type":"User","site_admin":false},"repo":{"id":59510890,"name":"asocial","full_name":"isqua/asocial","owner":{"login":"isqua","id":529247,"avatar_url":"https://avatars.githubusercontent.com/u/529247?v=3","gravatar_id":"","url":"https://api.github.com/users/isqua","html_url":"https://github.com/isqua","followers_url":"https://api.github.com/users/isqua/followers","following_url":"https://api.github.com/users/isqua/following{/other_user}","gists_url":"https://api.github.com/users/isqua/gists{/gist_id}","starred_url":"https://api.github.com/users/isqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isqua/subscriptions","organizations_url":"https://api.github.com/users/isqua/orgs","repos_url":"https://api.github.com/users/isqua/repos","events_url":"https://api.github.com/users/isqua/events{/privacy}","received_events_url":"https://api.github.com/users/isqua/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/isqua/asocial","description":null,"fork":false,"url":"https://api.github.com/repos/isqua/asocial","forks_url":"https://api.github.com/repos/isqua/asocial/forks","keys_url":"https://api.github.com/repos/isqua/asocial/keys{/key_id}","collaborators_url":"https://api.github.com/repos/isqua/asocial/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/isqua/asocial/teams","hooks_url":"https://api.github.com/repos/isqua/asocial/hooks","issue_events_url":"https://api.github.com/repos/isqua/asocial/issues/events{/number}","events_url":"https://api.github.com/repos/isqua/asocial/events","assignees_url":"https://api.github.com/repos/isqua/asocial/assignees{/user}","branches_url":"https://api.github.com/repos/isqua/asocial/branches{/branch}","tags_url":"https://api.github.com/repos/isqua/asocial/tags","blobs_url":"https://api.github.com/repos/isqua/asocial/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/isqua/asocial/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/isqua/asocial/git/refs{/sha}","trees_url":"https://api.github.com/repos/isqua/asocial/git/trees{/sha}","statuses_url":"https://api.github.com/repos/isqua/asocial/statuses/{sha}","languages_url":"https://api.github.com/repos/isqua/asocial/languages","stargazers_url":"https://api.github.com/repos/isqua/asocial/stargazers","contributors_url":"https://api.github.com/repos/isqua/asocial/contributors","subscribers_url":"https://api.github.com/repos/isqua/asocial/subscribers","subscription_url":"https://api.github.com/repos/isqua/asocial/subscription","commits_url":"https://api.github.com/repos/isqua/asocial/commits{/sha}","git_commits_url":"https://api.github.com/repos/isqua/asocial/git/commits{/sha}","comments_url":"https://api.github.com/repos/isqua/asocial/comments{/number}","issue_comment_url":"https://api.github.com/repos/isqua/asocial/issues/comments{/number}","contents_url":"https://api.github.com/repos/isqua/asocial/contents/{+path}","compare_url":"https://api.github.com/repos/isqua/asocial/compare/{base}...{head}","merges_url":"https://api.github.com/repos/isqua/asocial/merges","archive_url":"https://api.github.com/repos/isqua/asocial/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/isqua/asocial/downloads","issues_url":"https://api.github.com/repos/isqua/asocial/issues{/number}","pulls_url":"https://api.github.com/repos/isqua/asocial/pulls{/number}","milestones_url":"https://api.github.com/repos/isqua/asocial/milestones{/number}","notifications_url":"https://api.github.com/repos/isqua/asocial/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/isqua/asocial/labels{/name}","releases_url":"https://api.github.com/repos/isqua/asocial/releases{/id}","deployments_url":"https://api.github.com/repos/isqua/asocial/deployments","created_at":"2016-05-23T19:06:14Z","updated_at":"2016-06-17T17:04:02Z","pushed_at":"2016-11-06T13:03:28Z","git_url":"git://github.com/isqua/asocial.git","ssh_url":"git@github.com:isqua/asocial.git","clone_url":"https://github.com/isqua/asocial.git","svn_url":"https://github.com/isqua/asocial","homepage":null,"size":602,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":0,"default_branch":"master"}},"base":{"label":"isqua:master","ref":"master","sha":"7f4cc043a3771adb7dc96abe7aea3fc946adee7e","user":{"login":"isqua","id":529247,"avatar_url":"https://avatars.githubusercontent.com/u/529247?v=3","gravatar_id":"","url":"https://api.github.com/users/isqua","html_url":"https://github.com/isqua","followers_url":"https://api.github.com/users/isqua/followers","following_url":"https://api.github.com/users/isqua/following{/other_user}","gists_url":"https://api.github.com/users/isqua/gists{/gist_id}","starred_url":"https://api.github.com/users/isqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isqua/subscriptions","organizations_url":"https://api.github.com/users/isqua/orgs","repos_url":"https://api.github.com/users/isqua/repos","events_url":"https://api.github.com/users/isqua/events{/privacy}","received_events_url":"https://api.github.com/users/isqua/received_events","type":"User","site_admin":false},"repo":{"id":59510890,"name":"asocial","full_name":"isqua/asocial","owner":{"login":"isqua","id":529247,"avatar_url":"https://avatars.githubusercontent.com/u/529247?v=3","gravatar_id":"","url":"https://api.github.com/users/isqua","html_url":"https://github.com/isqua","followers_url":"https://api.github.com/users/isqua/followers","following_url":"https://api.github.com/users/isqua/following{/other_user}","gists_url":"https://api.github.com/users/isqua/gists{/gist_id}","starred_url":"https://api.github.com/users/isqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isqua/subscriptions","organizations_url":"https://api.github.com/users/isqua/orgs","repos_url":"https://api.github.com/users/isqua/repos","events_url":"https://api.github.com/users/isqua/events{/privacy}","received_events_url":"https://api.github.com/users/isqua/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/isqua/asocial","description":null,"fork":false,"url":"https://api.github.com/repos/isqua/asocial","forks_url":"https://api.github.com/repos/isqua/asocial/forks","keys_url":"https://api.github.com/repos/isqua/asocial/keys{/key_id}","collaborators_url":"https://api.github.com/repos/isqua/asocial/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/isqua/asocial/teams","hooks_url":"https://api.github.com/repos/isqua/asocial/hooks","issue_events_url":"https://api.github.com/repos/isqua/asocial/issues/events{/number}","events_url":"https://api.github.com/repos/isqua/asocial/events","assignees_url":"https://api.github.com/repos/isqua/asocial/assignees{/user}","branches_url":"https://api.github.com/repos/isqua/asocial/branches{/branch}","tags_url":"https://api.github.com/repos/isqua/asocial/tags","blobs_url":"https://api.github.com/repos/isqua/asocial/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/isqua/asocial/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/isqua/asocial/git/refs{/sha}","trees_url":"https://api.github.com/repos/isqua/asocial/git/trees{/sha}","statuses_url":"https://api.github.com/repos/isqua/asocial/statuses/{sha}","languages_url":"https://api.github.com/repos/isqua/asocial/languages","stargazers_url":"https://api.github.com/repos/isqua/asocial/stargazers","contributors_url":"https://api.github.com/repos/isqua/asocial/contributors","subscribers_url":"https://api.github.com/repos/isqua/asocial/subscribers","subscription_url":"https://api.github.com/repos/isqua/asocial/subscription","commits_url":"https://api.github.com/repos/isqua/asocial/commits{/sha}","git_commits_url":"https://api.github.com/repos/isqua/asocial/git/commits{/sha}","comments_url":"https://api.github.com/repos/isqua/asocial/comments{/number}","issue_comment_url":"https://api.github.com/repos/isqua/asocial/issues/comments{/number}","contents_url":"https://api.github.com/repos/isqua/asocial/contents/{+path}","compare_url":"https://api.github.com/repos/isqua/asocial/compare/{base}...{head}","merges_url":"https://api.github.com/repos/isqua/asocial/merges","archive_url":"https://api.github.com/repos/isqua/asocial/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/isqua/asocial/downloads","issues_url":"https://api.github.com/repos/isqua/asocial/issues{/number}","pulls_url":"https://api.github.com/repos/isqua/asocial/pulls{/number}","milestones_url":"https://api.github.com/repos/isqua/asocial/milestones{/number}","notifications_url":"https://api.github.com/repos/isqua/asocial/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/isqua/asocial/labels{/name}","releases_url":"https://api.github.com/repos/isqua/asocial/releases{/id}","deployments_url":"https://api.github.com/repos/isqua/asocial/deployments","created_at":"2016-05-23T19:06:14Z","updated_at":"2016-06-17T17:04:02Z","pushed_at":"2016-11-06T13:03:28Z","git_url":"git://github.com/isqua/asocial.git","ssh_url":"git@github.com:isqua/asocial.git","clone_url":"https://github.com/isqua/asocial.git","svn_url":"https://github.com/isqua/asocial","homepage":null,"size":602,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/isqua/asocial/pulls/48"},"html":{"href":"https://github.com/isqua/asocial/pull/48"},"issue":{"href":"https://api.github.com/repos/isqua/asocial/issues/48"},"comments":{"href":"https://api.github.com/repos/isqua/asocial/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/isqua/asocial/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/isqua/asocial/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/isqua/asocial/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/isqua/asocial/statuses/4217573fa59929cbf2f3866aa3d4960572629087"}}}}
{"actor":{"display_login":"isqua"}}