parent
0e27def107
commit
f8578f5030
|
@ -1,13 +1,4 @@
|
|||
chrome.browserAction.onClicked.addListener(function(tab) {
|
||||
chrome.tabs.query({ active: true, currentWindow: true }, function(tabs) {
|
||||
var tab = tabs[0];
|
||||
var url = tab.url;
|
||||
|
||||
if (url === 'chrome://flags/#enable-force-dark') {
|
||||
chrome.tabs.update(tab.id, { url: 'chrome://flags/' });
|
||||
} else {
|
||||
chrome.tabs.update(tab.id, { url: 'chrome://flags/#enable-force-dark' });
|
||||
}
|
||||
});
|
||||
chrome.tabs.create({ url: 'chrome://flags/#enable-force-dark' });
|
||||
});
|
||||
|
|
@ -1,19 +1,21 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Auto Dark Mode Toggle",
|
||||
"version": "1.0",
|
||||
"description": "Toggle the 'Auto Dark Mode for Web Contents' flag in Chrome://flags",
|
||||
"icons": {
|
||||
"16": "icon.png",
|
||||
"48": "icon.png",
|
||||
"128": "icon.png"
|
||||
},
|
||||
"background": {
|
||||
"scripts": ["background.js"],
|
||||
"persistent": false
|
||||
},
|
||||
"permissions": [
|
||||
"tabs"
|
||||
]
|
||||
"manifest_version": 2,
|
||||
"name": "Auto Dark Mode Toggle",
|
||||
"version": "1.0",
|
||||
"description": "Toggle the 'Auto Dark Mode for Web Contents' flag in Chrome://flags",
|
||||
"icons": {
|
||||
"16": "icon.png",
|
||||
"48": "icon.png",
|
||||
"128": "icon.png"
|
||||
},
|
||||
"browser_action": {
|
||||
"default_popup": "popup.html"
|
||||
},
|
||||
"permissions": [
|
||||
"tabs"
|
||||
],
|
||||
"background": {
|
||||
"scripts": ["background.js"],
|
||||
"persistent": false
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue