简体   繁体   中英

Hide some devtools tabs in chrome

How can I hide following tabs in Chorme devtools?

I know that I can reorder them, but I'd like to minimize extra interface part for some competition.

截屏

There is no solution to this. You can't hide certain tabs in chrome devtools.

This is certainly possible! But it isn't trivial. You need to create (or find and download from the Chrome Store) a Chrome Extension that themes DevTools. If you create one, one option is to find the elements by inspecting DevTools with DevTools itself and then use CSS to override.

This great answer to another question on the same topic was extremely helpful to me: Custom.css has stopped working in 32.0.1700.76 m Google Chrome update

2021 update

You can use Microsoft Edge (witch is basically a reskin of chrome atm). It has the exact same debugger and devtools. There a close button will appear every time you mouseover a tab in the devtools menu. Just like this:

https://i.stack.imgur.com/kmu73.png

If you later wish to bring closed tabs back up, go to Settings -> Preferences -> click Restore defaults and refresh

It is simply not possible. we cant control how this options are appearing util and unless we are not sundar pichai :)

you can go to chrome://flags/#enable-devtools-experiments enable this flag( restart the chrome after enable it ) and have some customization option like following(try and Enjoy !!:))

Accessibility Inspection


Allow custom UI themes


Empty sourcemap auto-stepping


Live SASS


Persistence 2.0


Source diff


Timeline: event initiators


Timeline: multiple main views

As mentioned in this answer, you can delete one or more tools from DevTools at new Edge browser. To restore some of them back click on the menu icon ... at the right corner of the DevTools then select > More tools > [Your desired tool]

Tested on Version 91.0.864.59 (Official build) (64-bit)

在此处输入图片说明

If you want to prevent opening dev-tools tabs. Use this code :

window.oncontextmenu = function () {
    return false
}
document.onkeydown = function (e) {
    if (window.event.keyCode === 123 || e.button === 2) {
        // 123 is key code for F12 key block and 2 is button code for right click
        return false
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM