Die Funktionalität dieser Website ist durch Wartungsarbeiten eingeschränkt, die Ihr Erlebnis verbessern sollen. Wenn ein Artikel Ihr Problem nicht löst und Sie eine Frage stellen möchten, können Sie unsere Gemeinschaft über @FirefoxSupport auf Twitter, /r/firefox oder Reddit fragen.

Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Weitere Informationen

"Save link as" in Right-click Context menu is not working properly.

  • 4 Antworten
  • 4 haben dieses Problem
  • 2 Aufrufe
  • Letzte Antwort von ice2112

more options

Firefox 17: In a Google search, when I right click on a .pdf link, the popup window automatically gives a "url" filename and "Firefox Document" as filetype. Previously, the filename would be whatever it was on the website (ie. "filename.pdf") and the filetype would be "Adobe Acrobat Document".

I know this problem has less to do with Firefox and more to do with JavaScript, because the problem disappears if you disable JavaScript (Tools -- Options -- Content -- uncheck "Enable JavaScript"). What's happening is that JavaScript is somehow altering the link from a purely .pdf link to something else -- perhaps encasing the link inside a set of commands, and the computer is trying to save the command string instead of recognizing the link for what it is. When JavaScript is disabled in Google searches, the highlighted "[PDF]" link no longer appears in front of the link itself, and the "Save link as" function on the right-click works properly.

Any JavaScript junkies want to try their hand at creating a workaround? One that ensures that the reference created by the right-click context menu matches exactly what the filename is for the website?

Firefox 17: In a Google search, when I right click on a .pdf link, the popup window automatically gives a "url" filename and "Firefox Document" as filetype. Previously, the filename would be whatever it was on the website (ie. "filename.pdf") and the filetype would be "Adobe Acrobat Document". I know this problem has less to do with Firefox and more to do with JavaScript, because the problem disappears if you disable JavaScript (Tools -- Options -- Content -- uncheck "Enable JavaScript"). What's happening is that JavaScript is somehow altering the link from a purely .pdf link to something else -- perhaps encasing the link inside a set of commands, and the computer is trying to save the command string instead of recognizing the link for what it is. When JavaScript is disabled in Google searches, the highlighted "[PDF]" link no longer appears in front of the link itself, and the "Save link as" function on the right-click works properly. Any JavaScript junkies want to try their hand at creating a workaround? One that ensures that the reference created by the right-click context menu matches exactly what the filename is for the website?

Alle Antworten (4)

more options

The problem is that Google has an onmousedown attribute added to the links that modify a link if you click or right-click a result link to make the link point to a safe browsing check on the Google server.
You can see that if you hover a link and you will notice that after you have (right) click a link the the URL changes to www.google.com/url?xxxxx.

You can use this bookmarklet to remove the onmousedown attributes.

javascript:(function(){var e=document.querySelectorAll('*[id="search"] a[onmousedown]'),E,i;for(i=0;E=e[i];i++){E.removeAttribute('onmousedown')}})()
more options

Hey that's great, thanks for figuring this out. So how do I use that long line of code you provided? I'm not familiar with editing JavaScript. Do I change Firefox or do I modify my Google page in some way?

more options
more options

I found a nice workaround called STRAIGHT GOOGLE. You install it as a Firefox Add-On.


http://userscripts.org/scripts/show/121261 userscripts.org/scripts/source/121261.user.js