为什么 Firefox 不记得我之前在 Wolfram Alpha 上的搜索?

end*_*ith 3 firefox greasemonkey wolfram-alpha

我在 wolframalpha.com 中输入了很多查询。当我返回站点并尝试输入我以前输入过的内容时,没有任何反应。在其他网站上,例如 superuser.com,如果我在搜索框中输入内容,Firefox 会记住我之前的查询并向我推荐它们。为什么这在 Alpha 上不起作用?我可以让它与greasemonkey脚本一起工作吗?

<form method="get" action="/input/" accept-charset="UTF-8" autocomplete="off">
    <div id="input-background">
        <input name="i" id="i" maxlength="200" autocapitalize="off" type="text">
        <a id="iClear" style="display: none;"></a>
        <label class="hidden" for="equal">Calculate</label>
        <input id="equal" title="compute" value="Submit" type="submit">
        <div id="howTo"></div>
    </div>
</form>
Run Code Online (Sandbox Code Playgroud)

Sat*_*hat 5

Wolfram Alpha 的搜索框具有autocomplete="off"属性,因此浏览器会尊重这一点,并且输入框未填写。我找不到任何油脂猴脚本来更改此行为


然而,还有一个替代方案请记住 - 这将为所有内容启用自动完成

1. Locate Firefox’s installation folder. Normally that’s C:\Program Files\Mozilla Firefox

2. Navigate to the components folder.

3. Open nsLoginManager.js in an editor.  As Notepad won’t do really, do this instead [if you've a proper editor, just go to step 4]:

3a) Select  Start | Run

3b) Enter cmd <enter or Ok>

3c) type cd C:\Program Files\Mozilla Firefox\components <enter>

3d) type edit nsLoginManager.js <enter>

3e) Go to step 4.

4. Find this:

    /*
     * _isAutoCompleteDisabled
     *
     * Returns true if the page requests autocomplete be disabled for the
     * specified form input.
     */
    _isAutocompleteDisabled :  function (element) {
        if (element && element.hasAttribute("autocomplete") &&
            element.getAttribute("autocomplete").toLowerCase() == "off")
            return true;

        return false;
    },
5. Change it to this:

    /*
     * _isAutoCompleteDisabled
     *
     * Returns true if the page requests autocomplete be disabled for the
     * specified form input.
     */
    _isAutocompleteDisabled :  function (element) {
        return false;
    },
6. Save the file [if you're following the 3x) steps above, select File | Exit, and when asked if you want to save the edited file, answer Yes.  To close the command prompt, enter exit <enter>].

Note that you might first have to change the file’s security permissions to do this [you DO if the save fails].  E.g., in Vista I had to A) right-click on the file [e.g., in Explorer] B) select Properties | Security. B) select Edit. C) select your username, D) change the persmissions to include Write access.

And you’re done – either start, or close/re-start Firefox!
Run Code Online (Sandbox Code Playgroud)