Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kiosked ads #7049

Merged
merged 12 commits into from Feb 15, 2017
Merged

Kiosked ads #7049

merged 12 commits into from Feb 15, 2017

Conversation

EdvardKarvinen
Copy link
Contributor

Ads extension to show ads from Kiosked

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@EdvardKarvinen
Copy link
Contributor Author

EdvardKarvinen commented Jan 16, 2017 via email

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

@googlebot
Copy link

CLAs look good, thanks!

@aghassemi aghassemi requested a review from lannka January 17, 2017 18:10
@aghassemi
Copy link
Contributor

/to @lannka

@lannka
Copy link
Contributor

lannka commented Jan 25, 2017

@EdvardKarvinen would you try to follow the guide and implement the render-start API?

@lannka lannka self-assigned this Jan 25, 2017
@EdvardKarvinen
Copy link
Contributor Author

@lannka render-start implemented

Copy link
Contributor

@lannka lannka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with some minor comments

if (data.hasOwnProperty('scriptid')) {
scriptId = data['scriptid'];
}
window.addEventListener('kioskedAdRender', function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be able to do

window.addEventListener('kioskedAdRender', global.context.renderStart, false)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If i do that, it will give an error:
Uncaught DOMException: Failed to execute 'postMessage' on 'Window': An object could not be cloned.

global.context.noContentAvailable();
}, false);

writeScript(global, 'https://scripts.kiosked.com/loader/kiosked-ad.js?staticTagId=' + scriptId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can take advantage of preconnect in config

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how can I preconnect in config file if URL needs scriptId parameter?

@@ -787,6 +789,14 @@ <h2 id="kargo">Kargo</h2>
<div fallback></div>
</amp-ad>

<h2 id="kiosked">Kiosked</h2>
<amp-ad width="300" height="250"
type="kiosked"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls follow the indentation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed and commited

@jridgewell
Copy link
Contributor

Ping @lannka.

@lannka lannka merged commit 76749a0 into ampproject:master Feb 15, 2017
mrjoro pushed a commit to mrjoro/amphtml that referenced this pull request Apr 28, 2017
* Kiosked ads

* Indentation fix

* lint error fix

* lint error fix

* lint error fix

* ads.amp.html script fix

* readme file change

* implemented renderStart API for Kiosked plugin

* indentation changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants