We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

javascript-based multi-parameter bookmarks not working in firefox 13

  • 8 个回答
  • 6 人有此问题
  • 4 次查看
  • 最后回复者为 gidklio

more options

I have a javascript-based multiparameter bookmark. Think of it like this: use a keyword to call in the search, then put in two parameters (say, zip code and type of forecast) and it goes straight to the page (my zip code, 7-day. or parents' zip code, hourly) in one shot.

It's sometimes stopped working recently, and I think it's been since I upgraded to FF13. By 'not working' i mean I can restore the bookmark;s "location" to what used to work, and then the shortcut works just fine until .... I don't know. Usually closing firefox and reopening it again and then trying to use the bookmark will cause the browser to just sit there with the entire javascript string in the subject bar.

I have a [http://lifehacker.com/240552/firefox-tip--how-to-set-up-multi+parameter-keyword-searches javascript-based multiparameter bookmark]. Think of it like this: use a keyword to call in the search, then put in two parameters (say, zip code and type of forecast) and it goes straight to the page (my zip code, 7-day. or parents' zip code, hourly) in one shot. It's sometimes stopped working recently, and I think it's been since I upgraded to FF13. By 'not working' i mean I can restore the bookmark;s "location" to what used to work, and then the shortcut works just fine until .... I don't know. Usually closing firefox and reopening it again and then trying to use the bookmark will cause the browser to just sit there with the entire javascript string in the subject bar.

所有回复 (8)

more options

Occasionally the history/bookmarks database can become damaged, but before undertaking surgery, have you tried creating a new bookmark to see whether it will "stick" in that one?

more options

From my observations, it seems that it doesn't work on newly opened tabs, tabs where you didn't visited a single site. After I visited one random site on that tab, and entered the search keyword and parameters, it worked. It also works on the initial start page, because it's about:blank I guess.

(firefox 13.0.1, linux)

more options

It may not work if there is an XUL page like the about:newtab page currently on display.

more options

I can try to test the theory tomorrow. Killing the existing bookmark ("x") and re-pasting it didn't work, though. So far my workaround was to create a series of keywords for first-parameter A, B, C, and D, so that instead of doing "x A 2" or "x D 3" I now would just do "A 2" and "D 3", each of those pulling in its own first-param-specific bookmark. Clunkier, but until I can get a sense of what's really going on, it will have to do the trick.

Do you know why it would fail on a new tab or from about:config?

more options

That comment about new tabs appears to be accurate in my experience so far. So how do we get this issue fixed?

more options

You can create a blank html file on your C drive and make that your new tab page. This code might be sufficient:


<!DOCTYPE html> <html> <head><title>Blank</title></head> <body></body> </html>

If you open that page in Firefox, you can copy the URL from the address bar. Then change a setting in Firefox's about:config preferences editor.

(1) In a new tab, type or paste about:config in the address bar and press Enter. Click the button promising to be careful.

(2) In the filter box, type or paste newtab and pause while the list is filtered

(3) Double-click the browser.newtab.url preference and enter the desired value:

(i) Page thumbnails (default)

browser.newtab.url = about:newtab

(ii) Blank tab

browser.newtab.url = about:blank

(iii) Built-in Firefox home page

browser.newtab.url = about:home

(iv) Any other page

browser.newtab.url = full URL to your new blank page

Press Ctrl+t to open a new tab and verify that it worked. Fixed?

more options

This looks good, thanks! Now, is there a way I was use javascript to select the URL in the URL bar rather than just leaving focus at the end of the line? That way I don't need to do Ctrl+T, then Ctrl+A, then type my keyword. I'd just need the Ctrl+T like normal.

See image -

more options

Never mind about that. I used jscher's suggestion but just deleted the url for newtab entirely, and now I don't have the XUL problem AND I don't have the URL-already-entered problem!