Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: options.js

Issue 16067002: Added Safari Support (Closed)
Patch Set: Created Oct. 21, 2013, 8:11 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« chrome/background.js ('K') | « options.html ('k') | popup.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: options.js
===================================================================
--- a/options.js
+++ b/options.js
@@ -15,9 +15,6 @@
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
-var backgroundPage = chrome.extension.getBackgroundPage();
-var require = backgroundPage.require;
-
with(require("filterClasses"))
{
this.Filter = Filter;
@@ -74,6 +71,8 @@
initCheckbox("shouldShowBlockElementMenu");
initCheckbox("hidePlaceholders");
+ ext.onMessage.addListener(onMessage);
+
// Load recommended subscriptions
loadRecommendations();
@@ -82,6 +81,16 @@
}
$(loadOptions);
+function onMessage(msg) {
+ switch (msg.type) {
+ case "add-subscription":
+ startSubscriptionSelection(msg.title, msg.url);
+ break;
+ default:
+ console.log("got unexpected message: " + msg.type);
+ }
+};
+
// Reloads the displayed subscriptions and filters
function reloadFilters()
{
@@ -229,7 +238,7 @@
return;
}
- $('#tabs').tabs('select', 0);
+ $("#tabs").tabs("select", 0);
$("#addSubscriptionContainer").show();
$("#addSubscriptionButton").hide();
$("#subscriptionSelector").focus();
« chrome/background.js ('K') | « options.html ('k') | popup.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld