-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Add amp-embed type=24smi #12029
Add amp-embed type=24smi #12029
Conversation
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! |
CLAs look good, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the Pull Request. Looks good in general. Few requests.
* @param {!Window} global | ||
* @param {!Object} data | ||
*/ | ||
export function _24smi(global, data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please name the function 24smi
instead. It's much easier for use to maintain code by using same name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be syntax error if I'll remove underscore, because identifiers cannot start by digit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh, you're right! I guess we can live with the non-match here : )
ads/_config.js
Outdated
@@ -53,6 +53,13 @@ let AdNetworkConfigDef; | |||
* @const {!Object<string, !AdNetworkConfigDef>}} | |||
*/ | |||
export const adConfig = { | |||
'24smi': { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: 24smi
should come after _ping_
ads/_config.js
Outdated
@@ -53,6 +53,13 @@ let AdNetworkConfigDef; | |||
* @const {!Object<string, !AdNetworkConfigDef>}} | |||
*/ | |||
export const adConfig = { | |||
'24smi': { | |||
prefetch: 'https://jsn.24smi.net/smi.js', | |||
preconnect: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: no need to have an array for single preconnect url.
3p/integration.js
Outdated
@@ -209,6 +210,7 @@ import {zucks} from '../ads/zucks'; | |||
* @const {!Object<string, boolean>} | |||
*/ | |||
const AMP_EMBED_ALLOWED = { | |||
'24smi': true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: please fix order
Thanks for the review. I fixed all the problems except function name in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with two more requests. Thanks
* @param {!Window} global | ||
* @param {!Object} data | ||
*/ | ||
export function _24smi(global, data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh, you're right! I guess we can live with the non-match here : )
ads/24smi.md
Outdated
For semantics of configuration, please contact [24smi](https://partner.24smi.info). | ||
|
||
Required parameters: | ||
- data-src |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: src
instead.
3p/integration.js
Outdated
@@ -68,6 +68,7 @@ import {twitter} from './twitter'; | |||
|
|||
// 3P Ad Networks - please keep in alphabetic order | |||
import {_ping_} from '../ads/_ping_'; | |||
import {_24smi} from '../ads/24smi'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one minor request here: Since _24smi
should come before _ping
in alphabetic order. Can we move the _ping_
(for test purpose) above the comment. Should be
import {_ping_} from '../ads/_ping_';
// comments
import {_24smi}...
Done :) |
Looks great! Merged. Thanks for the Pull Request. |
Add support for 24smi widgets.