| Index: background.js |
| diff --git a/background.js b/background.js |
| index f76a61f18f02e5c90a0c60cb756ac4a607ccbd54..49d1a4658a11e4e4a3c322d07e91e339fc1dfc7e 100644 |
| --- a/background.js |
| +++ b/background.js |
| @@ -62,3 +62,24 @@ port.on("forward", function(msg, sender) |
| targetPage.sendMessage(msg.payload); |
| } |
| }); |
| + |
| +// Display a page to explain to users of Safari 10 and higher that they need |
| +// to migrate to our Safari App extension, but only once the migration page |
| +// is online. |
| + |
| +function showMigrationPageWhenReady() |
| +{ |
| + fetch("https://eyeo.to/adblockplus/safari-app-extension-migration") |
|
Sebastian Noack
2018/07/13 18:01:35
I wonder, should we perhaps just send a HEAD reque
kzar
2018/07/13 18:44:04
Done.
|
| + .then(function(response) |
| + { |
| + if (response.ok) |
| + ext.showPage(response.url); |
| + }); |
| +} |
| + |
| +if (Services.vc.compare(require("info").applicationVersion, "10") >= 0) |
| +{ |
| + // Show now, and then once every 24 hours. |
| + showMigrationPageWhenReady(); |
| + window.setInterval(showMigrationPageWhenReady, 1000 * 60 * 60 * 24); |
|
Sebastian Noack
2018/07/13 18:01:35
As far as I understand the issue description, we o
kzar
2018/07/13 18:44:04
I've adjusted the issue description to clarify.
|
| +} |