{"action":"created","comment":{"url":"https://api.github.com/repos/zurb/foundation-sites/pulls/comments/176923624","pull_request_review_id":106713787,"id":176923624,"diff_hunk":"@@ -146,29 +163,39 @@ class Interchange extends Plugin {\n   replace(path) {\n     if (this.currentPath === path) return;\n \n-    var _this = this,\n-        trigger = 'replaced.zf.interchange';\n+    var trigger = 'replaced.zf.interchange';\n+\n+    var type = this.options.type;\n+    if (type === 'auto') {\n+      if (this.$element[0].nodeName === 'IMG')\n+        type = 'src';\n+      else if (path.match(/\\.(gif|jpg|jpeg|png|svg|tiff)([?#].*)?/i))","path":"js/foundation.interchange.js","position":52,"original_position":52,"commit_id":"494d2847678b90894cfbee55d16ae1f5a67f4e7a","original_commit_id":"494d2847678b90894cfbee55d16ae1f5a67f4e7a","user":{"login":"DanielRuf","id":827205,"avatar_url":"https://avatars1.githubusercontent.com/u/827205?v=4","gravatar_id":"","url":"https://api.github.com/users/DanielRuf","html_url":"https://github.com/DanielRuf","followers_url":"https://api.github.com/users/DanielRuf/followers","following_url":"https://api.github.com/users/DanielRuf/following{/other_user}","gists_url":"https://api.github.com/users/DanielRuf/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielRuf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielRuf/subscriptions","organizations_url":"https://api.github.com/users/DanielRuf/orgs","repos_url":"https://api.github.com/users/DanielRuf/repos","events_url":"https://api.github.com/users/DanielRuf/events{/privacy}","received_events_url":"https://api.github.com/users/DanielRuf/received_events","type":"User","site_admin":false},"body":"`jpe?g` could be also used. But what about webp and other formats?","created_at":"2018-03-24T23:53:40Z","updated_at":"2018-03-24T23:53:40Z","html_url":"https://github.com/zurb/foundation-sites/pull/10884#discussion_r176923624","pull_request_url":"https://api.github.com/repos/zurb/foundation-sites/pulls/10884","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/zurb/foundation-sites/pulls/comments/176923624"},"html":{"href":"https://github.com/zurb/foundation-sites/pull/10884#discussion_r176923624"},"pull_request":{"href":"https://api.github.com/repos/zurb/foundation-sites/pulls/10884"}}},"pull_request":{"url":"https://api.github.com/repos/zurb/foundation-sites/pulls/10884","id":165251503,"html_url":"https://github.com/zurb/foundation-sites/pull/10884","diff_url":"https://github.com/zurb/foundation-sites/pull/10884.diff","patch_url":"https://github.com/zurb/foundation-sites/pull/10884.patch","issue_url":"https://api.github.com/repos/zurb/foundation-sites/issues/10884","number":10884,"state":"open","locked":false,"title":"feat: add \"type\" option to force interchange replacement method #10883","user":{"login":"ncoden","id":9939075,"avatar_url":"https://avatars2.githubusercontent.com/u/9939075?v=4","gravatar_id":"","url":"https://api.github.com/users/ncoden","html_url":"https://github.com/ncoden","followers_url":"https://api.github.com/users/ncoden/followers","following_url":"https://api.github.com/users/ncoden/following{/other_user}","gists_url":"https://api.github.com/users/ncoden/gists{/gist_id}","starred_url":"https://api.github.com/users/ncoden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncoden/subscriptions","organizations_url":"https://api.github.com/users/ncoden/orgs","repos_url":"https://api.github.com/users/ncoden/repos","events_url":"https://api.github.com/users/ncoden/events{/privacy}","received_events_url":"https://api.github.com/users/ncoden/received_events","type":"User","site_admin":false},"body":"Add `type` option to Interchange:\r\n\r\n> type {string} ['auto'] - Type of the responsive ressource to remplace. It can takes the following options:\r\n> - `auto` (default): choose the type according to the element tag or the ressource extention\r\n> - `src`: replace the `[src]` attribute, recommanded for images `<img>`.\r\n> - `background`: replace the `background-image` CSS property.\r\n> - `html`: replace the element content.\r\n\r\n\r\nOthers changes:\r\n* Clean some parts using ES6 features in Interchange\r\n\r\n\r\nCloses https://github.com/zurb/foundation-sites/issues/10883\r\n","created_at":"2018-01-25T23:00:57Z","updated_at":"2018-03-24T23:53:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2e839d7caf45ac1851b68e240744cc5a44e380d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"Owlbertz","id":4280373,"avatar_url":"https://avatars1.githubusercontent.com/u/4280373?v=4","gravatar_id":"","url":"https://api.github.com/users/Owlbertz","html_url":"https://github.com/Owlbertz","followers_url":"https://api.github.com/users/Owlbertz/followers","following_url":"https://api.github.com/users/Owlbertz/following{/other_user}","gists_url":"https://api.github.com/users/Owlbertz/gists{/gist_id}","starred_url":"https://api.github.com/users/Owlbertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Owlbertz/subscriptions","organizations_url":"https://api.github.com/users/Owlbertz/orgs","repos_url":"https://api.github.com/users/Owlbertz/repos","events_url":"https://api.github.com/users/Owlbertz/events{/privacy}","received_events_url":"https://api.github.com/users/Owlbertz/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":425272598,"url":"https://api.github.com/repos/zurb/foundation-sites/labels/Interchange","name":"Interchange","color":"1197eb","default":false},{"id":67281295,"url":"https://api.github.com/repos/zurb/foundation-sites/labels/javascript","name":"javascript","color":"f0db4f","default":false},{"id":172031,"url":"https://api.github.com/repos/zurb/foundation-sites/labels/new%20feature","name":"new feature","color":"bfe5bf","default":false}],"milestone":{"url":"https://api.github.com/repos/zurb/foundation-sites/milestones/35","html_url":"https://github.com/zurb/foundation-sites/milestone/35","labels_url":"https://api.github.com/repos/zurb/foundation-sites/milestones/35/labels","id":2555028,"number":35,"title":"6.6.0","description":"Previously 6.5.0","creator":{"login":"kball","id":44007,"avatar_url":"https://avatars0.githubusercontent.com/u/44007?v=4","gravatar_id":"","url":"https://api.github.com/users/kball","html_url":"https://github.com/kball","followers_url":"https://api.github.com/users/kball/followers","following_url":"https://api.github.com/users/kball/following{/other_user}","gists_url":"https://api.github.com/users/kball/gists{/gist_id}","starred_url":"https://api.github.com/users/kball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kball/subscriptions","organizations_url":"https://api.github.com/users/kball/orgs","repos_url":"https://api.github.com/users/kball/repos","events_url":"https://api.github.com/users/kball/events{/privacy}","received_events_url":"https://api.github.com/users/kball/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":13,"state":"open","created_at":"2017-05-31T23:22:34Z","updated_at":"2018-03-24T20:45:13Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/zurb/foundation-sites/pulls/10884/commits","review_comments_url":"https://api.github.com/repos/zurb/foundation-sites/pulls/10884/comments","review_comment_url":"https://api.github.com/repos/zurb/foundation-sites/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zurb/foundation-sites/issues/10884/comments","statuses_url":"https://api.github.com/repos/zurb/foundation-sites/statuses/494d2847678b90894cfbee55d16ae1f5a67f4e7a","head":{"label":"ncoden:feat/interchange-type-option-10883","ref":"feat/interchange-type-option-10883","sha":"494d2847678b90894cfbee55d16ae1f5a67f4e7a","user":{"login":"ncoden","id":9939075,"avatar_url":"https://avatars2.githubusercontent.com/u/9939075?v=4","gravatar_id":"","url":"https://api.github.com/users/ncoden","html_url":"https://github.com/ncoden","followers_url":"https://api.github.com/users/ncoden/followers","following_url":"https://api.github.com/users/ncoden/following{/other_user}","gists_url":"https://api.github.com/users/ncoden/gists{/gist_id}","starred_url":"https://api.github.com/users/ncoden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncoden/subscriptions","organizations_url":"https://api.github.com/users/ncoden/orgs","repos_url":"https://api.github.com/users/ncoden/repos","events_url":"https://api.github.com/users/ncoden/events{/privacy}","received_events_url":"https://api.github.com/users/ncoden/received_events","type":"User","site_admin":false},"repo":{"id":55187503,"name":"foundation-sites","full_name":"ncoden/foundation-sites","owner":{"login":"ncoden","id":9939075,"avatar_url":"https://avatars2.githubusercontent.com/u/9939075?v=4","gravatar_id":"","url":"https://api.github.com/users/ncoden","html_url":"https://github.com/ncoden","followers_url":"https://api.github.com/users/ncoden/followers","following_url":"https://api.github.com/users/ncoden/following{/other_user}","gists_url":"https://api.github.com/users/ncoden/gists{/gist_id}","starred_url":"https://api.github.com/users/ncoden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncoden/subscriptions","organizations_url":"https://api.github.com/users/ncoden/orgs","repos_url":"https://api.github.com/users/ncoden/repos","events_url":"https://api.github.com/users/ncoden/events{/privacy}","received_events_url":"https://api.github.com/users/ncoden/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ncoden/foundation-sites","description":"The most advanced responsive front-end framework in the world. Quickly create prototypes and production code for sites that work on any kind of device.","fork":true,"url":"https://api.github.com/repos/ncoden/foundation-sites","forks_url":"https://api.github.com/repos/ncoden/foundation-sites/forks","keys_url":"https://api.github.com/repos/ncoden/foundation-sites/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ncoden/foundation-sites/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ncoden/foundation-sites/teams","hooks_url":"https://api.github.com/repos/ncoden/foundation-sites/hooks","issue_events_url":"https://api.github.com/repos/ncoden/foundation-sites/issues/events{/number}","events_url":"https://api.github.com/repos/ncoden/foundation-sites/events","assignees_url":"https://api.github.com/repos/ncoden/foundation-sites/assignees{/user}","branches_url":"https://api.github.com/repos/ncoden/foundation-sites/branches{/branch}","tags_url":"https://api.github.com/repos/ncoden/foundation-sites/tags","blobs_url":"https://api.github.com/repos/ncoden/foundation-sites/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ncoden/foundation-sites/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ncoden/foundation-sites/git/refs{/sha}","trees_url":"https://api.github.com/repos/ncoden/foundation-sites/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ncoden/foundation-sites/statuses/{sha}","languages_url":"https://api.github.com/repos/ncoden/foundation-sites/languages","stargazers_url":"https://api.github.com/repos/ncoden/foundation-sites/stargazers","contributors_url":"https://api.github.com/repos/ncoden/foundation-sites/contributors","subscribers_url":"https://api.github.com/repos/ncoden/foundation-sites/subscribers","subscription_url":"https://api.github.com/repos/ncoden/foundation-sites/subscription","commits_url":"https://api.github.com/repos/ncoden/foundation-sites/commits{/sha}","git_commits_url":"https://api.github.com/repos/ncoden/foundation-sites/git/commits{/sha}","comments_url":"https://api.github.com/repos/ncoden/foundation-sites/comments{/number}","issue_comment_url":"https://api.github.com/repos/ncoden/foundation-sites/issues/comments{/number}","contents_url":"https://api.github.com/repos/ncoden/foundation-sites/contents/{+path}","compare_url":"https://api.github.com/repos/ncoden/foundation-sites/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ncoden/foundation-sites/merges","archive_url":"https://api.github.com/repos/ncoden/foundation-sites/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ncoden/foundation-sites/downloads","issues_url":"https://api.github.com/repos/ncoden/foundation-sites/issues{/number}","pulls_url":"https://api.github.com/repos/ncoden/foundation-sites/pulls{/number}","milestones_url":"https://api.github.com/repos/ncoden/foundation-sites/milestones{/number}","notifications_url":"https://api.github.com/repos/ncoden/foundation-sites/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ncoden/foundation-sites/labels{/name}","releases_url":"https://api.github.com/repos/ncoden/foundation-sites/releases{/id}","deployments_url":"https://api.github.com/repos/ncoden/foundation-sites/deployments","created_at":"2016-03-31T22:37:08Z","updated_at":"2018-03-23T09:07:05Z","pushed_at":"2018-03-24T23:44:26Z","git_url":"git://github.com/ncoden/foundation-sites.git","ssh_url":"git@github.com:ncoden/foundation-sites.git","clone_url":"https://github.com/ncoden/foundation-sites.git","svn_url":"https://github.com/ncoden/foundation-sites","homepage":"http://foundation.zurb.com","size":127701,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"zurb:develop","ref":"develop","sha":"85c4e889ab8b1ab7ebda94fbc723330402191683","user":{"login":"zurb","id":156122,"avatar_url":"https://avatars2.githubusercontent.com/u/156122?v=4","gravatar_id":"","url":"https://api.github.com/users/zurb","html_url":"https://github.com/zurb","followers_url":"https://api.github.com/users/zurb/followers","following_url":"https://api.github.com/users/zurb/following{/other_user}","gists_url":"https://api.github.com/users/zurb/gists{/gist_id}","starred_url":"https://api.github.com/users/zurb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zurb/subscriptions","organizations_url":"https://api.github.com/users/zurb/orgs","repos_url":"https://api.github.com/users/zurb/repos","events_url":"https://api.github.com/users/zurb/events{/privacy}","received_events_url":"https://api.github.com/users/zurb/received_events","type":"Organization","site_admin":false},"repo":{"id":2573058,"name":"foundation-sites","full_name":"zurb/foundation-sites","owner":{"login":"zurb","id":156122,"avatar_url":"https://avatars2.githubusercontent.com/u/156122?v=4","gravatar_id":"","url":"https://api.github.com/users/zurb","html_url":"https://github.com/zurb","followers_url":"https://api.github.com/users/zurb/followers","following_url":"https://api.github.com/users/zurb/following{/other_user}","gists_url":"https://api.github.com/users/zurb/gists{/gist_id}","starred_url":"https://api.github.com/users/zurb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zurb/subscriptions","organizations_url":"https://api.github.com/users/zurb/orgs","repos_url":"https://api.github.com/users/zurb/repos","events_url":"https://api.github.com/users/zurb/events{/privacy}","received_events_url":"https://api.github.com/users/zurb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zurb/foundation-sites","description":"The most advanced responsive front-end framework in the world. Quickly create prototypes and production code for sites that work on any kind of device.","fork":false,"url":"https://api.github.com/repos/zurb/foundation-sites","forks_url":"https://api.github.com/repos/zurb/foundation-sites/forks","keys_url":"https://api.github.com/repos/zurb/foundation-sites/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zurb/foundation-sites/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zurb/foundation-sites/teams","hooks_url":"https://api.github.com/repos/zurb/foundation-sites/hooks","issue_events_url":"https://api.github.com/repos/zurb/foundation-sites/issues/events{/number}","events_url":"https://api.github.com/repos/zurb/foundation-sites/events","assignees_url":"https://api.github.com/repos/zurb/foundation-sites/assignees{/user}","branches_url":"https://api.github.com/repos/zurb/foundation-sites/branches{/branch}","tags_url":"https://api.github.com/repos/zurb/foundation-sites/tags","blobs_url":"https://api.github.com/repos/zurb/foundation-sites/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zurb/foundation-sites/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zurb/foundation-sites/git/refs{/sha}","trees_url":"https://api.github.com/repos/zurb/foundation-sites/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zurb/foundation-sites/statuses/{sha}","languages_url":"https://api.github.com/repos/zurb/foundation-sites/languages","stargazers_url":"https://api.github.com/repos/zurb/foundation-sites/stargazers","contributors_url":"https://api.github.com/repos/zurb/foundation-sites/contributors","subscribers_url":"https://api.github.com/repos/zurb/foundation-sites/subscribers","subscription_url":"https://api.github.com/repos/zurb/foundation-sites/subscription","commits_url":"https://api.github.com/repos/zurb/foundation-sites/commits{/sha}","git_commits_url":"https://api.github.com/repos/zurb/foundation-sites/git/commits{/sha}","comments_url":"https://api.github.com/repos/zurb/foundation-sites/comments{/number}","issue_comment_url":"https://api.github.com/repos/zurb/foundation-sites/issues/comments{/number}","contents_url":"https://api.github.com/repos/zurb/foundation-sites/contents/{+path}","compare_url":"https://api.github.com/repos/zurb/foundation-sites/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zurb/foundation-sites/merges","archive_url":"https://api.github.com/repos/zurb/foundation-sites/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zurb/foundation-sites/downloads","issues_url":"https://api.github.com/repos/zurb/foundation-sites/issues{/number}","pulls_url":"https://api.github.com/repos/zurb/foundation-sites/pulls{/number}","milestones_url":"https://api.github.com/repos/zurb/foundation-sites/milestones{/number}","notifications_url":"https://api.github.com/repos/zurb/foundation-sites/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zurb/foundation-sites/labels{/name}","releases_url":"https://api.github.com/repos/zurb/foundation-sites/releases{/id}","deployments_url":"https://api.github.com/repos/zurb/foundation-sites/deployments","created_at":"2011-10-13T23:05:42Z","updated_at":"2018-03-24T23:29:53Z","pushed_at":"2018-03-24T23:03:30Z","git_url":"git://github.com/zurb/foundation-sites.git","ssh_url":"git@github.com:zurb/foundation-sites.git","clone_url":"https://github.com/zurb/foundation-sites.git","svn_url":"https://github.com/zurb/foundation-sites","homepage":"http://foundation.zurb.com","size":129969,"stargazers_count":27148,"watchers_count":27148,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5801,"mirror_url":null,"archived":false,"open_issues_count":365,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":5801,"open_issues":365,"watchers":27148,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/zurb/foundation-sites/pulls/10884"},"html":{"href":"https://github.com/zurb/foundation-sites/pull/10884"},"issue":{"href":"https://api.github.com/repos/zurb/foundation-sites/issues/10884"},"comments":{"href":"https://api.github.com/repos/zurb/foundation-sites/issues/10884/comments"},"review_comments":{"href":"https://api.github.com/repos/zurb/foundation-sites/pulls/10884/comments"},"review_comment":{"href":"https://api.github.com/repos/zurb/foundation-sites/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zurb/foundation-sites/pulls/10884/commits"},"statuses":{"href":"https://api.github.com/repos/zurb/foundation-sites/statuses/494d2847678b90894cfbee55d16ae1f5a67f4e7a"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"DanielRuf"}}