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

Unified Diff: options.js

Issue 16067002: Added Safari Support (Closed)
Patch Set: Removed absolute URL fix for Safari (this is done by the buildtools now), introduced browser specif… Created Oct. 31, 2013, 10:50 a.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
« _locales/en_US/messages.json ('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,18 @@
}
$(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 +240,7 @@
return;
}
- $('#tabs').tabs('select', 0);
+ $("#tabs").tabs("select", 0);
$("#addSubscriptionContainer").show();
$("#addSubscriptionButton").hide();
$("#subscriptionSelector").focus();
« _locales/en_US/messages.json ('K') | « options.html ('k') | popup.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld