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

Unified Diff: devtools-panel.js

Issue 29368730: Issue 4136 - Support Chrome's dark devtools theme (Closed)
Patch Set: Addressed feedback Created Jan. 5, 2017, 4:22 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 | « no previous file | skin/devtools-panel.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: devtools-panel.js
diff --git a/devtools-panel.js b/devtools-panel.js
index 3844492ffe055c3b4ff060935d71ef3d73b25aa8..8d7e734ad2209dbd770b9ddce7a3417361b7ac69 100644
--- a/devtools-panel.js
+++ b/devtools-panel.js
@@ -226,4 +226,10 @@ document.addEventListener("DOMContentLoaded", function()
break;
}
});
+
+ // Since Chrome 54 the themeName is accessible, for earlier versions we must
+ // assume the default theme is being used.
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=608869
+ let theme = chrome.devtools.panels.themeName || "default";
+ document.body.classList.add(theme);
}, false);
« no previous file with comments | « no previous file | skin/devtools-panel.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld