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
Install via pop up window, not tab #2641
Comments
Of interest. In one of the test branches[1] I've been working on I implemented a popup box. And the content painted correctly, without having to click on it[2]. Though the title prefix is still an issue. The prefix is added but the [1] The branch is one that I had setup detecting UserScripts in the background and then caching the content so that the XHR wasn't required to install new scripts. I don't think those changes particularly affect this issue though. |
I've also got a branch for this ( https://github.com/arantius/greasemonkey/tree/install-dialog ) though I haven't tested in a while. |
Turns out the problem seems to be with If that preference is set to |
I've updated my branch, linked above, with a workaround. I'd appreciate any comments on how this works. It's a little bit janky, but maybe good enough? |
Android can be accommodated with something like (tested on my phone). chrome.runtime.getPlatformInfo(platform => {
let url = chrome.runtime.getURL('src/content/install-dialog.html')
+ '?' + escape(JSON.stringify(message.userScript));
if ('android' === platform.os) {
chrome.tabs.create({'active': true, 'url': url});
} else {
...
}
}); Why |
Apparently I didn't test enough. Opening the install thing works on the phone, but install the script just fails. At the moment I'm not sure if related to this change or something else. |
It's closer to 3.x behavior, which shows only the popup, never any navigation. Inspecting the separately-loaded source also leaves you open to attack by malicious servers, delivering different content for the two different fetches. So it's not a great way to review the source. More ideally we might switch to a blocking webRequest (?) handler to get even closer. |
The PR #2719 and the code that I've been working on in regard to asynchronous download, on this branch[1][2], would prevent that. The installation workflow works on a single request. As well as optimistically downloads / pre-fetches / whatever you want to call it any other remote content before the install button is even pressed. Of course, everything is aborted and cleaned up if the cancel button is pressed, or if the window is closed. [1] There's a few style things and various minor issues that need to be resolve with the linked code. |
I'm just dumb. I have a local server in which I use for navigation Anyway, installing scripts do work on Android. There's some other usability problems but those are for a different issue. |
The above fix is packaged in version 4.2beta2: Testing is always appreciated! |
Dunno if we can help this, but the window pops up in a strange place on my laptop (top of screen, at the right 2/3rds or so). More importantly: window should close after successful install. |
Is this a side effect of the resizing? When I was playing with dialog boxes in my testing Async download branch I don't recall it popping up in 'strange' locations. It was generally middle-topish. |
On another laptop and on a desktop I'm seeing middle-of-screen now. |
On the issue of opening a blank window, it looks like actual patches are being worked on in this ticket. |
This issue exists primarily to track my desire to make this change, but inability to:
https://bugzilla.mozilla.org/show_bug.cgi?id=1402110
Opening dialogs is buggy. I've written all the code but it doesn't work thanks to the linked Firefox bug.
The text was updated successfully, but these errors were encountered: