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
GM_openInTab() should obey Firefox tab options #1003
Comments
It's probably best to make use of |
See also: DevjaVu ticket 150 I'm writing a script (or trying to, really) that would fix some broken website behavior, making middle click open new tabs like I expect, for javascript "links". I'm currently running into popup-blocker issues. I investigated GM_openInTab() but it provides neither the option to name the window (a'la window.open()) nor the window object as a return value for using. I can see no particular reason for this, and either or both would appear to only be a benefit. |
So far I've got code that
|
Integrated into official tree. |
I posted a comment on this commit. |
Yeah. Comment on tickets, not commits. That seems to be the right thing to do. I'm not sure about the question there. It would be good to test in older FFs. |
Thought you were testing all patches against just about every FF version ever made. Glad to see you're human after all... ;-) |
Comments on commits show up on the dashboard, however I usually try to focus around the tickets since they email... depends on if one uses the dashboards RSS feed (perhaps with a feed reader that supports emailing too) though and if following/watching an author. I have to test a few things in older FF's now, so I'll add this test to my list. As I stated they should be functionally equivalent for the beginning parameters at a first, quick glance... EDIT: GM_openInTab("http://www.yahoo.com"); and a clean profile with unedited 0.8.20090826.2 RC1 in:
Error: Source File: file:///home/{username}/.mozilla/firefox/{seed}.default/gm_scripts/{scriptname}/{scriptname}.user.js Line: 0
Error: Component returned failure code: 0x804b000a [nsIIOService.newURI] Source File: file:///home/{username}/.mozilla/firefox/{seed}.default/gm_scripts/{scriptname}/{scriptname}.user.js Line: 364 Recommend reopening the ticket and "back to the drawing board"? : Reference: commit |
Psssh..... drop support for suckers still using old builds of Firefox. There's no good reason for not upgrading. |
In light of this, I vote to drop Firefox 1.5 support. It's under one quarter of one percent of our user base, and of course 0.8.1 is available forever, for those few users. Johan? |
I bolded the Firefox versions... hope this makes it easier to see which ones failed... like FF 2.0 failed too... I'm still honing markup skills here on github, so I appreciate everyones patience. |
Whoops! Reading fail on my part. Looks like we'll need to detect FF version and pass parameters conditionally. |
Pass the proper arguments for various FF versions. Detect which version of firefox we are running in, and pass the proper Closed by 8cd7382 |
@arantius or Johan, Can one of you give a quick sample at how the return value is supposed to be used... I'll dig in the commit tomorrow, however whenever I use Error: Permission denied for <http://www.example.com> to get property Window.document from <moz-safe-about:blank>. Source File: file:///home/{username}/.mozilla/firefox/{seed}.default/gm_scripts/{scriptName}/{scriptName}.user.js Line: {lineNumberIn_scriptName}Does open in new tabs correctly via Moz pref setting so far. Thanks. Using a clean profile in Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 with Greasemonkey 0.8.20090920.2 from AMO. |
I'll admit I didn't do much of anything besides check that the return was a "window" object. It doesn't actually seem to be very useful at all. |
Originally: DevjaVu ticket 22
Firefox options allow the user to select whether new tabs open "in the background" or are immediately selected, when created (
browser.tabs.loadInBackground
). GM_openInTab() should obey this setting by default. Optionally, a second parameter could be added to allow the scriptwright to choose a particular behavior.It would be a change in behavior, but it may be appropriate at this time to also add the
Referer
header. This has been requested, and would makeGM_openInTab()
act more like a regularwindow.open()
or new tab navigation created by the user.The text was updated successfully, but these errors were encountered: