[Share Experiences] 让浏览器可以完整保存网页
Tofloor
poster avatar
小明Hackintosh
deepin
2021-06-01 20:19
Author

最近发现无法保存网页为MHTML了。一番搜索无果后,只得从chromium项目的commits中查找,原来chrome搞了个"Chrome Flag Ownership"的项目,目的是清理未使用的和过时的flags,现在save-page-as-mhtml仅作为开发者测试使用。就是说现在save-page-as-mhtml作为switch存在。知道了原因解决办法就很简单了,右键chrome快捷方式,选择快捷方式一栏,在目标输入框chrome.exe后加入空格和--save-page-as-mhtml,再重新打开chrome就可以了。

 

Linux也是类似的做法。为让浏览器可以完整保存网页为mhtml,我们可以添加一个启动参数。“--save-page-as-mhtml

系统自带浏览器

修改desktop文件

核心代码

Exec=/usr/bin/browser --save-page-as-mhtml

参考

#新添加一行
Exec=/usr/bin/browser --save-page-as-mhtml
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=org.deepin.browser
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;application/x-mimearchive;x-scheme-handler/http;x-scheme-handler/https;
StartupWMClass=browser
StartupNotify=true
#注释掉下面两行
#X-Deepin-CreatedBy=com.deepin.dde.daemon.Launcher
#X-Deepin-AppID=org.deepin.browser

注意了,要求关闭所有浏览器窗口重启应用。

360浏览器

核心代码

Exec=/opt/apps/com.360.browser-stable/files/com.360.browser --save-page-as-mhtml

参考

Name[zh_HK]=360安全瀏覽器
Name[zh_TW]=360安全瀏覽器
StartupNotify=true
Terminal=false
Type=Application
Version=1.0
Exec=/opt/apps/com.360.browser-stable/files/com.360.browser --save-page-as-mhtml
X-Deepin-AppID=com.360.browser-stable
#X-Deepin-CreatedBy=com.deepin.dde.daemon.Launcher
X-Deepin-Vendor=user-custom

Edge浏览器

核心代码

Exec=/opt/microsoft/msedge-beta/microsoft-edge-beta --save-page-as-mhtml

参考

Icon=/opt/microsoft/msedge-beta/product_logo_128_beta.png
Name=Edge
#添加这一行
Exec=/opt/microsoft/msedge-beta/microsoft-edge-beta --save-page-as-mhtml
StartupNotify=true
Terminal=false
Type=Application
Version=1.0
X-Deepin-Vendor=user-custom

 

 

 

 

 

Reply Favorite View the author
All Replies

No replies yet