Index: messageResponder.js |
=================================================================== |
--- a/messageResponder.js |
+++ b/messageResponder.js |
@@ -138,17 +138,26 @@ |
var subscription = Subscription.fromURL(message.url); |
subscription.title = message.title; |
onFilterChange("addSubscription", subscription); |
}); |
break; |
case "app.get": |
if (message.what == "issues") |
{ |
- var subscriptionInit = require("subscriptionInit"); |
+ var subscriptionInit; |
+ try |
+ { |
+ subscriptionInit = require("subscriptionInit"); |
+ } |
+ catch (e) |
+ { |
+ // Expected exception, this module doesn't exist on Firefox |
+ } |
+ |
var info = require("info"); |
callback({ |
filterlistsReinitialized: subscriptionInit ? subscriptionInit.reinitialized : false, |
legacySafariVersion: (info.platform == "safari" && ( |
Services.vc.compare(info.platformVersion, "6.0") < 0 || // beforeload breaks websites in Safari 5 |
Services.vc.compare(info.platformVersion, "6.1") == 0 || // extensions are broken in 6.1 and 7.0 |
Services.vc.compare(info.platformVersion, "7.0") == 0)) |
}); |
@@ -350,17 +359,17 @@ |
subscription.title = message.title; |
subscription.homepage = message.homepage; |
FilterStorage.addSubscription(subscription); |
if (!subscription.lastDownload) |
Synchronizer.execute(subscription); |
} |
break; |
case "subscriptions.update": |
- var subscriptions = message.url ? [Subscription.fromURL(message.url)] : |
+ var subscriptions = message.url ? [Subscription.fromURL(message.url)] : |
Sebastian Noack
2016/03/16 13:47:45
What is the change here?
Anyway, LGTM.
Wladimir Palant
2016/03/16 13:57:49
Trailing whitespace removed, my editor does this a
|
FilterStorage.subscriptions; |
for (var i = 0; i < subscriptions.length; i++) |
{ |
var subscription = subscriptions[i]; |
if (subscription instanceof DownloadableSubscription) |
Synchronizer.execute(subscription, true); |
} |
break; |