搜索 | 用户支持

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

详细了解

Button to clear address bar contents, like the 'xclear' addon. Is it available? Is it possible to create with the new addon API?

  • 1 个回答
  • 1 人有此问题
  • 13 次查看
  • 最后回复者为 Mkll

more options

I am using Firefox in Linux, where the normal copy-paste method is to simply select some text (it is then selected automatically) and middle click somewhere to paste. However, when trying to paste an URL in the address bar of Firefox when an URL is already present, one has to either:

-select all hit delete, switch back to wherever you selected your new URL (because selecting the current location will have overwritten the clipboard) and switch back to Firefox again to middle click in the now empty address bar.

-single click somewhere in the address bar and backspace the entire URL until the bar is empty, then middle click. This is tedious and requires switching between mouse and keyboard and back.

In Linux, basically every input field has a little x-button in it, which clears the contents of the field and I am saddened Firefox does not provide this. I have used an add-on called 'xclear' up until now that provided this button (see attached screenshot) but it no longer works with the new webextension API. A similar question was asked here (https://askubuntu.com/questions/202260/how-to-clear-a-firefox-address-bar-without-selecting-its-content), but all suggested add-ons that provided this functionality are incompatible with Firefox quantum.

Am I missing something? Is there an obvious solution? I have also browsed through the new API and I think there is a possibility to create a button in the address bar, but I can't seem to find any way to have it clear the contents of the bar. Also, this still leaves the search bar with the same issue.

I am using Firefox in Linux, where the normal copy-paste method is to simply select some text (it is then selected automatically) and middle click somewhere to paste. However, when trying to paste an URL in the address bar of Firefox when an URL is already present, one has to either: -select all hit delete, switch back to wherever you selected your new URL (because selecting the current location will have overwritten the clipboard) and switch back to Firefox again to middle click in the now empty address bar. -single click somewhere in the address bar and backspace the entire URL until the bar is empty, then middle click. This is tedious and requires switching between mouse and keyboard and back. In Linux, basically every input field has a little x-button in it, which clears the contents of the field and I am saddened Firefox does not provide this. I have used an add-on called 'xclear' up until now that provided this button (see attached screenshot) but it no longer works with the new webextension API. A similar question was asked here (https://askubuntu.com/questions/202260/how-to-clear-a-firefox-address-bar-without-selecting-its-content), but all suggested add-ons that provided this functionality are incompatible with Firefox quantum. Am I missing something? Is there an obvious solution? I have also browsed through the new API and I think there is a possibility to create a button in the address bar, but I can't seem to find any way to have it clear the contents of the bar. Also, this still leaves the search bar with the same issue.
已附加屏幕截图

由bastimmer于修改

所有回复 (1)

more options

Unfortunately, right now this is not an option. There are two workarounds however, that I can provide:

1) Click on/in the Address Bar then on your keyboard press Ctrl + A, then press the backspace, or delete button to clear it. Same goes for the search bar.

2) See also these browser.urlbar.*click prefs on the about:config page.

  • browser.urlbar.clickSelectsAll
  • browser.urlbar.doubleClickSelectsAll

You can open the about:config page via the location/address bar. You can accept the warning and click "I accept the risk!" to continue.

由Mkll于修改