| Index: options.js |
| =================================================================== |
| --- a/options.js |
| +++ b/options.js |
| @@ -1126,13 +1126,18 @@ |
| switch (message.type) |
| { |
| case "app.respond": |
| - if (message.action == "addSubscription") |
| + switch (message.action) |
| { |
| - var subscription = message.args[0]; |
| - var dialog = E("dialog-content-predefined"); |
| - dialog.querySelector("h3").textContent = subscription.title || ""; |
| - dialog.querySelector(".url").textContent = subscription.url; |
| - openDialog("predefined"); |
| + case "addSubscription": |
| + var subscription = message.args[0]; |
| + var dialog = E("dialog-content-predefined"); |
| + dialog.querySelector("h3").textContent = subscription.title || ""; |
| + dialog.querySelector(".url").textContent = subscription.url; |
| + openDialog("predefined"); |
| + break; |
| + case "switchToOptionsSection": |
|
Thomas Greiner
2016/04/04 12:46:36
Detail: Is this specific to the options page? We c
Sebastian Noack
2016/04/05 13:32:02
Fine with me using a more generic name that doesn'
Thomas Greiner
2016/04/06 12:49:12
I'd suggest "focusSection" to no limit ourselves t
Sebastian Noack
2016/04/06 17:38:29
Done.
|
| + document.body.setAttribute("data-tab", message.args[0]); |
| + break; |
| } |
| break; |
| case "filters.respond": |
| @@ -1150,7 +1155,7 @@ |
| ext.backgroundPage.sendMessage( |
| { |
| type: "app.listen", |
| - filter: ["addSubscription"] |
| + filter: ["addSubscription", "switchToOptionsSection"] |
| }); |
| ext.backgroundPage.sendMessage( |
| { |