GitHub PullRequestReviewCommentEvent at 2014-12-01 21:46:12
Repository: jetpack
Actor: georgestephanis
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/jetpack/pulls/comments/21122144","id":21122144,"diff_hunk":"@@ -0,0 +1,807 @@\n+/* Jetpack retina support - adding srcest attribute with retina support\n+ * Fallback for non-srcset browsers is done by Detect-Zoom Script\n+ */\n+\n+/* Detect-zoom\n+ * -----------\n+ * Cross Browser Zoom and Pixel Ratio Detector\n+ * Version 1.0.4 | Apr 1 2013\n+ * dual-licensed under the WTFPL and MIT license\n+ * Maintained by https://github.com/tombigel\n+ * Original developer https://github.com/yonran\n+ */\n+\n+//AMD and CommonJS initialization copied from https://github.com/zohararad/audio5js\n+(function (root, ns, factory) {\n+    /*global module, define, detectZoom  */\n+    'use strict';","path":"_inc/jetpack-retina-support.js","position":17,"original_position":17,"commit_id":"f3c3669eb0544fd656878706d4427878def810c0","original_commit_id":"684ef0a9c056a41c65e795b4720f2950f56d7478","user":{"login":"georgestephanis","id":941023,"avatar_url":"https://avatars.githubusercontent.com/u/941023?v=3","gravatar_id":"","url":"https://api.github.com/users/georgestephanis","html_url":"https://github.com/georgestephanis","followers_url":"https://api.github.com/users/georgestephanis/followers","following_url":"https://api.github.com/users/georgestephanis/following{/other_user}","gists_url":"https://api.github.com/users/georgestephanis/gists{/gist_id}","starred_url":"https://api.github.com/users/georgestephanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgestephanis/subscriptions","organizations_url":"https://api.github.com/users/georgestephanis/orgs","repos_url":"https://api.github.com/users/georgestephanis/repos","events_url":"https://api.github.com/users/georgestephanis/events{/privacy}","received_events_url":"https://api.github.com/users/georgestephanis/received_events","type":"User","site_admin":false},"body":"Erm, not what I meant.\r\n\r\nI meant to move the `'use strict';` declaration to the top of the file, which changes its applicability from just this small function it's in to the whole file.","created_at":"2014-12-01T21:46:12Z","updated_at":"2014-12-01T21:46:12Z","html_url":"https://github.com/Automattic/jetpack/pull/1339#discussion_r21122144","pull_request_url":"https://api.github.com/repos/Automattic/jetpack/pulls/1339","_links":{"self":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/comments/21122144"},"html":{"href":"https://github.com/Automattic/jetpack/pull/1339#discussion_r21122144"},"pull_request":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/1339"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/jetpack/pulls/1339","id":25187583,"html_url":"https://github.com/Automattic/jetpack/pull/1339","diff_url":"https://github.com/Automattic/jetpack/pull/1339.diff","patch_url":"https://github.com/Automattic/jetpack/pull/1339.patch","issue_url":"https://api.github.com/repos/Automattic/jetpack/issues/1339","number":1339,"state":"open","locked":false,"title":"Issue 1169 - Implement Picture-element and srcset support into Photon","user":{"login":"barzik","id":3284313,"avatar_url":"https://avatars.githubusercontent.com/u/3284313?v=3","gravatar_id":"","url":"https://api.github.com/users/barzik","html_url":"https://github.com/barzik","followers_url":"https://api.github.com/users/barzik/followers","following_url":"https://api.github.com/users/barzik/following{/other_user}","gists_url":"https://api.github.com/users/barzik/gists{/gist_id}","starred_url":"https://api.github.com/users/barzik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barzik/subscriptions","organizations_url":"https://api.github.com/users/barzik/orgs","repos_url":"https://api.github.com/users/barzik/repos","events_url":"https://api.github.com/users/barzik/events{/privacy}","received_events_url":"https://api.github.com/users/barzik/received_events","type":"User","site_admin":false},"body":"# Adding srcset elements to Photon images\r\n\r\n## issue 1169\r\nSee: https://github.com/Automattic/jetpack/issues/1169\r\n\r\n## Problem\r\nRetina images are being implemented by using devicepx-jetpack.js – in the past it was the best way to determine the user zoom level on every browser. If the user zoom in\\zoom out or has a retina, Jetpack will immediately go to Photon and fetch the correct version of the image for the user’s zoom. The downsize of using this script is a function that runs every second – lead to performance issues. Users complained about it and you can find online several posts of developers about it. Google devicepx-jetpack.js for a lot of examples.\r\n\r\n## General fix details\r\nOriginal WordPress \"devicepx\" hosted file removed and new jetpack-retina-support added. The new file include srcset addition to supported browsers, Fallback is using the original devicepx methods.\r\n\r\n## How to test\r\n* Go with Chrome browser (supports srcset) to a page that use images (in the post itself or in the widgets) see that srcest attributes for zoom 1x,2x,3x,4x are being implemented by JavaScript for Photon, Wordpress.com & Gravatar.\r\n* Go with Firefox browser (not supporting srcset), See that it is loading the appropriate image according to zoom level.\r\n\r\n## Warning\r\nWe are losing functionality here. srcset does not reload the image dynamicly if the user is zooming in or out. ","created_at":"2014-11-28T10:17:44Z","updated_at":"2014-12-01T21:46:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed05bbd9908a0cbaffb37177d4bf527a62318f14","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/jetpack/pulls/1339/commits","review_comments_url":"https://api.github.com/repos/Automattic/jetpack/pulls/1339/comments","review_comment_url":"https://api.github.com/repos/Automattic/jetpack/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Automattic/jetpack/issues/1339/comments","statuses_url":"https://api.github.com/repos/Automattic/jetpack/statuses/f3c3669eb0544fd656878706d4427878def810c0","head":{"label":"barzik:master","ref":"master","sha":"f3c3669eb0544fd656878706d4427878def810c0","user":{"login":"barzik","id":3284313,"avatar_url":"https://avatars.githubusercontent.com/u/3284313?v=3","gravatar_id":"","url":"https://api.github.com/users/barzik","html_url":"https://github.com/barzik","followers_url":"https://api.github.com/users/barzik/followers","following_url":"https://api.github.com/users/barzik/following{/other_user}","gists_url":"https://api.github.com/users/barzik/gists{/gist_id}","starred_url":"https://api.github.com/users/barzik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barzik/subscriptions","organizations_url":"https://api.github.com/users/barzik/orgs","repos_url":"https://api.github.com/users/barzik/repos","events_url":"https://api.github.com/users/barzik/events{/privacy}","received_events_url":"https://api.github.com/users/barzik/received_events","type":"User","site_admin":false},"repo":{"id":27257917,"name":"jetpack","full_name":"barzik/jetpack","owner":{"login":"barzik","id":3284313,"avatar_url":"https://avatars.githubusercontent.com/u/3284313?v=3","gravatar_id":"","url":"https://api.github.com/users/barzik","html_url":"https://github.com/barzik","followers_url":"https://api.github.com/users/barzik/followers","following_url":"https://api.github.com/users/barzik/following{/other_user}","gists_url":"https://api.github.com/users/barzik/gists{/gist_id}","starred_url":"https://api.github.com/users/barzik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barzik/subscriptions","organizations_url":"https://api.github.com/users/barzik/orgs","repos_url":"https://api.github.com/users/barzik/repos","events_url":"https://api.github.com/users/barzik/events{/privacy}","received_events_url":"https://api.github.com/users/barzik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/barzik/jetpack","description":"Your WordPress, Streamlined.","fork":true,"url":"https://api.github.com/repos/barzik/jetpack","forks_url":"https://api.github.com/repos/barzik/jetpack/forks","keys_url":"https://api.github.com/repos/barzik/jetpack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/barzik/jetpack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/barzik/jetpack/teams","hooks_url":"https://api.github.com/repos/barzik/jetpack/hooks","issue_events_url":"https://api.github.com/repos/barzik/jetpack/issues/events{/number}","events_url":"https://api.github.com/repos/barzik/jetpack/events","assignees_url":"https://api.github.com/repos/barzik/jetpack/assignees{/user}","branches_url":"https://api.github.com/repos/barzik/jetpack/branches{/branch}","tags_url":"https://api.github.com/repos/barzik/jetpack/tags","blobs_url":"https://api.github.com/repos/barzik/jetpack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/barzik/jetpack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/barzik/jetpack/git/refs{/sha}","trees_url":"https://api.github.com/repos/barzik/jetpack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/barzik/jetpack/statuses/{sha}","languages_url":"https://api.github.com/repos/barzik/jetpack/languages","stargazers_url":"https://api.github.com/repos/barzik/jetpack/stargazers","contributors_url":"https://api.github.com/repos/barzik/jetpack/contributors","subscribers_url":"https://api.github.com/repos/barzik/jetpack/subscribers","subscription_url":"https://api.github.com/repos/barzik/jetpack/subscription","commits_url":"https://api.github.com/repos/barzik/jetpack/commits{/sha}","git_commits_url":"https://api.github.com/repos/barzik/jetpack/git/commits{/sha}","comments_url":"https://api.github.com/repos/barzik/jetpack/comments{/number}","issue_comment_url":"https://api.github.com/repos/barzik/jetpack/issues/comments/{number}","contents_url":"https://api.github.com/repos/barzik/jetpack/contents/{+path}","compare_url":"https://api.github.com/repos/barzik/jetpack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/barzik/jetpack/merges","archive_url":"https://api.github.com/repos/barzik/jetpack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/barzik/jetpack/downloads","issues_url":"https://api.github.com/repos/barzik/jetpack/issues{/number}","pulls_url":"https://api.github.com/repos/barzik/jetpack/pulls{/number}","milestones_url":"https://api.github.com/repos/barzik/jetpack/milestones{/number}","notifications_url":"https://api.github.com/repos/barzik/jetpack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/barzik/jetpack/labels{/name}","releases_url":"https://api.github.com/repos/barzik/jetpack/releases{/id}","created_at":"2014-11-28T08:22:36Z","updated_at":"2014-12-01T20:47:21Z","pushed_at":"2014-12-01T20:47:21Z","git_url":"git://github.com/barzik/jetpack.git","ssh_url":"git@github.com:barzik/jetpack.git","clone_url":"https://github.com/barzik/jetpack.git","svn_url":"https://github.com/barzik/jetpack","homepage":"http://jetpack.me","size":68565,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"06ba7c9c536f32bf0e6ff3470f6c3e51958b6ec4","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":15231212,"name":"jetpack","full_name":"Automattic/jetpack","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/jetpack","description":"Your WordPress, Streamlined.","fork":false,"url":"https://api.github.com/repos/Automattic/jetpack","forks_url":"https://api.github.com/repos/Automattic/jetpack/forks","keys_url":"https://api.github.com/repos/Automattic/jetpack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/jetpack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/jetpack/teams","hooks_url":"https://api.github.com/repos/Automattic/jetpack/hooks","issue_events_url":"https://api.github.com/repos/Automattic/jetpack/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/jetpack/events","assignees_url":"https://api.github.com/repos/Automattic/jetpack/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/jetpack/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/jetpack/tags","blobs_url":"https://api.github.com/repos/Automattic/jetpack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/jetpack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/jetpack/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/jetpack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/jetpack/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/jetpack/languages","stargazers_url":"https://api.github.com/repos/Automattic/jetpack/stargazers","contributors_url":"https://api.github.com/repos/Automattic/jetpack/contributors","subscribers_url":"https://api.github.com/repos/Automattic/jetpack/subscribers","subscription_url":"https://api.github.com/repos/Automattic/jetpack/subscription","commits_url":"https://api.github.com/repos/Automattic/jetpack/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/jetpack/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/jetpack/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/jetpack/issues/comments/{number}","contents_url":"https://api.github.com/repos/Automattic/jetpack/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/jetpack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/jetpack/merges","archive_url":"https://api.github.com/repos/Automattic/jetpack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/jetpack/downloads","issues_url":"https://api.github.com/repos/Automattic/jetpack/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/jetpack/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/jetpack/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/jetpack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/jetpack/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/jetpack/releases{/id}","created_at":"2013-12-16T16:43:01Z","updated_at":"2014-12-01T14:13:16Z","pushed_at":"2014-12-01T16:25:24Z","git_url":"git://github.com/Automattic/jetpack.git","ssh_url":"git@github.com:Automattic/jetpack.git","clone_url":"https://github.com/Automattic/jetpack.git","svn_url":"https://github.com/Automattic/jetpack","homepage":"http://jetpack.me","size":68565,"stargazers_count":248,"watchers_count":248,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":177,"mirror_url":null,"open_issues_count":415,"forks":177,"open_issues":415,"watchers":248,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/1339"},"html":{"href":"https://github.com/Automattic/jetpack/pull/1339"},"issue":{"href":"https://api.github.com/repos/Automattic/jetpack/issues/1339"},"comments":{"href":"https://api.github.com/repos/Automattic/jetpack/issues/1339/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/1339/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/1339/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/jetpack/statuses/f3c3669eb0544fd656878706d4427878def810c0"}}}}