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

Unified Diff: popup.js

Issue 29567749: Issue 5593 - Use messaging for the popup's notification code (Closed)
Patch Set: Use chrome.tabs.create Created Oct. 9, 2017, 3:46 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
« no previous file with comments | « notification.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: popup.js
diff --git a/popup.js b/popup.js
index 24c4523896d928f99dc7267fd19a69d0b832924e..8e0c5ddfa628c9ec564c4af87b648c3cd685a382 100644
--- a/popup.js
+++ b/popup.js
@@ -24,6 +24,11 @@ function getPref(key, callback)
chrome.runtime.sendMessage({type: "prefs.get", key}, callback);
}
+function setPref(key, value, callback)
+{
+ chrome.runtime.sendMessage({type: "prefs.set", key, value}, callback);
+}
+
function togglePref(key, callback)
{
chrome.runtime.sendMessage({type: "prefs.toggle", key}, callback);
« no previous file with comments | « notification.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld