updating 'turn all styles off' in the right click context menu when prefs are loaded
This commit is contained in:
parent
fadf1a070c
commit
218cd46670
|
@ -53,7 +53,6 @@ chrome.tabs.onRemoved.addListener(function(tabId, info) {
|
|||
});
|
||||
|
||||
chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
|
||||
|
||||
switch (request.method) {
|
||||
case "getStyles":
|
||||
var styles = getStyles(request, sendResponse);
|
||||
|
@ -179,3 +178,10 @@ var codeMirrorThemes;
|
|||
getCodeMirrorThemes(function(themes) {
|
||||
codeMirrorThemes = themes;
|
||||
});
|
||||
|
||||
// to-do, user-feedback (https://github.com/schomery/stylish-chrome/issues/22#issuecomment-279936160)
|
||||
(function (oV, nV) {
|
||||
if (oV !== nV) {
|
||||
prefs.set('version', nV);
|
||||
}
|
||||
})(prefs.get('version', null), chrome.runtime.getManifest().version)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Stylus",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"description": "__MSG_description__",
|
||||
"homepage_url": "https://github.com/schomery/stylish-chrome",
|
||||
"manifest_version": 2,
|
||||
|
|
|
@ -419,6 +419,8 @@ var prefs = chrome.extension.getBackgroundPage().prefs || new function Prefs() {
|
|||
}
|
||||
}
|
||||
}
|
||||
// make sure right click context menu is in the right state when prefs are loaded
|
||||
chrome.contextMenus.update("disableAll", {checked: prefs.get("disableAll")});
|
||||
});
|
||||
|
||||
chrome.storage.onChanged.addListener(function(changes, area) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user