Editing Google Chrome's style file


The following file seems to be the style file for Google Chrome’s empty new tab page:


You can see the file if you enter it into the address bar. It seems the file is not directly accessible, at least I couldn’t find it. Any ideas how to edit it?


Why would you want to do that?

I want to “display:none” the most visited pages section on new tab and none of the extensions I tried worked so far.

Any ideas how to edit it?
I want to “display:none” the most visited pages section on new tab…

As the chrome pages are hardcoded in a browser resource file neither user scripts or user styles can change them. Though an extension can do some changes.

Edit the browser resourse file. Stays only til next update:

  • In Chrome Windows You can use a resourse-editor and edit the new_tab.html and its css in the section browser_resources.

  • In e.g. Chromium Linux You can always hack that file. Open /usr/lib/chromium-browser/resources.pak as root with a hex-editor e:g: Okteta and search for the characters: #most-visited {, find its declaration: -webkit-user-select: none; below and replace it with spaces and display: none; and save the file. Restart browser.
    #most-visited {¬ -webkit-user-select: none;
    #most-visited {¬ spaces spaces display: none;

EDIT thanks Discourse for messing with spaces in code: use overwrite and replace with spaces, you can’t change the strings number of bytes

…and none of the extensions I tried worked so far.

I tested the New Tab Redirect extension, it works by redirecting to an about:blank or costum page:

Did I mention I don’t use Google Chrome? I prefer Chromium. :slight_smile:

Hi, thanks. I’m on Windows, do you know any resource editor that I can use? Briefly checked the web but couldn’t find any tips.

Google Chrome and the open source project Chromium behind it apparently uses PAK files for theire chrome-urls pages. Those seems to be of their own archive format and can’t be opened/saved by any archiver or edited by any resource editor I know of today.

So, if you can’t use any extension workaround, the only practical choice left is to change that file using a hex editor. A solution lasting at least until next update. There are many hex editor alternatives to find: https://en.wikipedia.org/wiki/Comparison_of_hex_editors. Too many to try out for this small fix so I’ll try recommend a few of Windows freewares in that list, though it’s many years since I regularly used Windows:
Frhed: http://sourceforge.net/projects/frhed/
HexEdit: http://www.hexedit.com
wxHexEditor: http://sourceforge.net/projects/wxhexeditor/files/wxHexEditor/v0.23%20Beta/

You can also use PSPad, my favourite code editor for Windows, it can load large files in hex mode and it would be much simplier to use in this case than the full blown hex editors above.
Used it for many years as an IDE for all sorts of projects, I can still use it on Wine and today successfully tested the resource.pak edit I posted before. It’s freeware and I would happily recommend it as a general dev tool.

For other occasions try Resource Hacker, it can edit/save Win exe and dll embedded resources. This is my old fauvorite since more than ten years, I still use it on Wine.

:wink: I guess not, but If you happen to have Ms Visual Studio installed you could try its built in Solution Explorer, at least Chrome Win version is a Visual C project I think.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.