Я ввел много запросов в wolframalpha.com. Когда я возвращаюсь к сайту и пытаюсь ввести в чем-то, что я ввел прежде, ничего не происходит. На других сайтах, как superuser.com, если я ввожу в поле поиска, Firefox помнит мои предыдущие запросы и предлагает их мне. Почему это не работает над Alpha? Я могу заставить его работать со сценарием механика?
<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>
Поле поиска Альфы вольфрама имеет 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!
И вот то, как включить его для определенного сайта с помощью Механика:
// ==UserScript==
// @name Alpha autocomplete on
// @namespace
// @description Enables browser form history for Wolfram Alpha
// @include *wolframalpha.com*
// ==/UserScript==
document.forms[0].setAttribute("autocomplete", "on")