By creating a Mac web application with specific User-Agent, ingeniously avoid advertising problems, such as: YouTube video ads, etc.
- macOS 10.9+ / Windows / Linux
- Node.js ≥ 12.9 and npm ≥ 6.9
npm install -g nativefier
#Nativefier Version Upgrade
npm list -g --depth 0
npm update nativefier
From: https://github.com/nativefier/nativefier
Use nativefier to generate Web as App, example:
/<Path>/nativefier "https://example.com" \
--name Example \
--tray \
--internal-urls "(.*?)(accounts\.example\.com|example\.com)(.*?)" \
--user-agent 'Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)'
When NativeFier's new Release is released, in order to ensure normal use, you may need to upgrade it as soon as possible.
Replace the following User-Agent
App | User-Agent | Ad Removed | Hide Play |
---|---|---|---|
Youtube | Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp) | Yes | Support |
As of now, the YouTube video ads have been removed. For other web applications, please test it by yourself.