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: Created Dec. 19, 2016, 1:11 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') | skin/devtools-panel.css » ('J')
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 9df0c8dccf81fcfb6e4875a912150c04421fb3d0..9095850de7bd486d960d831b98154ebea4e44733 100644
--- a/devtools-panel.js
+++ b/devtools-panel.js
@@ -169,4 +169,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') | skin/devtools-panel.css » ('J')

Powered by Google App Engine
This is Rietveld