X
點擊此處開啟此網站的行動版。

技術支援討論區

auto close tabs that open when clicking download links

bjh
已張貼

When clicking on a download link, Firefox sometimes opens a new tab to download the file and never closes it. I had found an add-on that closed that tab soon after opening it in the Add-on section. Last night I had a HD crash and had to do a reformat and re-installation of Windows and all my software. I had not made a backup of Firefox with the installed add-ons recently, so when I restored from the backup that add-on wasn't there.

Does anyone know the name of the add-on that I'm referring to so I can reinstall it and not have to close the tabs manually?

When clicking on a download link, Firefox sometimes opens a new tab to download the file and never closes it. I had found an add-on that closed that tab soon after opening it in the Add-on section. Last night I had a HD crash and had to do a reformat and re-installation of Windows and all my software. I had not made a backup of Firefox with the installed add-ons recently, so when I restored from the backup that add-on wasn't there. Does anyone know the name of the add-on that I'm referring to so I can reinstall it and not have to close the tabs manually?
引用

額外的系統細節

應用程式

  • User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0

更多資訊

cor-el
  • Top 10 Contributor
  • Moderator
17580 個解決方法 159053 個答案

A possible workaround to prevent opening a new tab is to use "Save Link As" in the right-click context menu instead of left-clicking the link.

A possible workaround to prevent opening a new tab is to use "Save Link As" in the right-click context menu instead of left-clicking the link.
這篇文章有幫助嗎? 0
引用
Dinushi Dhananjani
  • Top 25 Contributor
4 個解決方法 199 個答案

Click Start, select “Control panel” option

   Open “Uninstall a program”
   Uninstall all suspicious and unknown applications
   Reset Firefox settings
   Download AdwCleaner and scan your computer
   and remove any malware found
Click Start, select “Control panel” option Open “Uninstall a program” Uninstall all suspicious and unknown applications Reset Firefox settings Download AdwCleaner and scan your computer and remove any malware found
這篇文章有幫助嗎?
引用
Dinushi Dhananjani
  • Top 25 Contributor
4 個解決方法 199 個答案

You must Intercept the download links.

   You must send the link to a new tab when 

it is clicked, and not just modify it with target="_blank". The tab must be opened with javascript, so that javascript will be allowed to close it when the time comes.

   Your script must also run-on / handle the 

"popup" tab, so that it can detect when to close the popup.

For this discussion, refer to

this test page at jsFiddle. 

It is structured like this:

where the a.dwnPageLink

links each open a "Download page"
-- which automatically starts a 

file download after a short delay.

You must Intercept the download links. You must send the link to a new tab when it is clicked, and not just modify it with target="_blank". The tab must be opened with javascript, so that javascript will be allowed to close it when the time comes. Your script must also run-on / handle the "popup" tab, so that it can detect when to close the popup. For this discussion, refer to this test page at jsFiddle. It is structured like this: <div id="downloadLinks"> <ul> <li><a class="dwnPageLink" href="http://fiddle.jshell.net/cDTKj/show/"> Test file, download page at jsFiddle </a> </li> <li><a class="dwnPageLink" href="http://dw.com.com/redir..."> TextPad (a great text editor), download page at CNET / Download </a> </li> </ul> </div> where the a.dwnPageLink links each open a "Download page" -- which automatically starts a file download after a short delay.
這篇文章有幫助嗎?
引用
Dinushi Dhananjani
  • Top 25 Contributor
4 個解決方法 199 個答案

Dinushi Dhananjani said

You must Intercept the download links. You must send the link to a new tab when it is clicked, and not just modify it with target="_blank". The tab must be opened with javascript, so that javascript will be allowed to close it when the time comes. Your script must also run-on / handle the "popup" tab, so that it can detect when to close the popup. For this discussion, refer to this test page at jsFiddle. It is structured like this:

where the a.dwnPageLink

links each open a "Download page"
-- which automatically starts a 

file download after a short delay.

''Dinushi Dhananjani [[#answer-1263022|said]]'' <blockquote> You must Intercept the download links. You must send the link to a new tab when it is clicked, and not just modify it with target="_blank". The tab must be opened with javascript, so that javascript will be allowed to close it when the time comes. Your script must also run-on / handle the "popup" tab, so that it can detect when to close the popup. For this discussion, refer to this test page at jsFiddle. It is structured like this: ''' <div id="downloadLinks"> <ul> <li><a class="dwnPageLink" href="http://fiddle.jshell.net/cDTKj/show/"> Test file, download page at jsFiddle </a> </li> <li><a class="dwnPageLink" href="http://dw.com.com/redir..."> TextPad (a great text editor), download page at CNET / Download </a> </li> </ul> </div>''' where the a.dwnPageLink links each open a "Download page" -- which automatically starts a file download after a short delay. </blockquote>
這篇文章有幫助嗎?
引用

提出問題者

cor-el said

A possible workaround to prevent opening a new tab is to use "Save Link As" in the right-click context menu instead of left-clicking the link.

Dosn't seem to work when trying to download video files.

''cor-el [[#answer-1263009|said]]'' <blockquote> A possible workaround to prevent opening a new tab is to use "Save Link As" in the right-click context menu instead of left-clicking the link. </blockquote> Dosn't seem to work when trying to download video files.
這篇文章有幫助嗎?
引用
Senali Madawala
  • Top 25 Contributor
2 個解決方法 157 個答案

Reset the browser.

   1.Go to about:config via your Address Bar.
   2.Press the button saying you'll be careful.
   3.Search for browser.newtab.url.
   4.Right click -> Reset.
   5.You might also want to check for any prefs Trovi has set. ...
   6.You might have to restart Firefox for this to work.
Reset the browser. 1.Go to about:config via your Address Bar. 2.Press the button saying you'll be careful. 3.Search for browser.newtab.url. 4.Right click -> Reset. 5.You might also want to check for any prefs Trovi has set. ... 6.You might have to restart Firefox for this to work.
這篇文章有幫助嗎?
引用

提出問題者

browser.newtab.url was not found in search

browser.newtab.url was not found in search
這篇文章有幫助嗎?
引用
cor-el
  • Top 10 Contributor
  • Moderator
17580 個解決方法 159053 個答案

If you left-click a link then Firefox will first try to open the link in a new file. If Firefox notices that it can't display the file then you get a download dialog, but Firefox may not close the tab. If you can't right-click and use "Save Link As" as a workaround then you will have to close the tab manually yourself.

I don't know if there are extensions that will close the tab automatically in this case.

If you left-click a link then Firefox will first try to open the link in a new file. If Firefox notices that it can't display the file then you get a download dialog, but Firefox may not close the tab. If you can't right-click and use "Save Link As" as a workaround then you will have to close the tab manually yourself. I don't know if there are extensions that will close the tab automatically in this case.
這篇文章有幫助嗎?
引用
問個問題

如果您還沒有帳號,您必須先 登入您的帳號 來回覆文章。請 開始一個新問題