Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

当サイトはユーザー体験を改善するためのメンテナンスを実施中に機能が制限される予定です。記事を読んでもあなたの問題が解決せず質問をしたい場合は、Twitter の @FirefoxSupport、Reddit の /r/firefox で、サポートコミュニティが皆さんを助けようと待機しています。

Mozilla サポートの検索

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

詳しく学ぶ

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

javascript bookmarklet doesn't work in blank new tab

  • 6 件の返信
  • 2 人がこの問題に困っています
  • 1 回表示
  • 最後の返信者: ericr23

more options

I use the Quixapp javascript bookmarklet (which pops up a dialog for a variety of web shortcuts). I have the Firefox startup page set to blank. The Quixapp bookmarklet works fine from most any page, including the Firefox "home" page and a new blank PAGE, but it does not work at all in a new blank TAB. If I control-click the Quixapp bookmarklet (it's in my toolbar) and have it open in a new tab, it works fine, including when I do that from a blank tab where it doesn't work otherwise. The behavior is the same in safe mode.

I use the Quixapp javascript bookmarklet (which pops up a dialog for a variety of web shortcuts). I have the Firefox startup page set to blank. The Quixapp bookmarklet works fine from most any page, including the Firefox "home" page and a new blank PAGE, but it does not work at all in a new blank TAB. If I control-click the Quixapp bookmarklet (it's in my toolbar) and have it open in a new tab, it works fine, including when I do that from a blank tab where it doesn't work otherwise. The behavior is the same in safe mode.

この投稿は ericr23 により に変更されました

選ばれた解決策

You can set the new tab page to about:blank by modifying the browser.newtab.url pref on the about:config page.

この回答をすべて読む 👍 0

すべての返信 (6)

more options

https://www.quixapp.com/

Is this the bookmarklet?

javascript:Quix();function%20Quix(){var%20e=encodeURIComponent;var%20t=window.getSelection?window.getSelection():(document.getSelection?document.getSelection():(document.selection?document.selection.createRange().text:''));var%20c=window.prompt('Quix:%20Type%20`help`%20for%20a%20list%20of%20commands:');if(t!=''){if(c){c+='%20'+t;}else{c=''+t;}}if(c){var%20u='https://www.quixapp.com/go/?c='+e(c)+'&t='+(document.title?e(document.title):'')+'&s='+'&v=090'+'&u='+(document.location?e(document.location):'');d=''+document.location;if(d.substr(0,4)!='http'){window.location=u+'&mode=direct';}else{heads=document.getElementsByTagName('head');if(c.substring(0,1)=='%20'){var%20w=window.open(u+'&mode=direct');w.focus();}else%20if(heads.length==0){window.location=u+'&mode=direct';}else{q=document.getElementById('quix');if(q){q.parentNode.removeChild(q);}sc=document.createElement('script');sc.src=u;sc.id='quix';sc.type='text/javascript';void(heads[0].appendChild(sc));}}}}

In case one of our JavaScript gurus can figure out why it doesn't work in a blank tab.

https://www.quixapp.com/browsers/firefox/ Have you tried setting up a Hotkey? But that would need this extension, somewhat defeating why a person would use that bookmarklet. https://addons.mozilla.org/en-US/firefox/addon/sitelauncher/

more options

Is that page a disabled about:newtab page?

You would have to set another page as the new tab page to make that work. Bookmarklets do not work on such XML pages.

more options

That is indeed the bookmarklet in question, although mine also has a call to a custom set of commands.

more options

You nailed it, cor-el. If I enter about:newtab in the address field, then the javascript doesn't work. If I then enter about:blank, it works.

Any way to get a new tab to work like a blank?

more options

選ばれた解決策

You can set the new tab page to about:blank by modifying the browser.newtab.url pref on the about:config page.

more options

That fixed it -- many thanks, cor-el!