{"action":"created","comment":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/61887168","id":61887168,"diff_hunk":"@@ -0,0 +1,137 @@\n+/**\n+ * Copyright 2015 The AMP HTML Authors. All Rights Reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the 'License');\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an 'AS-IS' BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+import {loadScript} from '../src/3p';\n+\n+export function nativo(global,data) {\n+\n+  let ntvAd;\n+  (function() {\n+    window\n+      .frames\n+      .location\n+      .hash = window.frames.location.hash.replace(/({).*(})/,'');\n+\n+    ///\n+    // Private\n+    ///\n+    let delayedAdLoad = false,\n+      percentageOfadViewed = undefined;\n+    const loc = window.context.location;","path":"ads/nativo.js","position":33,"original_position":33,"commit_id":"c1c6fbc3a88919c93a80e400f3bff1338e9945a7","original_commit_id":"c1c6fbc3a88919c93a80e400f3bff1338e9945a7","user":{"login":"cramforce","id":89679,"avatar_url":"https://avatars.githubusercontent.com/u/89679?v=3","gravatar_id":"","url":"https://api.github.com/users/cramforce","html_url":"https://github.com/cramforce","followers_url":"https://api.github.com/users/cramforce/followers","following_url":"https://api.github.com/users/cramforce/following{/other_user}","gists_url":"https://api.github.com/users/cramforce/gists{/gist_id}","starred_url":"https://api.github.com/users/cramforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cramforce/subscriptions","organizations_url":"https://api.github.com/users/cramforce/orgs","repos_url":"https://api.github.com/users/cramforce/repos","events_url":"https://api.github.com/users/cramforce/events{/privacy}","received_events_url":"https://api.github.com/users/cramforce/received_events","type":"User","site_admin":false},"body":"Use global instead of window here and elsewhere.","created_at":"2016-05-03T14:11:42Z","updated_at":"2016-05-03T14:11:42Z","html_url":"https://github.com/ampproject/amphtml/pull/2888#discussion_r61887168","pull_request_url":"https://api.github.com/repos/ampproject/amphtml/pulls/2888","_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/61887168"},"html":{"href":"https://github.com/ampproject/amphtml/pull/2888#discussion_r61887168"},"pull_request":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/2888"}}},"pull_request":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/2888","id":66237862,"html_url":"https://github.com/ampproject/amphtml/pull/2888","diff_url":"https://github.com/ampproject/amphtml/pull/2888.diff","patch_url":"https://github.com/ampproject/amphtml/pull/2888.patch","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/2888","number":2888,"state":"open","locked":false,"title":"added NATIVO amp-ad code and integration test","user":{"login":"antnativo","id":17415760,"avatar_url":"https://avatars.githubusercontent.com/u/17415760?v=3","gravatar_id":"","url":"https://api.github.com/users/antnativo","html_url":"https://github.com/antnativo","followers_url":"https://api.github.com/users/antnativo/followers","following_url":"https://api.github.com/users/antnativo/following{/other_user}","gists_url":"https://api.github.com/users/antnativo/gists{/gist_id}","starred_url":"https://api.github.com/users/antnativo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antnativo/subscriptions","organizations_url":"https://api.github.com/users/antnativo/orgs","repos_url":"https://api.github.com/users/antnativo/repos","events_url":"https://api.github.com/users/antnativo/events{/privacy}","received_events_url":"https://api.github.com/users/antnativo/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-12T22:20:29Z","updated_at":"2016-05-03T14:11:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b3857519258f2ea21f11603e890cada514446b9","assignee":{"login":"cramforce","id":89679,"avatar_url":"https://avatars.githubusercontent.com/u/89679?v=3","gravatar_id":"","url":"https://api.github.com/users/cramforce","html_url":"https://github.com/cramforce","followers_url":"https://api.github.com/users/cramforce/followers","following_url":"https://api.github.com/users/cramforce/following{/other_user}","gists_url":"https://api.github.com/users/cramforce/gists{/gist_id}","starred_url":"https://api.github.com/users/cramforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cramforce/subscriptions","organizations_url":"https://api.github.com/users/cramforce/orgs","repos_url":"https://api.github.com/users/cramforce/repos","events_url":"https://api.github.com/users/cramforce/events{/privacy}","received_events_url":"https://api.github.com/users/cramforce/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ampproject/amphtml/pulls/2888/commits","review_comments_url":"https://api.github.com/repos/ampproject/amphtml/pulls/2888/comments","review_comment_url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/2888/comments","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/c1c6fbc3a88919c93a80e400f3bff1338e9945a7","head":{"label":"antnativo:Nativo-AMPHTML-AMP-AD","ref":"Nativo-AMPHTML-AMP-AD","sha":"c1c6fbc3a88919c93a80e400f3bff1338e9945a7","user":{"login":"antnativo","id":17415760,"avatar_url":"https://avatars.githubusercontent.com/u/17415760?v=3","gravatar_id":"","url":"https://api.github.com/users/antnativo","html_url":"https://github.com/antnativo","followers_url":"https://api.github.com/users/antnativo/followers","following_url":"https://api.github.com/users/antnativo/following{/other_user}","gists_url":"https://api.github.com/users/antnativo/gists{/gist_id}","starred_url":"https://api.github.com/users/antnativo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antnativo/subscriptions","organizations_url":"https://api.github.com/users/antnativo/orgs","repos_url":"https://api.github.com/users/antnativo/repos","events_url":"https://api.github.com/users/antnativo/events{/privacy}","received_events_url":"https://api.github.com/users/antnativo/received_events","type":"User","site_admin":false},"repo":{"id":56101410,"name":"amphtml","full_name":"antnativo/amphtml","owner":{"login":"antnativo","id":17415760,"avatar_url":"https://avatars.githubusercontent.com/u/17415760?v=3","gravatar_id":"","url":"https://api.github.com/users/antnativo","html_url":"https://github.com/antnativo","followers_url":"https://api.github.com/users/antnativo/followers","following_url":"https://api.github.com/users/antnativo/following{/other_user}","gists_url":"https://api.github.com/users/antnativo/gists{/gist_id}","starred_url":"https://api.github.com/users/antnativo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antnativo/subscriptions","organizations_url":"https://api.github.com/users/antnativo/orgs","repos_url":"https://api.github.com/users/antnativo/repos","events_url":"https://api.github.com/users/antnativo/events{/privacy}","received_events_url":"https://api.github.com/users/antnativo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/antnativo/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":true,"url":"https://api.github.com/repos/antnativo/amphtml","forks_url":"https://api.github.com/repos/antnativo/amphtml/forks","keys_url":"https://api.github.com/repos/antnativo/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antnativo/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antnativo/amphtml/teams","hooks_url":"https://api.github.com/repos/antnativo/amphtml/hooks","issue_events_url":"https://api.github.com/repos/antnativo/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/antnativo/amphtml/events","assignees_url":"https://api.github.com/repos/antnativo/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/antnativo/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/antnativo/amphtml/tags","blobs_url":"https://api.github.com/repos/antnativo/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antnativo/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antnativo/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/antnativo/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antnativo/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/antnativo/amphtml/languages","stargazers_url":"https://api.github.com/repos/antnativo/amphtml/stargazers","contributors_url":"https://api.github.com/repos/antnativo/amphtml/contributors","subscribers_url":"https://api.github.com/repos/antnativo/amphtml/subscribers","subscription_url":"https://api.github.com/repos/antnativo/amphtml/subscription","commits_url":"https://api.github.com/repos/antnativo/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/antnativo/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/antnativo/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/antnativo/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/antnativo/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/antnativo/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antnativo/amphtml/merges","archive_url":"https://api.github.com/repos/antnativo/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antnativo/amphtml/downloads","issues_url":"https://api.github.com/repos/antnativo/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/antnativo/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/antnativo/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/antnativo/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antnativo/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/antnativo/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/antnativo/amphtml/deployments","created_at":"2016-04-12T22:11:12Z","updated_at":"2016-04-12T22:11:15Z","pushed_at":"2016-05-02T23:06:42Z","git_url":"git://github.com/antnativo/amphtml.git","ssh_url":"git@github.com:antnativo/amphtml.git","clone_url":"https://github.com/antnativo/amphtml.git","svn_url":"https://github.com/antnativo/amphtml","homepage":"https://ampproject.org","size":70590,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"ampproject:master","ref":"master","sha":"d29e1c6d98662d9259fab318cf765094464c2461","user":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars.githubusercontent.com/u/14114390?v=3","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"repo":{"id":41766002,"name":"amphtml","full_name":"ampproject/amphtml","owner":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars.githubusercontent.com/u/14114390?v=3","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ampproject/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":false,"url":"https://api.github.com/repos/ampproject/amphtml","forks_url":"https://api.github.com/repos/ampproject/amphtml/forks","keys_url":"https://api.github.com/repos/ampproject/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ampproject/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ampproject/amphtml/teams","hooks_url":"https://api.github.com/repos/ampproject/amphtml/hooks","issue_events_url":"https://api.github.com/repos/ampproject/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/ampproject/amphtml/events","assignees_url":"https://api.github.com/repos/ampproject/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/ampproject/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/ampproject/amphtml/tags","blobs_url":"https://api.github.com/repos/ampproject/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ampproject/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ampproject/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/ampproject/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/ampproject/amphtml/languages","stargazers_url":"https://api.github.com/repos/ampproject/amphtml/stargazers","contributors_url":"https://api.github.com/repos/ampproject/amphtml/contributors","subscribers_url":"https://api.github.com/repos/ampproject/amphtml/subscribers","subscription_url":"https://api.github.com/repos/ampproject/amphtml/subscription","commits_url":"https://api.github.com/repos/ampproject/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/ampproject/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/ampproject/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/ampproject/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/ampproject/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/ampproject/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ampproject/amphtml/merges","archive_url":"https://api.github.com/repos/ampproject/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ampproject/amphtml/downloads","issues_url":"https://api.github.com/repos/ampproject/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/ampproject/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/ampproject/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/ampproject/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ampproject/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/ampproject/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/ampproject/amphtml/deployments","created_at":"2015-09-01T22:10:53Z","updated_at":"2016-05-03T12:55:48Z","pushed_at":"2016-05-03T14:07:54Z","git_url":"git://github.com/ampproject/amphtml.git","ssh_url":"git@github.com:ampproject/amphtml.git","clone_url":"https://github.com/ampproject/amphtml.git","svn_url":"https://github.com/ampproject/amphtml","homepage":"https://ampproject.org","size":85777,"stargazers_count":7347,"watchers_count":7347,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":963,"mirror_url":null,"open_issues_count":385,"forks":963,"open_issues":385,"watchers":7347,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/2888"},"html":{"href":"https://github.com/ampproject/amphtml/pull/2888"},"issue":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/2888"},"comments":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/2888/comments"},"review_comments":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/2888/comments"},"review_comment":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/2888/commits"},"statuses":{"href":"https://api.github.com/repos/ampproject/amphtml/statuses/c1c6fbc3a88919c93a80e400f3bff1338e9945a7"}}}}