{"action":"created","issue":{"url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/3806","repository_url":"https://api.github.com/repos/qutebrowser/qutebrowser","labels_url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/3806/labels{/name}","comments_url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/3806/comments","events_url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/3806/events","html_url":"https://github.com/qutebrowser/qutebrowser/pull/3806","id":310848701,"number":3806,"title":"Add hints.selectors setting","user":{"login":"olmokramer","id":3612514,"avatar_url":"https://avatars1.githubusercontent.com/u/3612514?v=4","gravatar_id":"","url":"https://api.github.com/users/olmokramer","html_url":"https://github.com/olmokramer","followers_url":"https://api.github.com/users/olmokramer/followers","following_url":"https://api.github.com/users/olmokramer/following{/other_user}","gists_url":"https://api.github.com/users/olmokramer/gists{/gist_id}","starred_url":"https://api.github.com/users/olmokramer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olmokramer/subscriptions","organizations_url":"https://api.github.com/users/olmokramer/orgs","repos_url":"https://api.github.com/users/olmokramer/repos","events_url":"https://api.github.com/users/olmokramer/events{/privacy}","received_events_url":"https://api.github.com/users/olmokramer/received_events","type":"User","site_admin":false},"labels":[{"id":143246648,"url":"https://api.github.com/repos/qutebrowser/qutebrowser/labels/component:%20hints","name":"component: hints","color":"0052cc","default":false},{"id":134110621,"url":"https://api.github.com/repos/qutebrowser/qutebrowser/labels/easy","name":"easy","color":"006b75","default":false},{"id":267497034,"url":"https://api.github.com/repos/qutebrowser/qutebrowser/labels/priority:%202%20-%20low","name":"priority: 2 - low","color":"0e8a16","default":false},{"id":708435425,"url":"https://api.github.com/repos/qutebrowser/qutebrowser/labels/status:%20needs%20review","name":"status: needs review","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-04-03T13:58:42Z","updated_at":"2018-04-22T11:49:37Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/3806","html_url":"https://github.com/qutebrowser/qutebrowser/pull/3806","diff_url":"https://github.com/qutebrowser/qutebrowser/pull/3806.diff","patch_url":"https://github.com/qutebrowser/qutebrowser/pull/3806.patch"},"body":"Make it possible for users to configure the CSS selectors that are used to determine which elements on the page should be hinted with the `hints.selectors` setting. The setting supports patterns, i.e. is configurable on a per-domain basis. As discussed below with @jgkamat I have removed `webelem.SELECTORS`, the default selectors are now defined in `configdata.yml`, so users can also remove selectors on specific pages if they want to. It is also possible to add additional groups to the setting dict, that can be used with the `:hint` command, for example:\r\n\r\n```python\r\nconfig.set('hints.selectors', {\r\n    'expando': ['.expando-button'],\r\n}, '*://*.reddit.com/*')\r\n```\r\n\r\nmakes the expando buttons on reddit hintable with `:hint expando`. When a dict is set for the current domain (like with the command above) but the riekwested group isn't configured for this domain, the implementation first falls back to the global setting before it throws an error that the group doesn't exist.\r\n\r\nTODO:\r\n\r\n- [ ] Tests:\r\n  - [ ] Add tests for the new behavior. Didn't really know where to start though.\r\n  - [x] Fix tests that relied on `webelem.SELECTORS` or `webelem.Group`.\r\n- [x] Documentation.\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/qutebrowser/qutebrowser/3806)\r\n<!-- Reviewable:end -->\r\n\r\n[edit by @jgkamat to link problemen: Closes #2773]\r\n"},"comment":{"url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/comments/383375805","html_url":"https://github.com/qutebrowser/qutebrowser/pull/3806#issuecomment-383375805","issue_url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/3806","id":383375805,"user":{"login":"olmokramer","id":3612514,"avatar_url":"https://avatars1.githubusercontent.com/u/3612514?v=4","gravatar_id":"","url":"https://api.github.com/users/olmokramer","html_url":"https://github.com/olmokramer","followers_url":"https://api.github.com/users/olmokramer/followers","following_url":"https://api.github.com/users/olmokramer/following{/other_user}","gists_url":"https://api.github.com/users/olmokramer/gists{/gist_id}","starred_url":"https://api.github.com/users/olmokramer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olmokramer/subscriptions","organizations_url":"https://api.github.com/users/olmokramer/orgs","repos_url":"https://api.github.com/users/olmokramer/repos","events_url":"https://api.github.com/users/olmokramer/events{/privacy}","received_events_url":"https://api.github.com/users/olmokramer/received_events","type":"User","site_admin":false},"created_at":"2018-04-22T11:49:37Z","updated_at":"2018-04-22T11:49:37Z","author_association":"CONTRIBUTOR","body":"@mschilli87 Oops! :flushed: At least I learned a valuable lesson to read file headers :wink:"}}
{"actor":{"display_login":"olmokramer"}}