Skip to content

Kiosked ads#7049

Merged
lannka merged 12 commits intoampproject:masterfrom
EdvardKarvinen:kiosked-ads
Feb 15, 2017
Merged

Kiosked ads#7049
lannka merged 12 commits intoampproject:masterfrom
EdvardKarvinen:kiosked-ads

Conversation

@EdvardKarvinen
Copy link
Copy Markdown
Contributor

Ads extension to show ads from Kiosked

@googlebot
Copy link
Copy Markdown

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
Copy Markdown
Contributor Author

EdvardKarvinen commented Jan 16, 2017 via email

@googlebot
Copy link
Copy Markdown

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
Copy Markdown

CLAs look good, thanks!

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

/to @lannka

@lannka
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

@lannka render-start implemented

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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?


<h2 id="kiosked">Kiosked</h2>
<amp-ad width="300" height="250"
type="kiosked"
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

Ping @lannka.

@jridgewell jridgewell requested a review from zhouyx February 14, 2017 19:26
@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.

7 participants