X
Nhấn vào đây để đến phiên bản di động của trang web.

Diễn đàn trợ giúp

Firefox fails to handle javascript:void(0) after ocr-url install

Được đăng

Things started with OCR urls. Everything had been working a few weeks ago, but now suddenly Firefox couldn't handle ocr addresses. They would direct me to a page that says: "The address wasn’t understood."

Simple solution for a Debian Linux user, just install ocr-url. I did this and ocr links work perfect, but now I'm getting the same error with javascript:void(0) links. That was quite unexpected. Perhaps I should have done some more investigating before installing ocr-url. Something else may have been wrong and the simple solution may have just covered it up, since that had been working before as well. The ocr links just didn't really raise a red flag as i hadn't tried to use one in a while, but I know javascript:void(0) links were working yesterday.

So now I can't use links in my Amazon account, or any other javascript:void(0) links. I can open Chrome, but it's just ugly and a pain to use on my Debian system. I would really like to get full functionality on Firefox back if anyone can help. Thanks.

In about:config I have the following: services.sync.prefs.sync.javascript.enabled;true javascript.enabled;true network.protocol-handler.external.javascript;true

I have tried in safe mode with same result. What should I look at next?

Things started with OCR urls. Everything had been working a few weeks ago, but now suddenly Firefox couldn't handle ocr addresses. They would direct me to a page that says: "The address wasn’t understood." Simple solution for a Debian Linux user, just install ocr-url. I did this and ocr links work perfect, but now I'm getting the same error with javascript:void(0) links. That was quite unexpected. Perhaps I should have done some more investigating before installing ocr-url. Something else may have been wrong and the simple solution may have just covered it up, since that had been working before as well. The ocr links just didn't really raise a red flag as i hadn't tried to use one in a while, but I know javascript:void(0) links were working yesterday. So now I can't use links in my Amazon account, or any other javascript:void(0) links. I can open Chrome, but it's just ugly and a pain to use on my Debian system. I would really like to get full functionality on Firefox back if anyone can help. Thanks. In about:config I have the following: services.sync.prefs.sync.javascript.enabled;true javascript.enabled;true network.protocol-handler.external.javascript;true I have tried in safe mode with same result. What should I look at next?

Giải pháp được chọn

No. That OCR program shouldn't have any effect unless this link is about that specific protocol.

Does this happen with all links that show javascript:void(0) on hover?

Did you make changes to other protocol prefs?

  • network.protocol-handler.external.javascript

You can rename/remove prefs.js in the profile folder to see if that has effect.

You can create a new profile to test if your current profile is causing the problem.

See "Creating a profile":

If the new profile works then you can transfer files from a previously used profile to the new profile, but be cautious not to copy corrupted files to avoid carrying over problems.

Đọc câu trả lời này trong ngữ cảnh 1

Chi tiết hệ thống bổ sung

Phần bổ trợ đã cài đặt

  • The Evince 3.22.1 plugin handles documents inside the browser window.
  • This plugin provides integration with GNOME Shell for live extension enabling and disabling. It can be used only by extensions.gnome.org
  • Version: 5.41.3.0
  • The IcedTea-Web Plugin executes Java applets.
  • Native Client
  • Shockwave Flash 22.0 r0
  • libpdf.so frontend
  • libpdf.so renderer backend

Ứng dụng

  • Firefox 52.7.3
  • Chuỗi đại diện người dùng: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
  • URL hỗ trợ: https://support.mozilla.org/1/firefox/52.7.3/Linux/en-US/

Tiện ích mở rộng

  • Application Update Service Helper 2.0 (aushelper@mozilla.org)
  • Multi-process staged rollout 1.10 (e10srollout@mozilla.org)
  • Pocket 1.0.5 (firefox@getpocket.com)
  • Web Compat 1.0 (webcompat@mozilla.org)
  • "Manage search engines" button 1.3.0 (jid1-XGhxOf1M8UPpsQ@jetpack) (không hoạt động)
  • Add to Search Bar 2.9 (add-to-searchbox@maltekraus.de) (không hoạt động)
  • Adguard AdBlocker 2.3.8 (adguardadblocker@adguard.com) (không hoạt động)
  • Amazon Assistant for Firefox 10.1612.1.304 (abb@amazon.com) (không hoạt động)
  • Beyond Australis 1.4.4 (thefoxonlybetter@quicksaver) (không hoạt động)
  • Classic Theme Restorer 1.6.0beta3 (ClassicThemeRestorer@ArisT2Noia4dev) (không hoạt động)
  • FoxyProxy Standard 4.5.6 (foxyproxy@eric.h.jung) (không hoạt động)
  • GNOME Shell integration 8.2.1 (chrome-gnome-shell@gnome.org) (không hoạt động)
  • Menu Icons Plus 3.2.1-signed.1-signed (menuiconsplus@codedawn.com) (không hoạt động)
  • Pin It button 1.37.9 (jid1-YcMV6ngYmQRA2w@jetpack) (không hoạt động)
  • Spell checker based on Voikko 2.2 ({b676e3ff-cda7-4e0c-b2b8-74e4bb40a67a}) (không hoạt động)

Javascript

  • incrementalGCEnabled: True

Đồ họa

  • adapterDescription: X.Org -- Gallium 0.4 on AMD KAVERI (DRM 2.43.0 / 4.3.0-0.bpo.1-amd64, LLVM 3.9.1)
  • adapterDeviceID: Gallium 0.4 on AMD KAVERI (DRM 2.43.0 / 4.3.0-0.bpo.1-amd64, LLVM 3.9.1)
  • adapterDrivers:
  • adapterRAM:
  • adapterVendorID: X.Org
  • crashGuards: []
  • currentAudioBackend: pulse
  • driverDate:
  • driverVersion: 3.0 Mesa 13.0.6
  • featureLog: {u'fallbacks': [], u'features': [{u'status': u'blocked', u'description': u'Compositing', u'log': [{u'status': u'blocked', u'message': u'Acceleration blocked by platform', u'type': u'default'}, {u'status': u'force_enabled', u'message': u'Force-enabled by pref', u'type': u'user'}, {u'status': u'blocked', u'message': u'Acceleration blocked by safe-mode', u'type': u'runtime'}], u'name': u'HW_COMPOSITING'}, {u'status': u'unavailable', u'description': u'OpenGL Compositing', u'log': [{u'status': u'unavailable', u'message': u'Hardware compositing is disabled', u'type': u'default'}], u'name': u'OPENGL_COMPOSITING'}]}
  • info: {u'AzureCanvasAccelerated': 0, u'AzureCanvasBackend': u'skia', u'AzureFallbackCanvasBackend': u'none', u'CairoUseXRender': 0, u'AzureContentBackend': u'skia'}
  • numAcceleratedWindows: 0
  • numAcceleratedWindowsMessage: [u'']
  • numTotalWindows: 3
  • supportsHardwareH264: No
  • webgl2Renderer: WebGL is currently disabled.
  • webglRenderer: WebGL is currently disabled.
  • windowLayerManagerRemote: True
  • windowLayerManagerType: Basic

Thay đổi cài đặt

Linh tinh

  • Người dùng JS: Không
  • Có thể tiếp cận: Không
Shadow110 1072 giải pháp 14836 câu trả lời
Được đăng

Câu trả lời hữu ích

Hi, separate Security Issue please uninstall Flash 22.0 r0 as per your Linux flavor suggests and install : Flash Player Version: 29.0.0.140 Current Version https://get.adobe.com/flashplayer/otherversions/ Step 1: Select Operating System Step 2: Select A Version (Firefox, . . . .) Note: Other software is offered in the download. <Windows Only>

Hi, separate Security Issue please uninstall Flash 22.0 r0 as per your Linux flavor suggests and install : Flash Player Version: 29.0.0.140 Current Version https://get.adobe.com/flashplayer/otherversions/ Step 1: Select Operating System Step 2: Select A Version (Firefox, . . . .) Note: Other software is offered in the download. <Windows Only>

Người tạo câu hỏi

I forgot to mention that the correct page actually displays for a split second before going to the error page, which seems strange.

I forgot to mention that the correct page actually displays for a split second before going to the error page, which seems strange.

Được chỉnh sửa bởi Velady vào

cor-el
  • Top 10 Contributor
  • Moderator
17470 giải pháp 157899 câu trả lời
Được đăng

javascript:void(0) is a placeholder URL (href). The actual action is done via an onclick handler attached to the link. If the link isn't working then make sure that you aren't blocking such JavaScript links. The Inspector usually shows an 'ev' button at the end of such a link.


Note that you need to register a protocol to make such a link work.

javascript:void(0) is a placeholder URL (href). The actual action is done via an onclick handler attached to the link. If the link isn't working then make sure that you aren't blocking such JavaScript links. The Inspector usually shows an 'ev' button at the end of such a link. *https://developer.mozilla.org/en/Tools/Page_Inspector ---- Note that you need to register a protocol to make such a link work. *http://kb.mozillazine.org/Register_protocol

Người tạo câu hỏi

Pkshadow. I tried what you suggested, but now javascript:void(0) links go directly to the error page instead of flashing the correct page first.

Sadly, javascript:void(0) links still aren't working. Thanks for the security issue tip, though.

Any other suggestions to try?

Pkshadow. I tried what you suggested, but now javascript:void(0) links go directly to the error page instead of flashing the correct page first. Sadly, javascript:void(0) links still aren't working. Thanks for the security issue tip, though. Any other suggestions to try?

Được chỉnh sửa bởi Velady vào

Người tạo câu hỏi

Hello, Cor-el. I'm trying to figure out the parameters for registering the protocol. I see ev in the links as expected.

Sorry this has me so befuddled, but I think this might be the thing to solve it. I haven't done this before. I have allocated handlers for the browser by editing files, but that was a little different.

What exactly do I put in as the protocol and what command do I use? Then do I map it to the Flash Player I just installed?

gconftool-2 -s /desktop/gnome/url-handlers/foo/command '/path/to/app %s' --type String
gconftool-2 -s /desktop/gnome/url-handlers/foo/enabled --type Boolean true:
Hello, Cor-el. I'm trying to figure out the parameters for registering the protocol. I see ev in the links as expected. Sorry this has me so befuddled, but I think this might be the thing to solve it. I haven't done this before. I have allocated handlers for the browser by editing files, but that was a little different. What exactly do I put in as the protocol and what command do I use? Then do I map it to the Flash Player I just installed? :gconftool-2 -s /desktop/gnome/url-handlers/foo/command '/path/to/app %s' --type String :gconftool-2 -s /desktop/gnome/url-handlers/foo/enabled --type Boolean true:

Được chỉnh sửa bởi Velady vào

cor-el
  • Top 10 Contributor
  • Moderator
17470 giải pháp 157899 câu trả lời
Được đăng

Easiest to do this is to let Firefox handle this by creating an expose pref.

  • network.protocol-handler.expose.foo (or ocr in your case)
Easiest to do this is to let Firefox handle this by creating an expose pref. *network.protocol-handler.expose.foo (or ocr in your case) *http://kb.mozillazine.org/Register_protocol#Firefox_3.5_and_above

Người tạo câu hỏi

OCR is working now. Are you suggesting the ocr-url program I installed is interfering with javascript:void(0)?

OCR is working now. Are you suggesting the ocr-url program I installed is interfering with javascript:void(0)?
cor-el
  • Top 10 Contributor
  • Moderator
17470 giải pháp 157899 câu trả lời
Được đăng

Giải pháp được chọn

No. That OCR program shouldn't have any effect unless this link is about that specific protocol.

Does this happen with all links that show javascript:void(0) on hover?

Did you make changes to other protocol prefs?

  • network.protocol-handler.external.javascript

You can rename/remove prefs.js in the profile folder to see if that has effect.

You can create a new profile to test if your current profile is causing the problem.

See "Creating a profile":

If the new profile works then you can transfer files from a previously used profile to the new profile, but be cautious not to copy corrupted files to avoid carrying over problems.

No. That OCR program shouldn't have any effect unless this link is about that specific protocol. Does this happen with all links that show javascript:void(0) on hover? Did you make changes to other protocol prefs? *network.protocol-handler.external.javascript You can rename/remove prefs.js in the profile folder to see if that has effect. You can create a new profile to test if your current profile is causing the problem. See "Creating a profile": *https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Profile_issues If the new profile works then you can transfer files from a previously used profile to the new profile, but be cautious not to copy corrupted files to avoid carrying over problems. *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

Người tạo câu hỏi

Thank you, cor-el. Finding the boolean:

network.protocol-handler.external.javascript

in about:config and setting it to false did the trick. It only does the trick for void(0) links, however, which was the only problem I had run across until I thought I had it fixed. Now there's another similar javascript problem. It appears it's not completely fixed.

Thank you, cor-el. Finding the boolean: : network.protocol-handler.external.javascript in about:config and setting it to '''false''' did the trick. It only does the trick for void(0) links, however, which was the only problem I had run across until I thought I had it fixed. Now there's another similar javascript problem. It appears it's not completely fixed.

Được chỉnh sửa bởi Velady vào

Người tạo câu hỏi

I seem to have run across another aspect of the same problem with Firefox not handling javascript correctly. I'm getting the same (javascript) error page with:

network.protocol-handler.external.javascript;true

and absolutely nothing happens with;

network.protocol-handler.external.javascript;false

I created network.protocol-handler.expose.javascript and get the dialog to choose an application, but I don't know what to map it to, or even if this is relevant.

So, I'm scratching my head again. It might take me a while to get to the prefs.js and creating a new profile. I have a lot of work to get through before tomorrow morning, which this has interfered with quite a bit. It looks like I'm stuck with Chrome until I can deal with this tomorrow evening.

I seem to have run across another aspect of the same problem with Firefox not handling javascript correctly. I'm getting the '''same''' (javascript) error page with: :network.protocol-handler.external.javascript;'''true''' and absolutely '''nothing''' happens with; :network.protocol-handler.external.javascript;'''false''' I created network.protocol-handler.expose.javascript and get the dialog to choose an application, but I don't know what to map it to, or even if this is relevant. So, I'm scratching my head again. It might take me a while to get to the prefs.js and creating a new profile. I have a lot of work to get through before tomorrow morning, which this has interfered with quite a bit. It looks like I'm stuck with Chrome until I can deal with this tomorrow evening.

Được chỉnh sửa bởi Velady vào

Người tạo câu hỏi

In the end I removed the prefs.js file. Something in it was not happy. Everything is working just as expected now. I forgot about that little file. It seems like flushing that file every once in a while fixes all the little problems. Thanks, cor-el.

In the end I removed the prefs.js file. Something in it was not happy. Everything is working just as expected now. I forgot about that little file. It seems like flushing that file every once in a while fixes all the little problems. Thanks, cor-el.

Người tạo câu hỏi

Velady said

You can rename/remove prefs.js in the profile folder to see if that has effect.
''Velady [[#question-1215730|said]]'' <blockquote> You can rename/remove prefs.js in the profile folder to see if that has effect. </blockquote>