Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into highlightcolor
- Loading branch information
Showing
154 changed files
with
4,008 additions
and
1,176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/** | ||
* Copyright 2015 The AMP HTML Authors. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS-IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import { | ||
loadScript, | ||
validateData, | ||
} from '../3p/3p'; | ||
|
||
/** | ||
* @param {!Window} global | ||
* @param {!Object} data | ||
*/ | ||
export function baidu(global, data) { | ||
validateData(data, ['cproid']); | ||
|
||
const id = '_' + Math.random().toString(36).slice(2); | ||
const container = global.document.createElement('div'); | ||
container.id = id; | ||
global.document.getElementById('c').appendChild(container); | ||
|
||
global.slotbydup = global.slotbydup || []; | ||
global.slotbydup.push({ | ||
id: data['cproid'], | ||
container: id, | ||
display: 'inlay-fix', | ||
async: true, | ||
}); | ||
|
||
global.addEventListener('message', () => { | ||
global.context.renderStart(); | ||
}); | ||
|
||
loadScript( | ||
global, | ||
'https://dup.baidustatic.com/js/dm.js', | ||
() => {}, | ||
() => { | ||
// noContentAvailable should be called, | ||
// if parent iframe receives no message. | ||
// setTimeout can work, but it's not that reliable. | ||
// So, only the faliure of JS loading is dealed with for now. | ||
global.context.noContentAvailable(); | ||
} | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!--- | ||
Copyright 2016 The AMP HTML Authors. All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS-IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
# Baidu | ||
|
||
## Example | ||
|
||
```html | ||
<amp-ad width="300" height="250" | ||
type="baidu" | ||
data-cproid="{cproid}"> | ||
</amp-ad> | ||
``` | ||
|
||
## Configuration | ||
|
||
For additional detials and support, see [baidu ad union website](http://union.baidu.com/product/prod-cpro.html). | ||
|
||
### Required Parameters | ||
|
||
* `data-cproid` - baidu union ad id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* Copyright 2018 The AMP HTML Authors. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS-IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import {loadScript, validateData} from '../3p/3p'; | ||
|
||
/** | ||
* @param {!Window} global | ||
* @param {!Object} data | ||
*/ | ||
export function freewheel(global, data) { | ||
/*eslint "google-camelcase/google-camelcase": 0*/ | ||
global._freewheel_amp = { | ||
data, | ||
}; | ||
|
||
validateData( | ||
data, | ||
['zone'], | ||
['zone','gdpr','gdpr_consent','useCMP','zIndex','blurDisplay', | ||
'timeline','soundButton','defaultMute','onOver','closeAction', | ||
'errorAction','pauseRatio','label','vastUrlParams'] | ||
); | ||
|
||
loadScript(global, 'https://cdn.stickyadstv.com/prime-time/fw-amp.min.js'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<!--- | ||
Copyright 2018 The AMP HTML Authors. All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS-IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
# FreeWheel | ||
|
||
## Example | ||
|
||
### Expand-banner | ||
|
||
```html | ||
<amp-ad width="300" height="250" | ||
type="freewheel" | ||
data-zone="2003" | ||
layout="responsive"> | ||
</amp-ad> | ||
``` | ||
|
||
### FloorAd | ||
|
||
```html | ||
<amp-sticky-ad layout=”nodisplay”> | ||
<amp-ad width="350" height="150" | ||
type="freewheel" | ||
data-zone="2003"> | ||
</amp-ad> | ||
</amp-sticky-ad> | ||
``` | ||
|
||
## Configuration | ||
|
||
For details on the configuration semantics, please contact the FreeWheel support team : clientsidesdk@freewheel.tv | ||
|
||
Supported parameters: | ||
All parameters are optional, unless otherwise stated | ||
- `data-zone` [required] | ||
- `data-blurDisplay` | ||
- `data-timeline` | ||
- `data-soundButton` | ||
- `data-defaultMute` | ||
- `data-onOver` | ||
- `data-closeAction` | ||
- `data-errorAction` | ||
- `data-pauseRatio` | ||
- `data-label` | ||
- `data-vastUrlParams` | ||
- `data-gdpr` | ||
- `data-gdpr_consent` | ||
- `data-useCMP` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.