use*_*064 50 google-chrome developer-tools css3 google-chrome-devtools
我从这个网站上为Google Developer Tools使用了一些主题:http://devthemez.com/themes/chrome-developer-tools
但是,在32.0.1700.76米更新后,所有主题都已停止工作.
我需要做些什么才能让他们再次工作?
Rob*_*b W 62
Custom.css
已从版本32中的Chrome中删除了支持.
此答案提供了两种方法,可以在开发人员工具中轻松激活样式表.建议使用第二种方法,但仅适用于Chrome 33+,第一种方法也适用于Chrome 32.
这两种方法都是Chrome扩展程序,要使用以下示例,请按照以下步骤操作:
chrome://extensions
Custom.css
本节使用如何将javascript注入Chrome DevTools本身中描述的两种技术之一.这个扩展可以很容易地推广到完全模拟Custom.css,即激活每个页面上的样式表,如Custom.css.
注意:如果您使用的是Chrome 33+,那么我强烈推荐下一节中的方法.
{
"content_scripts": [{
"js": [ "run_as_devtools.js" ],
"matches": [ "<all_urls>" ]
}],
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4r/pUHVPYQTn7vu3YHT52I0SKM15OBOTi0Jii4q5Koxd3Gdc/WXdqC2YgMA25J5PRiSubu/nHFf12Ubp3OZyNqB3j45ZscQ+tH1bwcV+cqdvv/Ik6VQaS6/qLmenLdFPKOCg/g1L1iKZu6Jjny6GlovpBj+7gjWQZBIoGBd70HQIDAQAB",
"manifest_version": 2,
"name": "Emulate Custom.css",
"version": "1.0",
"web_accessible_resources": [ "Custom.css" ]
}
Run Code Online (Sandbox Code Playgroud)
if (location.protocol === 'chrome-devtools:') (function() {
'use strict';
var l = document.createElement('link');
l.rel = 'stylesheet';
l.href = chrome.runtime.getURL('Custom.css');
document.head.appendChild(l);
})();
Run Code Online (Sandbox Code Playgroud)
/* whatever you had in your Custom.css */
Run Code Online (Sandbox Code Playgroud)
如果你想定制你的devtools风格,chrome.devtools.panels.applyStyleSheet
必须使用.此功能目前隐藏在标志后面(--enable-devtools-experiments
需要重新启动Chrome)和一个复选框(启用标志后,打开devtools,点击齿轮图标,转到实验并选中"允许UI主题").
{
"name": "<name> DevTools Theme",
"version": "1",
"devtools_page": "devtools.html",
"manifest_version": 2
}
Run Code Online (Sandbox Code Playgroud)
<script src="devtools.js"></script>
Run Code Online (Sandbox Code Playgroud)
var x = new XMLHttpRequest();
x.open('GET', 'Custom.css');
x.onload = function() {
chrome.devtools.panels.applyStyleSheet(x.responseText);
};
x.send();
Run Code Online (Sandbox Code Playgroud)
/* whatever you had in your Custom.css */
Run Code Online (Sandbox Code Playgroud)
有关详细信息,请参阅https://code.google.com/p/chromium/issues/detail?id=318566
Bri*_*den 19
Chrome Store中现在有33岁以上的开发人员主题
打开chrome:// flags并启用Developer Tools实验.打开开发人员工具设置,选择"实验"选项卡,然后选中"允许自定义UI主题".安装任何主题,您都可以在Chrome网上应用店中搜索" devtools主题 ".它还会让你保持最新状态.