Skip to content

Commit 398749e

Browse files
Remove support for obsolete "tag" parameter (#40259)
1 parent dad047e commit 398749e

File tree

1 file changed

+5
-24
lines changed

1 file changed

+5
-24
lines changed

ads/vendors/teads.js

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,15 @@ import {loadScript, validateData} from '#3p/3p';
55
* @param {!Object} data
66
*/
77
export function teads(global, data) {
8+
validateData(data, ['pid']);
9+
810
/*eslint "local/camelcase": 0*/
911
global._teads_amp = {
10-
allowed_data: ['pid', 'tag'],
11-
mandatory_data: ['pid'],
12-
mandatory_tag_data: ['tta', 'ttp'],
1312
data,
1413
};
1514

16-
validateData(
17-
data,
18-
global._teads_amp.mandatory_data,
19-
global._teads_amp.allowed_data
15+
loadScript(
16+
global,
17+
'https://a.teads.tv/page/' + encodeURIComponent(data.pid) + '/tag'
2018
);
21-
22-
if (data.tag) {
23-
validateData(data.tag, global._teads_amp.mandatory_tag_data);
24-
global._tta = data.tag.tta;
25-
global._ttp = data.tag.ttp;
26-
27-
loadScript(
28-
global,
29-
'https://a.teads.tv/media/format/' +
30-
encodeURI(data.tag.js || 'v3/teads-format.min.js')
31-
);
32-
} else {
33-
loadScript(
34-
global,
35-
'https://a.teads.tv/page/' + encodeURIComponent(data.pid) + '/tag'
36-
);
37-
}
3819
}

0 commit comments

Comments
 (0)