{"action":"created","comment":{"url":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/comments/205033898","pull_request_review_id":140222258,"id":205033898,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTAzMzg5OA==","diff_hunk":"@@ -739,7 +739,14 @@ def on_load_finished(self, tab, ok):\n             start = config.val.colors.tabs.indicator.start\n             stop = config.val.colors.tabs.indicator.stop\n             system = config.val.colors.tabs.indicator.system\n-            color = utils.interpolate_color(start, stop, 100, system)\n+            try:\n+                url_str=self.widget.tab_url(idx).toString()\n+                if url_str.find(\"qute://back\") != -1 :","path":"qutebrowser/mainwindow/tabbedbrowser.py","position":7,"original_position":7,"commit_id":"a47a269e9e0ce3f20714b2b1fd91a17ae0e90e88","original_commit_id":"a47a269e9e0ce3f20714b2b1fd91a17ae0e90e88","user":{"login":"The-Compiler","id":625793,"node_id":"MDQ6VXNlcjYyNTc5Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/625793?v=4","gravatar_id":"","url":"https://api.github.com/users/The-Compiler","html_url":"https://github.com/The-Compiler","followers_url":"https://api.github.com/users/The-Compiler/followers","following_url":"https://api.github.com/users/The-Compiler/following{/other_user}","gists_url":"https://api.github.com/users/The-Compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/The-Compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/The-Compiler/subscriptions","organizations_url":"https://api.github.com/users/The-Compiler/orgs","repos_url":"https://api.github.com/users/The-Compiler/repos","events_url":"https://api.github.com/users/The-Compiler/events{/privacy}","received_events_url":"https://api.github.com/users/The-Compiler/received_events","type":"User","site_admin":false},"body":"Let me elaborate:\r\n\r\n- You only need `str.find` when you really want to know the position of a string in another string - which is very seldom, I don't think I've ever used it actually!\r\n- Instead, the idiomatic way of doing this is `if \"qute://back\" in url_str:`\r\n- However, as @toofar said, if you want whether it starts with it, do `url_str.startswith(\"qute://back\")`\r\n- However, I'd rather get the individual parts from the \"intelligent\" `QUrl` object instead of using string comparisons, which would mean `if (url.scheme(), url.host()) == ('qute', 'back'):`","created_at":"2018-07-25T09:04:58Z","updated_at":"2018-07-25T09:04:58Z","html_url":"https://github.com/qutebrowser/qutebrowser/pull/4092#discussion_r205033898","pull_request_url":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/4092","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/comments/205033898"},"html":{"href":"https://github.com/qutebrowser/qutebrowser/pull/4092#discussion_r205033898"},"pull_request":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/4092"}},"in_reply_to_id":205031094},"pull_request":{"url":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/4092","id":203755364,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNzU1MzY0","html_url":"https://github.com/qutebrowser/qutebrowser/pull/4092","diff_url":"https://github.com/qutebrowser/qutebrowser/pull/4092.diff","patch_url":"https://github.com/qutebrowser/qutebrowser/pull/4092.patch","issue_url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/4092","number":4092,"state":"open","locked":false,"title":"tabbedbrowser.py: Change Suspended tab's indicator color","user":{"login":"SubbulakshmiRS","id":32260751,"node_id":"MDQ6VXNlcjMyMjYwNzUx","avatar_url":"https://avatars3.githubusercontent.com/u/32260751?v=4","gravatar_id":"","url":"https://api.github.com/users/SubbulakshmiRS","html_url":"https://github.com/SubbulakshmiRS","followers_url":"https://api.github.com/users/SubbulakshmiRS/followers","following_url":"https://api.github.com/users/SubbulakshmiRS/following{/other_user}","gists_url":"https://api.github.com/users/SubbulakshmiRS/gists{/gist_id}","starred_url":"https://api.github.com/users/SubbulakshmiRS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SubbulakshmiRS/subscriptions","organizations_url":"https://api.github.com/users/SubbulakshmiRS/orgs","repos_url":"https://api.github.com/users/SubbulakshmiRS/repos","events_url":"https://api.github.com/users/SubbulakshmiRS/events{/privacy}","received_events_url":"https://api.github.com/users/SubbulakshmiRS/received_events","type":"User","site_admin":false},"body":"If the url starts with \"qute://back\",then the indicator\r\ncolor is changed to colors.tab.indicator.suspended\r\n(on_load_finished function) .\r\n\r\nCloses https://github.com/qutebrowser/qutebrowser/issues/3600\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/qutebrowser/qutebrowser/4092)\n<!-- Reviewable:end -->\n","created_at":"2018-07-25T08:13:18Z","updated_at":"2018-07-25T09:04:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"19f614f3a9c223e1a149ba91a13ceb2ce9fedd65","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":134032865,"node_id":"MDU6TGFiZWwxMzQwMzI4NjU=","url":"https://api.github.com/repos/qutebrowser/qutebrowser/labels/component:%20ui","name":"component: ui","color":"0052cc","default":false},{"id":134110621,"node_id":"MDU6TGFiZWwxMzQxMTA2MjE=","url":"https://api.github.com/repos/qutebrowser/qutebrowser/labels/easy","name":"easy","color":"006b75","default":false},{"id":267497034,"node_id":"MDU6TGFiZWwyNjc0OTcwMzQ=","url":"https://api.github.com/repos/qutebrowser/qutebrowser/labels/priority:%202%20-%20low","name":"priority: 2 - low","color":"0e8a16","default":false},{"id":708435425,"node_id":"MDU6TGFiZWw3MDg0MzU0MjU=","url":"https://api.github.com/repos/qutebrowser/qutebrowser/labels/status:%20needs%20review","name":"status: needs review","color":"fef2c0","default":false},{"id":412902921,"node_id":"MDU6TGFiZWw0MTI5MDI5MjE=","url":"https://api.github.com/repos/qutebrowser/qutebrowser/labels/status:%20work%20in%20progress","name":"status: work in progress","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/4092/commits","review_comments_url":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/4092/comments","review_comment_url":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/comments{/number}","comments_url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/4092/comments","statuses_url":"https://api.github.com/repos/qutebrowser/qutebrowser/statuses/a47a269e9e0ce3f20714b2b1fd91a17ae0e90e88","head":{"label":"SubbulakshmiRS:dev","ref":"dev","sha":"a47a269e9e0ce3f20714b2b1fd91a17ae0e90e88","user":{"login":"SubbulakshmiRS","id":32260751,"node_id":"MDQ6VXNlcjMyMjYwNzUx","avatar_url":"https://avatars3.githubusercontent.com/u/32260751?v=4","gravatar_id":"","url":"https://api.github.com/users/SubbulakshmiRS","html_url":"https://github.com/SubbulakshmiRS","followers_url":"https://api.github.com/users/SubbulakshmiRS/followers","following_url":"https://api.github.com/users/SubbulakshmiRS/following{/other_user}","gists_url":"https://api.github.com/users/SubbulakshmiRS/gists{/gist_id}","starred_url":"https://api.github.com/users/SubbulakshmiRS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SubbulakshmiRS/subscriptions","organizations_url":"https://api.github.com/users/SubbulakshmiRS/orgs","repos_url":"https://api.github.com/users/SubbulakshmiRS/repos","events_url":"https://api.github.com/users/SubbulakshmiRS/events{/privacy}","received_events_url":"https://api.github.com/users/SubbulakshmiRS/received_events","type":"User","site_admin":false},"repo":{"id":140056938,"node_id":"MDEwOlJlcG9zaXRvcnkxNDAwNTY5Mzg=","name":"qutebrowser","full_name":"SubbulakshmiRS/qutebrowser","owner":{"login":"SubbulakshmiRS","id":32260751,"node_id":"MDQ6VXNlcjMyMjYwNzUx","avatar_url":"https://avatars3.githubusercontent.com/u/32260751?v=4","gravatar_id":"","url":"https://api.github.com/users/SubbulakshmiRS","html_url":"https://github.com/SubbulakshmiRS","followers_url":"https://api.github.com/users/SubbulakshmiRS/followers","following_url":"https://api.github.com/users/SubbulakshmiRS/following{/other_user}","gists_url":"https://api.github.com/users/SubbulakshmiRS/gists{/gist_id}","starred_url":"https://api.github.com/users/SubbulakshmiRS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SubbulakshmiRS/subscriptions","organizations_url":"https://api.github.com/users/SubbulakshmiRS/orgs","repos_url":"https://api.github.com/users/SubbulakshmiRS/repos","events_url":"https://api.github.com/users/SubbulakshmiRS/events{/privacy}","received_events_url":"https://api.github.com/users/SubbulakshmiRS/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SubbulakshmiRS/qutebrowser","description":"A keyboard-driven, vim-like browser based on PyQt5.","fork":true,"url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser","forks_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/forks","keys_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/teams","hooks_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/hooks","issue_events_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/issues/events{/number}","events_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/events","assignees_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/assignees{/user}","branches_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/branches{/branch}","tags_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/tags","blobs_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/git/refs{/sha}","trees_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/statuses/{sha}","languages_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/languages","stargazers_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/stargazers","contributors_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/contributors","subscribers_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/subscribers","subscription_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/subscription","commits_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/commits{/sha}","git_commits_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/git/commits{/sha}","comments_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/comments{/number}","issue_comment_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/issues/comments{/number}","contents_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/contents/{+path}","compare_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/merges","archive_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/downloads","issues_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/issues{/number}","pulls_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/pulls{/number}","milestones_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/milestones{/number}","notifications_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/labels{/name}","releases_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/releases{/id}","deployments_url":"https://api.github.com/repos/SubbulakshmiRS/qutebrowser/deployments","created_at":"2018-07-07T05:56:39Z","updated_at":"2018-07-25T08:05:08Z","pushed_at":"2018-07-25T08:11:29Z","git_url":"git://github.com/SubbulakshmiRS/qutebrowser.git","ssh_url":"git@github.com:SubbulakshmiRS/qutebrowser.git","clone_url":"https://github.com/SubbulakshmiRS/qutebrowser.git","svn_url":"https://github.com/SubbulakshmiRS/qutebrowser","homepage":"https://www.qutebrowser.org/","size":33734,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"qutebrowser:master","ref":"master","sha":"6fa07703dbf7f3be6f8365be7a4a4adf527e0b41","user":{"login":"qutebrowser","id":21955151,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxOTU1MTUx","avatar_url":"https://avatars1.githubusercontent.com/u/21955151?v=4","gravatar_id":"","url":"https://api.github.com/users/qutebrowser","html_url":"https://github.com/qutebrowser","followers_url":"https://api.github.com/users/qutebrowser/followers","following_url":"https://api.github.com/users/qutebrowser/following{/other_user}","gists_url":"https://api.github.com/users/qutebrowser/gists{/gist_id}","starred_url":"https://api.github.com/users/qutebrowser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qutebrowser/subscriptions","organizations_url":"https://api.github.com/users/qutebrowser/orgs","repos_url":"https://api.github.com/users/qutebrowser/repos","events_url":"https://api.github.com/users/qutebrowser/events{/privacy}","received_events_url":"https://api.github.com/users/qutebrowser/received_events","type":"Organization","site_admin":false},"repo":{"id":21244505,"node_id":"MDEwOlJlcG9zaXRvcnkyMTI0NDUwNQ==","name":"qutebrowser","full_name":"qutebrowser/qutebrowser","owner":{"login":"qutebrowser","id":21955151,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxOTU1MTUx","avatar_url":"https://avatars1.githubusercontent.com/u/21955151?v=4","gravatar_id":"","url":"https://api.github.com/users/qutebrowser","html_url":"https://github.com/qutebrowser","followers_url":"https://api.github.com/users/qutebrowser/followers","following_url":"https://api.github.com/users/qutebrowser/following{/other_user}","gists_url":"https://api.github.com/users/qutebrowser/gists{/gist_id}","starred_url":"https://api.github.com/users/qutebrowser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qutebrowser/subscriptions","organizations_url":"https://api.github.com/users/qutebrowser/orgs","repos_url":"https://api.github.com/users/qutebrowser/repos","events_url":"https://api.github.com/users/qutebrowser/events{/privacy}","received_events_url":"https://api.github.com/users/qutebrowser/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/qutebrowser/qutebrowser","description":"A keyboard-driven, vim-like browser based on PyQt5.","fork":false,"url":"https://api.github.com/repos/qutebrowser/qutebrowser","forks_url":"https://api.github.com/repos/qutebrowser/qutebrowser/forks","keys_url":"https://api.github.com/repos/qutebrowser/qutebrowser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qutebrowser/qutebrowser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qutebrowser/qutebrowser/teams","hooks_url":"https://api.github.com/repos/qutebrowser/qutebrowser/hooks","issue_events_url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/events{/number}","events_url":"https://api.github.com/repos/qutebrowser/qutebrowser/events","assignees_url":"https://api.github.com/repos/qutebrowser/qutebrowser/assignees{/user}","branches_url":"https://api.github.com/repos/qutebrowser/qutebrowser/branches{/branch}","tags_url":"https://api.github.com/repos/qutebrowser/qutebrowser/tags","blobs_url":"https://api.github.com/repos/qutebrowser/qutebrowser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qutebrowser/qutebrowser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qutebrowser/qutebrowser/git/refs{/sha}","trees_url":"https://api.github.com/repos/qutebrowser/qutebrowser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qutebrowser/qutebrowser/statuses/{sha}","languages_url":"https://api.github.com/repos/qutebrowser/qutebrowser/languages","stargazers_url":"https://api.github.com/repos/qutebrowser/qutebrowser/stargazers","contributors_url":"https://api.github.com/repos/qutebrowser/qutebrowser/contributors","subscribers_url":"https://api.github.com/repos/qutebrowser/qutebrowser/subscribers","subscription_url":"https://api.github.com/repos/qutebrowser/qutebrowser/subscription","commits_url":"https://api.github.com/repos/qutebrowser/qutebrowser/commits{/sha}","git_commits_url":"https://api.github.com/repos/qutebrowser/qutebrowser/git/commits{/sha}","comments_url":"https://api.github.com/repos/qutebrowser/qutebrowser/comments{/number}","issue_comment_url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/comments{/number}","contents_url":"https://api.github.com/repos/qutebrowser/qutebrowser/contents/{+path}","compare_url":"https://api.github.com/repos/qutebrowser/qutebrowser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qutebrowser/qutebrowser/merges","archive_url":"https://api.github.com/repos/qutebrowser/qutebrowser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qutebrowser/qutebrowser/downloads","issues_url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues{/number}","pulls_url":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls{/number}","milestones_url":"https://api.github.com/repos/qutebrowser/qutebrowser/milestones{/number}","notifications_url":"https://api.github.com/repos/qutebrowser/qutebrowser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qutebrowser/qutebrowser/labels{/name}","releases_url":"https://api.github.com/repos/qutebrowser/qutebrowser/releases{/id}","deployments_url":"https://api.github.com/repos/qutebrowser/qutebrowser/deployments","created_at":"2014-06-26T14:59:34Z","updated_at":"2018-07-25T05:11:35Z","pushed_at":"2018-07-25T08:56:05Z","git_url":"git://github.com/qutebrowser/qutebrowser.git","ssh_url":"git@github.com:qutebrowser/qutebrowser.git","clone_url":"https://github.com/qutebrowser/qutebrowser.git","svn_url":"https://github.com/qutebrowser/qutebrowser","homepage":"https://www.qutebrowser.org/","size":35949,"stargazers_count":3516,"watchers_count":3516,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":489,"mirror_url":null,"archived":false,"open_issues_count":594,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":489,"open_issues":594,"watchers":3516,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/4092"},"html":{"href":"https://github.com/qutebrowser/qutebrowser/pull/4092"},"issue":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/4092"},"comments":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/4092/comments"},"review_comments":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/4092/comments"},"review_comment":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/4092/commits"},"statuses":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/statuses/a47a269e9e0ce3f20714b2b1fd91a17ae0e90e88"}},"author_association":"NONE"}}
{"actor":{"display_login":"The-Compiler"}}