Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ampproject/amphtml
Browse files Browse the repository at this point in the history
  • Loading branch information
nitzanj committed May 12, 2019
2 parents 42035d1 + e38e621 commit 1b6e0cc
Show file tree
Hide file tree
Showing 397 changed files with 6,708 additions and 3,554 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
script:
- node build-system/pr-check/dist-tests.js
- stage: test
name: "[NON-BLOCKING] Visual Diff Tests"
name: "Visual Diff Tests"
script:
- node build-system/pr-check/visual-diff-tests.js
- stage: test
Expand All @@ -87,8 +87,6 @@ jobs:
allow_failures:
- script:
- node build-system/pr-check/e2e-tests.js
- script:
- node build-system/pr-check/visual-diff-tests.js
cache:
directories:
- node_modules
Expand Down
15 changes: 9 additions & 6 deletions 3p/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import {
userAssert,
} from '../src/log';
import {installEmbedStateListener, manageWin} from './environment';
import {internalRuntimeVersion} from '../src/internal-version';
import {parseJson} from '../src/json';
import {
register,
Expand All @@ -52,10 +53,7 @@ import {
} from './3p';
import {startsWith} from '../src/string.js';
import {urls} from '../src/config';
import {version} from '../src/internal-version';

// Disable auto-sorting of imports from here on.
/* eslint-disable sort-imports-es6-autofix/sort-imports-es6 */

// 3P - please keep in alphabetic order
import {beopinion} from './beopinion';
Expand Down Expand Up @@ -153,6 +151,7 @@ import {gmossp} from '../ads/gmossp';
import {gumgum} from '../ads/gumgum';
import {holder} from '../ads/holder';
import {ibillboard} from '../ads/ibillboard';
import {idealmedia} from '../ads/idealmedia';
import {imaVideo} from '../ads/google/imaVideo';
import {imedia} from '../ads/imedia';
import {imobile} from '../ads/imobile';
Expand All @@ -166,6 +165,7 @@ import {kargo} from '../ads/kargo';
import {kiosked} from '../ads/kiosked';
import {kixer} from '../ads/kixer';
import {kuadio} from '../ads/kuadio';
import {lentainform} from '../ads/lentainform';
import {ligatus} from '../ads/ligatus';
import {lockerdome} from '../ads/lockerdome';
import {loka} from '../ads/loka';
Expand All @@ -176,6 +176,7 @@ import {medianet} from '../ads/medianet';
import {mediavine} from '../ads/mediavine';
import {medyanet} from '../ads/medyanet';
import {meg} from '../ads/meg';
import {mgid} from '../ads/mgid';
import {microad} from '../ads/microad';
import {miximedia} from '../ads/miximedia';
import {mixpo} from '../ads/mixpo';
Expand Down Expand Up @@ -228,6 +229,7 @@ import {smi2} from '../ads/smi2';
import {sogouad} from '../ads/sogouad';
import {sortable} from '../ads/sortable';
import {sovrn} from '../ads/sovrn';
import {speakol} from '../ads/speakol';
import {spotx} from '../ads/spotx';
import {sunmedia} from '../ads/sunmedia';
import {svknative} from '../ads/svknative';
Expand Down Expand Up @@ -265,8 +267,6 @@ import {zedo} from '../ads/zedo';
import {zen} from '../ads/zen';
import {zergnet} from '../ads/zergnet';
import {zucks} from '../ads/zucks';
import {speakol} from '../ads/speakol';


/**
* Whether the embed type may be used with amp-embed tag.
Expand Down Expand Up @@ -393,6 +393,7 @@ register('gmossp', gmossp);
register('gumgum', gumgum);
register('holder', holder);
register('ibillboard', ibillboard);
register('idealmedia', idealmedia);
register('ima-video', imaVideo);
register('imedia', imedia);
register('imobile', imobile);
Expand All @@ -407,6 +408,7 @@ register('kargo', kargo);
register('kiosked', kiosked);
register('kixer', kixer);
register('kuadio', kuadio);
register('lentainform', lentainform);
register('ligatus', ligatus);
register('lockerdome', lockerdome);
register('loka', loka);
Expand All @@ -419,6 +421,7 @@ register('medianet', medianet);
register('mediavine', mediavine);
register('medyanet', medyanet);
register('meg', meg);
register('mgid', mgid);
register('microad', microad);
register('miximedia', miximedia);
register('mixpo', mixpo);
Expand Down Expand Up @@ -769,7 +772,7 @@ export function isTagNameAllowed(type, tagName) {
*/
function lightweightErrorReport(e, isCanary) {
new Image().src = urls.errorReporting +
'?3p=1&v=' + encodeURIComponent(version()) +
'?3p=1&v=' + encodeURIComponent(internalRuntimeVersion()) +
'&m=' + encodeURIComponent(e.message) +
'&ca=' + (isCanary ? 1 : 0) +
'&r=' + encodeURIComponent(document.referrer) +
Expand Down
19 changes: 19 additions & 0 deletions ads/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,13 @@ export const adConfig = {
},

'aja': {
prefetch: [
'https://cdn.as.amanad.adtdp.com/sdk/asot-amp.js',
'https://cdn.as.amanad.adtdp.com/sdk/asot-v2.js',
],
preconnect: [
'https://ad.as.amanad.adtdp.com',
],
},

'appvador': {
Expand Down Expand Up @@ -498,6 +505,10 @@ export const adConfig = {

'ibillboard': {},

'idealmedia': {
renderStartImplemented: false,
},

'imedia': {
prefetch: 'https://i.imedia.cz/js/im3.js',
renderStartImplemented: true,
Expand Down Expand Up @@ -555,6 +566,10 @@ export const adConfig = {

'kuadio': {},

'lentainform': {
renderStartImplemented: false,
},

'ligatus': {
prefetch: 'https://ssl.ligatus.com/render/ligrend.js',
renderStartImplemented: true,
Expand Down Expand Up @@ -628,6 +643,10 @@ export const adConfig = {
renderStartImplemented: true,
},

'mgid': {
renderStartImplemented: false,
},

'microad': {
prefetch: 'https://j.microad.net/js/camp.js',
preconnect: [
Expand Down
26 changes: 10 additions & 16 deletions ads/aja.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,24 @@
* limitations under the License.
*/

import {validateData} from '../3p/3p';
import {loadScript, validateData} from '../3p/3p';

/**
* @param {!Window} global
* @param {!Object} data
*/
export function aja(global, data) {

validateData(data, ['sspCode']);
validateData(data, ['asi']);

(global._aja = global._aja || {
sspCode: data['sspCode'],
});
const {document} = global;
const asi = data['asi'];

const elStyle = global.document.createElement('iframe');
elStyle.setAttribute('id', 'adframe');
elStyle.setAttribute('width', data.width);
elStyle.setAttribute('height', data.height);
elStyle.setAttribute('frameborder', '0');
elStyle.setAttribute('marginheight', '0');
elStyle.setAttribute('marginwidth', '0');
elStyle.setAttribute('allowfullscreen', 'true');
elStyle.setAttribute('scrolling', 'no');
elStyle.src = 'https://static.aja-recommend.com/html/amp.html?ssp_code=' + encodeURIComponent(data['sspCode']);
global.document.body.appendChild(elStyle);
const d = document.createElement('div');
d.dataset['ajaAd'] = '';
d.dataset['ajaAsi'] = asi;
document.getElementById('c').appendChild(d);

loadScript(global, 'https://cdn.as.amanad.adtdp.com/sdk/asot-amp.js');

}
21 changes: 10 additions & 11 deletions ads/aja.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,26 @@ See the License for the specific language governing permissions and
limitations under the License.
-->

# Aja
# AJA

## Example installation of the Aja widget
The AJA Ads for AMP supports Banner, Native, Video, and Recommendation Widget.
You have to contact our account manager to create ad spot at first.

## Examples

### Basic

```html
<amp-ad width="100" height="100"
<amp-ad width="300" height="250"
type="aja"
layout="responsive"
data-ssp-code="ZZZZZ">
data-asi="ZZZZZ">
</amp-ad>
```

The above code must be accompanied by AMP-enabled widgets delivered by Aja’s Account Management Team,
do not directly install this code with existing widgets.


## Configuration

Supported parameters:
Required parameters:

- SSPCODE
- `data-ssp-code`
- asi
- `data-asi`
6 changes: 3 additions & 3 deletions ads/google/a4a/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import {getConsentPolicyState} from '../../../src/consent';
import {getMode} from '../../../src/mode';
import {getOrCreateAdCid} from '../../../src/ad-cid';
import {getTimingDataSync} from '../../../src/service/variable-source';
import {internalRuntimeVersion} from '../../../src/internal-version';
import {parseJson} from '../../../src/json';
import {version} from '../../../src/internal-version';
import {whenUpgradedToCustomElement} from '../../../src/dom';

/** @type {string} */
Expand Down Expand Up @@ -289,7 +289,7 @@ export function googlePageParameters(a4a, startTime) {
'is_amp': a4a.isXhrAllowed() ?
AmpAdImplementation.AMP_AD_XHR_TO_IFRAME_OR_AMP :
AmpAdImplementation.AMP_AD_IFRAME_GET,
'amp_v': version(),
'amp_v': internalRuntimeVersion(),
'd_imp': '1',
'c': getCorrelator(win, ampDoc, clientId),
'ga_cid': win.gaGlobal.cid || null,
Expand Down Expand Up @@ -721,7 +721,7 @@ export function addCsiSignalsToAmpAnalyticsConfig(
`&c=${correlator}&slotId=${slotId}&qqid.${slotId}=${qqid}` +
`&dt=${initTime}` +
(eids != 'null' ? `&e.${slotId}=${eids}` : '') +
`&rls=${version()}&adt.${slotId}=${adType}`;
`&rls=${internalRuntimeVersion()}&adt.${slotId}=${adType}`;
const isAmpSuffix = isVerifiedAmpCreative ? 'Friendly' : 'CrossDomain';
config['triggers']['continuousVisibleIniLoad'] = {
'on': 'ini-load',
Expand Down
63 changes: 0 additions & 63 deletions ads/google/adsense-amp-auto-ads-responsive.js

This file was deleted.

Loading

0 comments on commit 1b6e0cc

Please sign in to comment.