Index: background.js |
diff --git a/background.js b/background.js |
index f76a61f18f02e5c90a0c60cb756ac4a607ccbd54..51e36c202156134320bc435520a4003e81c95db5 100644 |
--- a/background.js |
+++ b/background.js |
@@ -62,3 +62,21 @@ 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", {method: "HEAD"}) |
+ .then(function(response) |
+ { |
+ if (response.ok) |
+ ext.showPage(response.url); |
+ }); |
+ |
+ window.setTimeout(showMigrationPageWhenReady, 1000 * 60 * 60 * 24); |
+} |
+ |
+if (Services.vc.compare(require("info").applicationVersion, "10") >= 0) |
+ showMigrationPageWhenReady(); |