{"action":"created","issue":{"url":"https://api.github.com/repos/kibu-australia/pushy/issues/7","labels_url":"https://api.github.com/repos/kibu-australia/pushy/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/kibu-australia/pushy/issues/7/comments","events_url":"https://api.github.com/repos/kibu-australia/pushy/issues/7/events","html_url":"https://github.com/kibu-australia/pushy/issues/7","id":103445979,"number":7,"title":"Better handling / differentiating with external links","user":{"login":"ricardojmendez","id":31263,"avatar_url":"https://avatars.githubusercontent.com/u/31263?v=3","gravatar_id":"","url":"https://api.github.com/users/ricardojmendez","html_url":"https://github.com/ricardojmendez","followers_url":"https://api.github.com/users/ricardojmendez/followers","following_url":"https://api.github.com/users/ricardojmendez/following{/other_user}","gists_url":"https://api.github.com/users/ricardojmendez/gists{/gist_id}","starred_url":"https://api.github.com/users/ricardojmendez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricardojmendez/subscriptions","organizations_url":"https://api.github.com/users/ricardojmendez/orgs","repos_url":"https://api.github.com/users/ricardojmendez/repos","events_url":"https://api.github.com/users/ricardojmendez/events{/privacy}","received_events_url":"https://api.github.com/users/ricardojmendez/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-27T07:32:17Z","updated_at":"2015-08-30T02:35:06Z","closed_at":"2015-08-30T02:35:06Z","body":"Pushy right now is not differentiating between links internal to the application that could indicate an action that needs dispatching (say, _/user/123_) and external links pointing to a different site. (_http://someothersite/userprofile/456_). \r\n\r\nIn both cases, pushy would look at the path and try to handle it with the `dispatch-fn`, but since the function gets only the path and not the root, we can't differentiate ourselves.\r\n\r\nAllow us to indicate which URLs pushy should handle.  A straightforward option would be with a regular expression that the _href_ gets matched against when deciding if the link should be bypassed. That would allow a user to filter out all links where, for example, the full URL isn't a relative path starting with **/**.\r\n\r\nFor anyone running into this issue, a workaround right now seems to be be adding the external links as targeting _blank."},"comment":{"url":"https://api.github.com/repos/kibu-australia/pushy/issues/comments/136073539","html_url":"https://github.com/kibu-australia/pushy/issues/7#issuecomment-136073539","issue_url":"https://api.github.com/repos/kibu-australia/pushy/issues/7","id":136073539,"user":{"login":"wavejumper","id":1384090,"avatar_url":"https://avatars.githubusercontent.com/u/1384090?v=3","gravatar_id":"","url":"https://api.github.com/users/wavejumper","html_url":"https://github.com/wavejumper","followers_url":"https://api.github.com/users/wavejumper/followers","following_url":"https://api.github.com/users/wavejumper/following{/other_user}","gists_url":"https://api.github.com/users/wavejumper/gists{/gist_id}","starred_url":"https://api.github.com/users/wavejumper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wavejumper/subscriptions","organizations_url":"https://api.github.com/users/wavejumper/orgs","repos_url":"https://api.github.com/users/wavejumper/repos","events_url":"https://api.github.com/users/wavejumper/events{/privacy}","received_events_url":"https://api.github.com/users/wavejumper/received_events","type":"User","site_admin":false},"created_at":"2015-08-30T02:35:05Z","updated_at":"2015-08-30T02:35:05Z","body":"Unfortunately it is difficult to pass the full URL to the dispatch function because of the way I am using goog.HTML5History for push state (eg when you mutate the history stack, the token transformer returns  a relative path which is what gets passed to the dispatch function).\r\n\r\nI have simply added an optional arg to the constructor `:processable-url?` which is a predicate function which gets passed an instance of `goog.Uri`. \r\n\r\nBy default pushy will dispatch on relative paths + absolute URLs that match the windows origin."}}