Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouyx committed Jan 30, 2018
1 parent e28da6c commit 3d118c0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions extensions/amp-a4a/0.1/amp-ad-templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,19 @@ export class AmpAdTemplates {
for (let i = 0; i < analyticsValue.length; i++) {
const config = analyticsValue[i];
const analyticsEle = document.createElement('amp-analytics');
if (config['config']) {
analyticsEle.setAttribute('config', config['config']);
if (config['remote']) {
analyticsEle.setAttribute('config', config['remote']);
}
if (config['type']) {
analyticsEle.setAttribute('type', config['type']);
}
if (config['json']) {
if (config['inline']) {
const scriptElem = createElementWithAttributes(
document,
'script', dict({
'type': 'application/json',
}));
scriptElem.textContent = JSON.stringify(config['json']);
scriptElem.textContent = JSON.stringify(config['inline']);
analyticsEle.appendChild(scriptElem);
}
element.appendChild(analyticsEle);
Expand Down
4 changes: 2 additions & 2 deletions extensions/amp-a4a/0.1/test/test-amp-ad-templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ describes.fakeWin('amp-ad-templates', {amp: true}, env => {
'<p>123</p>';
doc.body.appendChild(parentDiv);
const analytics = [{
'config': 'remoteUrl',
'json': {
'remote': 'remoteUrl',
'inline': {
'requests': 'r',
},
}, {
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-ad-network-adzerk-impl/0.1/data/0
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"height": "92px"
},
"analytics": [{
"json": {
"inline": {
"requests": {
"a": "https://www.fake.com"
},
Expand Down

0 comments on commit 3d118c0

Please sign in to comment.