Giter VIP home page Giter VIP logo

Comments (6)

xiaogwu avatar xiaogwu commented on July 28, 2024 5

This worked for me:
nativefier --name "Gmail" https://mail.google.com/mail/u/0/ --icon logo_gmail_color_2x_web_512dp.png --honest --bounce --counter --internal-urls "mail.google.*?"

from nativefier-icons.

pzuraq avatar pzuraq commented on July 28, 2024 1

The issue here seems to be that Gmail puts all links through a safe redirect, which is itself a gmail domain. Thus, links are being opened in a new tab because nativefier thinks they're "local". I was able to fix this by changing --internal-urls to something that doesn't match gmail.

from nativefier-icons.

omertuc avatar omertuc commented on July 28, 2024

Adding to @xiaogwu's answer:

  • The flags --name, --icon, --honest, --bounce and --counter are not required and are not relevant to this issue, only --internal-urls is relevant.

  • If you wish, you don't have to re-run nativefier, you can simply modify the internalUrls field from null to "mail.google.*?" in the resources/app/nativefier.json file inside the already-generated app directory.

  • To explain why this regex works - As @pzuraq said, all links inside gmail are actually opened via a https://www.google.com/url?q=... redirect. Since gmail is actually hosted on mail.google.com, and nativefier only compares the domain (google.com) without including the subdomain (code), the redirects itself are opened as "internal" links, @xiaogwu's regex solves this by forcing it to only consider mail.google.* as internal.

from nativefier-icons.

danielmichaelni avatar danielmichaelni commented on July 28, 2024

How would this work with messenger.com?

from nativefier-icons.

mclamb avatar mclamb commented on July 28, 2024

Still having this issue even with the --internal-urls "mail.google.*?" suggestion above. Nothing seems to open with a left-click, even without any --internal-urls specified at all. Right-click open in default browser works fine. Any other ideas?

from nativefier-icons.

finbarberkon avatar finbarberkon commented on July 28, 2024

How would this work with messenger.com?

Modify your field of resources/app/nativefier.json to the following (per @omertuc's instructions):
"internalUrls":"www.messenger.com.*"

This works because messenger redirect links are l.messenger.com/.*.

from nativefier-icons.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.