Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicked links in Gmail, other apps don't work #46

Closed
neilio opened this issue Dec 3, 2020 · 8 comments
Closed

Clicked links in Gmail, other apps don't work #46

neilio opened this issue Dec 3, 2020 · 8 comments
Labels
custom css/js Solved via extension system site-specific Problem with a particular website (for visibility only)

Comments

@neilio
Copy link

neilio commented Dec 3, 2020

I've got an issue where clicking on a link in Gmail causes an error message to appear about popups being blocked. Is there a workaround or setting to whitelist or enable links like this to work?

Love the app, and love the fact that I managed to compile it for Apple Silicon with zero issues. It's crazy fast!

CleanShot 2020-12-03 at 07 52 01

@kofigumbs
Copy link
Owner

Ah yes, Gmail isn't quite honest with the way it presents links, so I documented a workaround using Custom JS:

I'm also glad to hear that the project builds on Apple Silicon! I'm a bit behind with maintenance on this project, but it's good to know folks can build from source until I get to repackage/distribute.

@neilio
Copy link
Author

neilio commented Dec 4, 2020

Thanks for the quick reply! Unfortunately, the code doesn't seem to work - I still get the same error.

This is my config: https://gist.github.com/neilio/c6825f1a120e54586a8d73cf9b5b2a36

@kofigumbs
Copy link
Owner

kofigumbs commented Dec 4, 2020

Oh sorry, I should have verified! It looks like the issue is that the hashchange event doesn't reliably fire after new links are inserted into the page. If you make the following change to your script, it should work:

-  window.addEventListener('hashchange', query);
+  setInterval(query, 400); // wait time between DOM queries, in milliseconds

I'll re-open this issue to remind myself to update the example and research whether there's a smarter approach.

@kofigumbs kofigumbs reopened this Dec 4, 2020
@kofigumbs
Copy link
Owner

Oh also, you'll want the script in all of the GSuite apps. Not sure about the other sites in your config--are you having issues with those as well?

@neilio
Copy link
Author

neilio commented Dec 6, 2020

Hm! I made that change but still can't seem to get links to work - I get the same alert error. My config file

@kofigumbs
Copy link
Owner

Oh I just noticed that your object field is named customJS instead of customJs (note the lowercase "s"). Could you try lowercasing the "s"?

If that doesn't change anything, could you toss an alert("hello") at the top of the script, just to make certain the script is running?

@neilio
Copy link
Author

neilio commented Dec 6, 2020

Ah, that was it! Thanks.

@kofigumbs
Copy link
Owner

Nice! Sorry that there was no feedback for that kinda typo. Just made a separate issue to fix that: #48.

@kofigumbs kofigumbs added the custom css/js Solved via extension system label Dec 21, 2020
@kofigumbs kofigumbs added the site-specific Problem with a particular website (for visibility only) label Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
custom css/js Solved via extension system site-specific Problem with a particular website (for visibility only)
Projects
None yet
Development

No branches or pull requests

2 participants