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

Fix bookmarklet on mobile browsers, eg Firefox #50

Open
snarfed opened this issue Dec 3, 2022 · 0 comments
Open

Fix bookmarklet on mobile browsers, eg Firefox #50

snarfed opened this issue Dec 3, 2022 · 0 comments

Comments

@snarfed
Copy link

snarfed commented Dec 3, 2022

First off, thanks for maintaining Press This, it's great!

The bookmarklets stopped working for me in Firefox Mobile a while back; background in mozilla-mobile/fenix#2871 (comment). Turns out opening a new window was the culprit. I fixed it for myself by removing lines 149 (target) and 152 (window.open) here so that it opens in the current window instead:

form.setAttribute( 'target', target );
form.setAttribute( 'style', 'display: none;' );
window.open( 'about:blank', target, 'location,resizable,scrollbars,width=' + windowWidth + ',height=' + windowHeight );

We could just maintain a separate copy for mobile browser, but obviously it'd be better to keep them unified. I don't know how to sniff for mobile browsers though. Do you? Any idea how you'd want to incorporate this?

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant