Skip to content

Commit

Permalink
Add deprecation notice to 3p iframe f.js (#35350)
Browse files Browse the repository at this point in the history
  • Loading branch information
powerivq authored Jul 23, 2021
1 parent ec65363 commit 22cf894
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions 3p/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import './polyfills';
import {draw3p, init} from './integration-lib';
import {getMode} from '../src/mode';
import {register} from './3p';
import {user} from 'src/log';

// 3P - please keep in alphabetic order
import {beopinion} from './beopinion';
Expand Down Expand Up @@ -311,6 +312,11 @@ import {zen} from '#ads/vendors/zen';
import {zergnet} from '#ads/vendors/zergnet';
import {zucks} from '#ads/vendors/zucks';

user().warn(
'3P-IFRAME',
'f.js in iframe is being deprecated (see https://github.com/ampproject/amphtml/issues/35349 for details)'
);

init(window);

if (getMode().test || getMode().localDev) {
Expand Down
2 changes: 1 addition & 1 deletion 3p/remote.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(function() {
var v = location.search.substr(1);
if (!(/^\d+(-canary)?$/.test(v))) return;
var u = 'https://3p.ampproject.net/'+encodeURIComponent(v)+'/f.js';
var u = 'https://3p.ampproject.net/'+encodeURIComponent(v)+'/_ping_.js'; // Replace _ping_ with the vendor you wish to use
document.write('<script'+' src="'+encodeURI(u)+'"><'+'/script>'); // lgtm [js/eval-like-call]
})();
</script>
Expand Down

0 comments on commit 22cf894

Please sign in to comment.