基於 Chromium 的瀏覽器

来自Tsetien’s Wiki
跳转到导航 跳转到搜索
NB
這是一篇僅適用於 Windows 的經驗。

原則上來說,基於 Ch­ro­mi­um 的瀏覽器當然是能不用則不用,但如果非要用,則大抵有如下的一點經驗。

Supermium 144.

選擇

Su­per­mi­umUn­goo­gled Ch­ro­mi­um 可以算是甲等優秀的兩個選項。

可攜化

ch­ro­me++ 是一個可將基於 Ch­ro­mi­um 的瀏覽器轉變為可攜式的小工具。其使用方法為:下載基於 Ch­ro­mi­um 的瀏覽器的 s­tan­da­lo­ne in­s­tal­ler, 使用 7z 對其進行逐層解壓縮,直至看到類似 ‘Ch­ro­me-bin’ 這一名稱的資料夾,其下應有一個版本號資料夾(形如 ‘147.0.7727.55’)與至少一個 ‘ch­ro­me.exe’ 檔案(在部分風味版中該檔案可能名稱有變),將這部分內容(版本號資料夾、一般名稱為 ‘ch­ro­me.exe’ 的可執行檔,以及其餘若有的同層全部其他檔案)全部內容剪切至 ch­ro­me++ 下具有 ver­si­on.dll 檔案的 App 目錄下,並透過執行此處的 ch­ro­me.exe(或被更改過的可執行檔)來開啟該可攜式基於 Ch­ro­mi­um 的瀏覽器。後續可透過移動整個大資料夾(含 App, Da­ta, 與 Ca­che 三個子資料夾)來移動該可攜式基於 Ch­ro­mi­um 的瀏覽器的位址。

要更新的話,則重複前述之連續解壓縮然後拷貝的作業即可,同時可以(也應該)手動刪掉位於 App 下的上一個版本號資料夾。

chrome++ 自攜之設定檔案

ch­ro­me++ 自己有帶一個名為 chrome++.ini 的設定檔案,其中可將 [tabs] 塊做此般之設定——

chrome++.ini (EXCERPENDVM)
[tabs]
double_click_close=0
right_click_close=0
keep_last_tab=1
wheel_tab=0
wheel_tab_when_press_rbutton=0
open_url_new_tab=0
open_bookmark_new_tab=1
new_tab_disable=1
new_tab_disable_name="about:blank","chrome://newtab"

便可使被可攜化的基於 Ch­ro­mi­um 的瀏覽器做到不隨最後一個分頁的關閉而關閉以及在新分頁中開啟書籤

chrome://flags 設定

目前經初步測試有大抵以下諸 flags 之設定推薦。

NB
若已使用 ch­ro­me++ 來創建可攜化 Su­per­mi­um 且已在 chrome++.ini 中開啟前述之設定,則 Su­per­mi­um 的 ‘Book­mark Op­en Op­tions’ 這一 flag 應保持預設不變。
Flag Value Applicable to
Disable encryption (#disable-encryption) Enabled Supermium Ungoogled
Disable machine ID (#disable-machine-id) Enabled Supermium Ungoogled
Close window with last tab (#close-window-with-last-tab) Never Supermium Ungoogled
Custom New Tab Page (#custom-ntp) Enabled (about:blank) Supermium Ungoogled
Show avatar/people/profile button (#show-avatar-button) Never Supermium Ungoogled
Tab Hover Cards (#tab-hover-cards) Tooltip Supermium Ungoogled
Prerendering (#prerender2) Disabled Supermium Ungoogled
Parallel downloading (#enable-parallel-downloading) Enabled Supermium Ungoogled
Anonymise local IPs exposed by WebRTC. (#enable-webrtc-hide-local-ips-with-mdns) Enabled Supermium Ungoogled
Handling of extension MIME type requests (#extension-mime-request-handling) Always prompt for install Supermium Ungoogled
Enable JXL image format (#enable-jxl-image-format) Enabled Ungoogled
No default browser check (#no-default-browser-check) Enabled Ungoogled
Smooth Scrolling (#smooth-scrolling) Enabled Supermium Ungoogled
Make scrollbar follow theme (#root-scrollbar-follows-browser-theme) Disabled Supermium Ungoogled
Overlay Scrollbars (#overlay-scrollbars) Disabled Supermium Ungoogled
Fluent scrollbars. (#fluent-scrollbars) Disabled Supermium
Fluent Overlay scrollbars. (#fluent-overlay-scrollbars) Disabled Supermium
Disable QR Generator (#disable-qr-generator) Enabled Supermium Ungoogled
Remove Grab Handle (#remove-grab-handle) Enabled Supermium Ungoogled
Disable Sharing Hub (#disable-sharing-hub) Enabled Supermium Ungoogled
AI Mode Omnibox entrypoint (#ai-mode-omnibox-entry-point) Disabled Supermium Ungoogled
AI Entrypoint Disabled on User Input (#hide-aim-omnibox-entrypoint-on-user-input) Enabled Supermium Ungoogled
Omnibox Allow AI Mode Matches (#omnibox-allow-ai-mode-matches) Disabled Supermium Ungoogled
Revamped Delete Browsing Data dialogue (#dbd-revamp-desktop) Disabled Supermium Ungoogled
Remove Tabsearch Button (#remove-tabsearch-button) Enabled Supermium Ungoogled
Disable Top Sites (#disable-top-sites) Enabled Ungoogled
Autoplay Policy (#autoplay-policy) Autoplay Disabled Supermium
Bookmark Open Options (#open-bookmark-option) * New Foreground Tab Supermium
Compact UI (#compact-ui) Enabled Supermium
Compact Tab UI (#compact-tab-ui) Enabled Supermium
Classic Omnibox (#classic-omnibox) Enabled Supermium
Semi-Transparent Tabs (#transparent-tabs) Enabled Supermium
Supermium Tab Options (#supermium-tab-options) v60 Tabs Supermium

附加組件

qv 適用於基於 Ch­ro­mi­um 的瀏覽器的附加組件蒐集

針對本頁所列之 Su­per­mi­um 和 Un­goo­gled 這兩款風味版 Ch­ro­mi­um, 一些功能已可以透過前文所述之 ch­ro­me++ 設定以及在瀏覽器內設定 flags 實現。比如:這兩款風味版 Ch­ro­mi­um 均支援直接透過設定 flags 來指定新分頁的連結,亦均支援透過 flags 來使瀏覽器不隨最後一個分頁的關閉而關閉。同時,ch­ro­me++ 的設定對這兩款風味版 Ch­ro­mi­um 在這兩項功能的支援上也已足夠好(附加「在新分頁中開啟書籤」這一在 Un­goo­gled 的 flags 中所缺少的項目),因此在雙重保障之下,附加組件清單中所列之諸如 Don’t Clo­se Win­dow with the La­st Tab, Em­p­ty New Tab Pa­ge 等附加組件已無再裝的必要。

不過,一些其他的風味版 Ch­ro­mi­um 可能會死硬到能夠突破前述之「雙重保障」——也即,即便是提供了 flags 設定,即便是在 ch­ro­me++ 的設定檔案中寫明了,仍舊不能穩定地實現「瀏覽器不隨最後一個分頁的關閉而關閉」,則針對這樣冥頑不化的風味版 Ch­ro­mi­um, 就只能透過裝附加組件來解決了。這也是為什麼那些附加組件仍舊被列入清單的原因。

清理

使用以下 ba­tch 檔可對基於 Ch­ro­mi­um 的瀏覽器的 pro­fi­le 資料夾進行清理。

它支援一個開關 -c, 若啟用,則進行深度清理(清盡一切可清之物),若不啟用,則保留歷史、coo­ki­es 等內容,僅刪除快取及其他一般垃圾。

另有一個 -w 開關,若啟用,則會刪除名為 ‘Web Data’ 的檔案——這個檔案通常來說是可刪的,但是基於 Chromium 的瀏覽器又偏偏把自訂搜尋都放在這裡,因此倘使啟用該開關刪掉 ‘Web Data’, 則所有的自訂搜尋便都要再重建。

cpc.bat
@echo off
chcp 65001 >nul
setlocal enableextensions
set "a="
set "c="
set "u="
set "w="
:a
if /i "%~1"=="" goto p
set "a=%~1"
if /i "%~1"=="-c" set "c=1"
if /i "%~1"=="-w" set "w=1"
if not defined u if /i "%a:~0,1%" neq "-" set "u=%~1"
shift
goto a
:p
if not defined u set "u=."
if not exist "%u%\Local State" (
	echo Local State not found under:
	echo %u%
	exit /b 1
)
md _bu
call :r "%u%\AutofillStates"
call :r "%u%\BrowserMetrics"
call :r "%u%\CertificateRevocation"
call :r "%u%\component_crx_cache"
call :r "%u%\CookieReadinessList"
call :r "%u%\Crashpad"
call :r "%u%\Crowd Deny"
call :r "%u%\extensions_crx_cache"
call :r "%u%\FirstPartySetsPreloaded"
call :r "%u%\GraphiteDawnCache"
call :r "%u%\GrShaderCache"
call :r "%u%\Local Traces"
call :r "%u%\MEIPreload"
call :r "%u%\OptimizationHints"
call :r "%u%\OriginTrials"
call :r "%u%\optimization_guide_model_store"
call :r "%u%\PKIMetadata"
call :r "%u%\PrivacySandboxAttestationsPreloaded"
call :r "%u%\ProbabilisticRevealTokenRegistry"
call :r "%u%\Safe Browsing"
call :r "%u%\SafetyTips"
call :r "%u%\ShaderCache"
call :r "%u%\SSLErrorAssistant"
call :r "%u%\Subresource Filter"
call :r "%u%\TpcdMetadata"
call :r "%u%\TrustTokenKeyCommitments"
call :r "%u%\Webstore Downloads"
call :r "%u%\WidevineCdm"
call :r "%u%\ZxcvbnData"
call :f "%u%\BrowserMetrics-spare.pma"
call :f "%u%\Last Browser"
call :f "%u%\Last Version"
call :f "%u%\first_party_sets.db"
call :f "%u%\first_party_sets.db-journal"
call :f "%u%\segmentation_platform\ukm_db-journal"
if exist "%u%\Default\Preferences" call :pf "%u%\Default"
for /d %%a in ("%u%\Profile *") do if exist "%%~fa\Preferences" call :pf "%%~fa"
rd /s /q _bu
exit /b
:pf
set "p=%~1"
md "_bu\%~nx1"
move "%p%\IndexedDB\chrome-extension_clngdbkpkpeebahjckkjfobafhncgmne_0.indexeddb.leveldb\*.log" "_bu\%~nx1" >nul 2>nul
call :fc "%p%\Account Web Data"
call :f "%p%\Account Web Data-journal"
call :f "%p%\Affiliation Database-journal"
call :r "%p%\AutofillAiModelCache"
call :rc "%p%\AutofillStrikeDatabase"
call :g "%p%\AutofillStrikeDatabase"
call :f "%p%\Bookmarks.bak"
call :r "%p%\BrowsingTopicsSiteData"
call :f "%p%\BrowsingTopicsSiteData-journal"
call :f "%p%\BrowsingTopicsState"
call :r "%p%\BudgetDatabase"
call :r "%p%\chrome_cart_db"
call :r "%p%\ClientCertificates"
call :r "%p%\DIPS"
call :f "%p%\DIPS-journal"
call :r "%p%\DawnGraphiteCache"
call :r "%p%\DawnWebGPUCache"
call :r "%p%\discount_infos_db"
call :r "%p%\Download Service"
call :fc "%p%\Extension Cookies"
call :f "%p%\Extension Cookies-journal"
call :r "%p%\Extension State"
call :f "%p%\Favicons-journal"
call :r "%p%\Feature Engagement Tracker"
call :r "%p%\GCM Store"
call :r "%p%\GPUCache"
call :f "%p%\heavy_ad_intervention_opt_out.db-journal"
call :fc "%p%\History"
call :f "%p%\History-journal"
call :r "%p%\IndexedDB"
call :r "%p%\InterestGroups"
call :r "%p%\JumpListIconsMostVisited"
call :r "%p%\JumpListIconsRecentClosed"
call :f "%p%\LOCK"
call :f "%p%\LOG"
call :f "%p%\LOG.old"
call :fc "%p%\Login Data"
call :fc "%p%\Login Data For Account"
call :f "%p%\Login Data For Account-journal"
call :f "%p%\Login Data-journal"
call :r "%p%\Local Storage"
call :f "%p%\MediaDeviceSalts"
call :f "%p%\MediaDeviceSalts-journal"
call :fc "%p%\Network Action Predictor"
call :f "%p%\Network Action Predictor-journal"
call :r "%p%\optimization_guide_hint_cache_store"
call :r "%p%\parcel_tracking_db"
call :r "%p%\PersistentOriginTrials"
call :r "%p%\Platform Notifications"
call :f "%p%\PreferredApps"
call :r "%p%\PrivateAggregation"
call :f "%p%\PrivateAggregation-journal"
call :r "%p%\Safe Browsing Network"
call :f "%p%\ServerCertificate"
call :f "%p%\ServerCertificate-journal"
call :r "%p%\Service Worker"
call :r "%p%\Session Storage"
call :r "%p%\Sessions"
call :r "%p%\SharedStorage"
call :fc "%p%\Shortcuts"
call :f "%p%\Shortcuts-journal"
call :rc "%p%\shared_proto_db"
call :g "%p%\shared_proto_db"
call :g "%p%\shared_proto_db\metadata"
call :r "%p%\Site Characteristics Database"
call :rc "%p%\Sync App Settings"
call :r "%p%\Sync Data"
call :fc "%p%\Top Sites"
call :f "%p%\Top Sites-journal"
call :r "%p%\VideoDecodeStats"
call :fc "%p%\Visited Links"
if defined w call :f "%p%\Web Data"
call :f "%p%\Web Data-journal"
call :r "%p%\WebrtcVideoStats"
call :r "%p%\WebStorage"
call :r "%p%\blob_storage"
call :r "%p%\commerce_subscription_db"
call :r "%p%\discounts_db"
call :fc "%p%\Network\Cookies"
call :f "%p%\Network\Cookies-journal"
call :f "%p%\Network\Network Persistent State"
call :f "%p%\Network\Reporting and NEL"
call :f "%p%\Network\Reporting and NEL-journal"
call :f "%p%\Network\SCT Auditing Pending Reports"
call :f "%p%\Network\TransportSecurity"
call :f "%p%\Network\Trust Tokens"
call :f "%p%\Network\Trust Tokens-journal"
call :r "%p%\Shared Dictionary\cache"
call :f "%p%\Shared Dictionary\db-journal"
call :g "%p%\Extension Rules"
call :g "%p%\Extension Scripts"
call :h "%p%\Managed Extension Settings"
call :h "%p%\Sync Extension Settings"
call :h "%p%\Local Extension Settings"
call :s "%p%\Segmentation Platform"
call :x "%p%"
if exist "_bu\%~nx1\*.log" md "%p%\IndexedDB\chrome-extension_clngdbkpkpeebahjckkjfobafhncgmne_0.indexeddb.leveldb"
if exist "_bu\%~nx1\*.log" move "_bu\%~nx1\*.log" "%p%\IndexedDB\chrome-extension_clngdbkpkpeebahjckkjfobafhncgmne_0.indexeddb.leveldb" >nul 2>nul
rd /s /q "_bu\%~nx1"
exit /b
:r
if exist "%~1\*" rd /s /q "%~1"
if exist "%~1" del /f /q "%~1"
exit /b
:f
if exist "%~1" del /f /q "%~1"
exit /b
:rc
if defined c call :r "%~1"
exit /b
:fc
if defined c call :f "%~1"
exit /b
:g
call :f "%~1\LOG"
call :f "%~1\LOG.old"
exit /b
:h
for /d %%a in ("%~1\*") do (
	call :f "%%~fa\LOG"
	call :f "%%~fa\LOG.old"
)
exit /b
:s
for /d %%a in ("%~1\*") do (
	call :f "%%~fa\LOG"
	call :f "%%~fa\LOG.old"
)
exit /b
:x
for %%b in (LICENSE LICENSE.md LICENSE.txt README README.md README.txt README.htm README.html changelog.txt) do (
	for /r "%~1" %%a in (%%b) do call :f "%%~fa"
)
exit /b