{"action":"created","issue":{"url":"https://api.github.com/repos/philc/vimium/issues/1859","labels_url":"https://api.github.com/repos/philc/vimium/issues/1859/labels{/name}","comments_url":"https://api.github.com/repos/philc/vimium/issues/1859/comments","events_url":"https://api.github.com/repos/philc/vimium/issues/1859/events","html_url":"https://github.com/philc/vimium/pull/1859","id":111984162,"number":1859,"title":"Enable link hints for all elements with `click` listeners","user":{"login":"mrmr1993","id":1847343,"avatar_url":"https://avatars.githubusercontent.com/u/1847343?v=3","gravatar_id":"","url":"https://api.github.com/users/mrmr1993","html_url":"https://github.com/mrmr1993","followers_url":"https://api.github.com/users/mrmr1993/followers","following_url":"https://api.github.com/users/mrmr1993/following{/other_user}","gists_url":"https://api.github.com/users/mrmr1993/gists{/gist_id}","starred_url":"https://api.github.com/users/mrmr1993/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrmr1993/subscriptions","organizations_url":"https://api.github.com/users/mrmr1993/orgs","repos_url":"https://api.github.com/users/mrmr1993/repos","events_url":"https://api.github.com/users/mrmr1993/events{/privacy}","received_events_url":"https://api.github.com/users/mrmr1993/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2015-10-17T20:53:51Z","updated_at":"2016-01-01T05:32:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/philc/vimium/pulls/1859","html_url":"https://github.com/philc/vimium/pull/1859","diff_url":"https://github.com/philc/vimium/pull/1859.diff","patch_url":"https://github.com/philc/vimium/pull/1859.patch"},"body":"This PR is a rebase of #1167 onto current master, and fixes the method used so that\r\n* there are no longer any problems with CSP\r\n* `addEventListener` is always hooked before any page scripts are run.\r\n\r\nThis supersedes #1405, but without dropping any legacy hint conditions as done there.\r\n\r\nFrom #1167:\r\n\r\n> This enables link hint support for clickable elements such as eg. the quiz choices on [this Buzzfeed quiz](http://www.buzzfeed.com/adamellis/this-palm-reading-quiz-will-reveal-your-future#2s6on3d) or the slideshow navigation buttons on the [Mercedes website](http://www5.mercedes-benz.com/en/).\r\n\r\n> This PR\r\n\r\n> * fixes #1091 \r\n> * fixes #993 \r\n> * fixes #861 \r\n> * improves the situation for #1157 (some clickable elements still don't receive link hints).\r\n\r\nEdit: [This JSFiddle](http://jsfiddle.net/p7w9yvsn/2/) is useful for testing."},"comment":{"url":"https://api.github.com/repos/philc/vimium/issues/comments/168285820","html_url":"https://github.com/philc/vimium/pull/1859#issuecomment-168285820","issue_url":"https://api.github.com/repos/philc/vimium/issues/1859","id":168285820,"user":{"login":"gdh1995","id":5547703,"avatar_url":"https://avatars.githubusercontent.com/u/5547703?v=3","gravatar_id":"","url":"https://api.github.com/users/gdh1995","html_url":"https://github.com/gdh1995","followers_url":"https://api.github.com/users/gdh1995/followers","following_url":"https://api.github.com/users/gdh1995/following{/other_user}","gists_url":"https://api.github.com/users/gdh1995/gists{/gist_id}","starred_url":"https://api.github.com/users/gdh1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdh1995/subscriptions","organizations_url":"https://api.github.com/users/gdh1995/orgs","repos_url":"https://api.github.com/users/gdh1995/repos","events_url":"https://api.github.com/users/gdh1995/events{/privacy}","received_events_url":"https://api.github.com/users/gdh1995/received_events","type":"User","site_admin":false},"created_at":"2016-01-01T05:32:24Z","updated_at":"2016-01-01T05:32:24Z","body":"A feature request: add `setTimeout( (-> ElementRegistrar.init()) , 1000)`.\r\n\r\nHere's my problem:\r\n* if the page is too large or loaded too slowly, then DOMContentLoaded may be delayed for seconds\r\n* but I know most page contents have shown, and I want to click something\r\n* However, `ElementRegistrar.init` is still not called, making a few buttons not hintable.\r\n\r\nThis \"race condition\" often occurs when a page requires some javascripts files from other websites - for example, in China `ajax.googleapis.com` can not be visited."}}