From 416edceba58f24c1b76d51183166b06890d34361 Mon Sep 17 00:00:00 2001 From: Andrew Sotiriou Date: Wed, 9 Jun 2021 14:11:57 -0400 Subject: [PATCH 1/4] Update all instances of googletagservices gpt url to securepubads gpt url --- docs/api/ReactGPT.md | 2 +- scripts/updateAPIList.js | 2 +- src/Bling.js | 2 +- test/createManager.spec.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api/ReactGPT.md b/docs/api/ReactGPT.md index 3c09344..a885dc0 100644 --- a/docs/api/ReactGPT.md +++ b/docs/api/ReactGPT.md @@ -60,7 +60,7 @@ React GPT makes sure that those APIs are called right before the service is enab Global configuration applies to the all React GPT instances. You can set the following configuration through `Bling.configure(config)`. -* `seedFileUrl` - An optional string for GPT seed file url to override. Default value is `//www.googletagservices.com/tag/js/gpt.js`. +* `seedFileUrl` - An optional string for GPT seed file url to override. Default value is `https://securepubads.g.doubleclick.net/tag/js/gpt.js`. * `renderWhenViewable` - An optional flag to indicate whether an ad should only render when it's fully in the viewport area. Default is `true`. * `viewableThreshold` - An optional number to indicate how much percentage of an ad area needs to be in a viewable area before rendering. Default value is `0.5`. Acceptable range is between `0` and `1.0`. * `filterProps` - An optional function to create an object with filtered current props and next props for a given keys to perform equality check. Default value is [`filterProps`](../../src/utils/filterProps.js). diff --git a/scripts/updateAPIList.js b/scripts/updateAPIList.js index 42d441a..bef8c63 100644 --- a/scripts/updateAPIList.js +++ b/scripts/updateAPIList.js @@ -48,7 +48,7 @@ phantom.create().then(function (ph) { } }); page.open(process.cwd() + "/scripts/empty.html").then(function () { - page.includeJs("http://www.googletagservices.com/tag/js/gpt.js").then(function () { + page.includeJs("https://securepubads.g.doubleclick.net/tag/js/gpt.js").then(function () { setTimeout(function () { page.evaluate(function () { var EXCLUDES = ["constructor"].concat(Object.getOwnPropertyNames(Object.getPrototypeOf({}))); diff --git a/src/Bling.js b/src/Bling.js index c035654..62ab6da 100644 --- a/src/Bling.js +++ b/src/Bling.js @@ -237,7 +237,7 @@ class Bling extends Component { /** * An optional string for GPT seed file url to override. */ - seedFileUrl: "//www.googletagservices.com/tag/js/gpt.js", + seedFileUrl: "//securepubads.g.doubleclick.net/tag/js/gpt.js", /** * An optional flag to indicate whether an ad should only render when it's fully in the viewport area. Default is `true`. */ diff --git a/test/createManager.spec.js b/test/createManager.spec.js index 1e563b2..4861ce7 100644 --- a/test/createManager.spec.js +++ b/test/createManager.spec.js @@ -101,7 +101,7 @@ describe("createManager", () => { it("loads gpt", done => { adManager - .load("//www.googletagservices.com/tag/js/gpt.js") + .load("//securepubads.g.doubleclick.net/tag/js/gpt.js") .then(result => { expect(result).to.be.an("object"); expect(adManager.isLoaded).to.be.true; From 78bd05e1761d4090cae33fe2608db8861bd11b94 Mon Sep 17 00:00:00 2001 From: Andrew Sotiriou Date: Fri, 11 Jun 2021 12:10:59 -0400 Subject: [PATCH 2/4] Add UNSAFE so we can look to update REACT --- examples/apps/routing/app.js | 2 +- src/Bling.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/apps/routing/app.js b/examples/apps/routing/app.js index b792b92..e046b3e 100644 --- a/examples/apps/routing/app.js +++ b/examples/apps/routing/app.js @@ -72,7 +72,7 @@ class AppContainer extends Component { routeComponent: this.routes["/Travel/Europe"].component }; - componentWillMount() { + UNSAFE_componentWillMount() { this.unlisten = this.history.listen(location => { const route = this.routes[location.pathname] || this.routes["/Travel/Europe"]; diff --git a/src/Bling.js b/src/Bling.js index 62ab6da..3827401 100644 --- a/src/Bling.js +++ b/src/Bling.js @@ -406,7 +406,7 @@ class Bling extends Component { .catch(this.onScriptError.bind(this)); } - componentWillReceiveProps(nextProps) { + UNSAFE_componentWillReceiveProps(nextProps) { const {propsEqual} = Bling._config; const {sizeMapping} = this.props; if ( From 2abad7f57147b801311f541c005a9bd27ca2e018 Mon Sep 17 00:00:00 2001 From: Andrew Berry Date: Wed, 16 Feb 2022 13:08:20 -0500 Subject: [PATCH 3/4] update remaining paths; use https to avoid redirect --- src/Bling.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bling.js b/src/Bling.js index 3827401..550c007 100644 --- a/src/Bling.js +++ b/src/Bling.js @@ -237,7 +237,7 @@ class Bling extends Component { /** * An optional string for GPT seed file url to override. */ - seedFileUrl: "//securepubads.g.doubleclick.net/tag/js/gpt.js", + seedFileUrl: "https://securepubads.g.doubleclick.net/tag/js/gpt.js", /** * An optional flag to indicate whether an ad should only render when it's fully in the viewport area. Default is `true`. */ From a9dc9f385081e5c0a8587a62dc6375419ad62075 Mon Sep 17 00:00:00 2001 From: Andrew Berry Date: Wed, 16 Feb 2022 13:08:40 -0500 Subject: [PATCH 4/4] update remaining paths --- test/createManager.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/createManager.spec.js b/test/createManager.spec.js index 4861ce7..071ffb2 100644 --- a/test/createManager.spec.js +++ b/test/createManager.spec.js @@ -113,7 +113,7 @@ describe("createManager", () => { it("uses gpt when already exists", done => { window.googletag = googletag; adManager - .load("//www.googletagservices.com/tag/js/gpt-invalid.js") + .load("//securepubads.g.doubleclick.net/tag/js/gpt-invalid.js") .then(() => { expect(adManager.isLoaded).to.be.true; done(); @@ -132,7 +132,7 @@ describe("createManager", () => { it("handles invalid url", done => { adManager = createManager(); adManager - .load("//www.googletagservices.com/tag/js/gpt-invalid.js") + .load("//securepubads.g.doubleclick.net/tag/js/gpt-invalid.js") .catch(err => { expect(err.message).to.equal("failed to load script"); done();