Explain Codes LogoExplain Codes Logo

Html Body shows cz-shortcut-listen="true" with Chrome's Developer Tools?

html
chrome
extensions
developer-tools
Nikita BarsukovbyNikita Barsukov·Aug 6, 2024
TLDR

Seeing cz-shortcut-listen="true" appear in your HTML body? That's likely down to a browser extension, such as Colorzilla. Here's a quick way to check:

  1. Disable your extensions via chrome://extensions/.
  2. Refresh your page and check the <body> tag again.
  3. If the attribute disappears, it's probably the last disabled extension injecting it.

Remember to re-enable your other extensions afterward!

Drill down: Where did this come from?

If you're staring at your nicely-written code wondering why cz-shortcut-listen="true" is lurking there - don't sweat it. It's not a standard HTML attribute and you didn't accidentally write it in your sleep. It's injected by particular Chrome extensions, specifically those trying to listen for keyboard shortcuts. Round of applause for extensions trying to be helpful 🏆!

Troubleshooting: The Inspector Gadgets

For confirming the suspect (the interfering extension), take these detective steps:

  • Use a different browser. If the attribute is missing, it's a Chrome-exclusive phenomenon.
  • Go incognito. With all extensions off, this gives you a clean slate to inspect.
  • Engage with the extension's community. Their documentation or support forums may have a case like this.

Know thy browser: Unraveling the Chrome mystery

Browser extensions like Colorzilla love to assist but sometimes, they give surprises like these. An attribute in your DOM that popped out of the blue! Extensions inject scripts or alter web content to work their magic, and Chrome Developer Tools shows these changes, no matter how mysterious they are.

A leap through time: The ghost of cz-shortcut-listen

Uninvited attributes like cz-shortcut-listen have been playing hide and seek since 2012. Time travel to its early days to understand the attributes' history and browser extensions' evolution. A tweet from Brian Pemberton touched this, but it's turned into a Ghost Tweet now. You can resurrect it on archive.org.