X
點擊此處開啟此網站的行動版。

技術支援討論區

How do I force Firefox's spell checker on?

已張貼

Lately, I've come across several Web sites that have attempted to improve upon the default HTML text input tools. This is okay, but some of them go so far as to disable any spell checker facilities built into the browser being used - which I find to be an intolerable abuse of power on the part of the Web site designer. Is there a Greasemonkey script or some other trick I can use to say "Dammit, I don't give a @#$% about your opinion on this, Mr. Designer; *I* want my spell checker!"

And before anyone suggests it, the well-publicized about:config tweaks do not prevent the Web page from overriding this; in that sense, about:config is a suggestion, not a command. How do I make it into a command?

Lately, I've come across several Web sites that have attempted to improve upon the default HTML text input tools. This is okay, but some of them go so far as to disable any spell checker facilities built into the browser being used - which I find to be an intolerable abuse of power on the part of the Web site designer. Is there a Greasemonkey script or some other trick I can use to say "Dammit, I don't give a @#$% about your opinion on this, Mr. Designer; *I* want my spell checker!" And before anyone suggests it, the well-publicized about:config tweaks do not prevent the Web page from overriding this; in that sense, about:config is a suggestion, not a command. How do I make it into a command?
FredMcD
  • Top 10 Contributor
4274 個解決方法 59942 個答案

Type about:config<Enter> in the address bar. If a warning screen comes up, press the Be Careful button. This is where Firefox finds information it needs to run. At the top of the screen is a search bar.

Type: layout.spellcheckDefault Its values are; 0 Spell Checker Off 1 Check Only Multi-Line Input Boxes. 2 Check Multi And Single Line Input Boxes.

Also, check the spellchecker.dictionary entry.

Type '''about:config'''<Enter> in the address bar. If a warning screen comes up, press the '''Be Careful''' button. This is where Firefox finds information it needs to run. At the top of the screen is a search bar. Type: '''layout.spellcheckDefault''' Its values are; 0 Spell Checker Off 1 Check Only Multi-Line Input Boxes. 2 Check Multi And Single Line Input Boxes. Also, check the '''spellchecker.dictionary''' entry.

由 FredMcD 於 修改

cor-el
  • Top 10 Contributor
  • Moderator
17589 個解決方法 159130 個答案

有幫助的回覆

A possibility is to right-click the text area and remove the spellcheck="false" attribute if you only need to do this occasionally.

You can also do this with a bookmarklet or convert this code to a Greasemonkey or Scriptish script

javascript:(function(){var N=document.querySelectorAll('input[spellcheck],textarea[spellcheck]'),I;for(i=0;I=N[i];i++){if(I.getAttribute('spellcheck')=='false'){I.setAttribute('spellcheck','true');alert(I.nodeName+': '+(I.name||I.id))}}})()

You can leave out the alert if you want it to run silently.

A possibility is to right-click the text area and remove the spellcheck="false" attribute if you only need to do this occasionally. You can also do this with a bookmarklet or convert this code to a Greasemonkey or Scriptish script <pre><nowiki>javascript:(function(){var N=document.querySelectorAll('input[spellcheck],textarea[spellcheck]'),I;for(i=0;I=N[i];i++){if(I.getAttribute('spellcheck')=='false'){I.setAttribute('spellcheck','true');alert(I.nodeName+': '+(I.name||I.id))}}})()</nowiki></pre> You can leave out the alert if you want it to run silently.
jscher2000
  • Top 10 Contributor
8800 個解決方法 71984 個答案

Some "rich text" editors actually are non-form HTML elements (or entire embedded blank documents) that have the contenteditable attribute set. If an iframe is involved, it probably is easiest to use a userscript.

For example: https://greasyfork.org/en/scripts/11786-always-can-check-spelling

Some "rich text" editors actually are non-form HTML elements (or entire embedded blank documents) that have the contenteditable attribute set. If an iframe is involved, it probably is easiest to use a userscript. For example: https://greasyfork.org/en/scripts/11786-always-can-check-spelling

提出問題者

FredMcD said

Type about:config<Enter> in the address bar...

Please read the entirety of a person's post before making knee-jerk replies like this. I already knew that this would be an inadequate response, and said so in the original post - precisely to try to head off the unhelpful responses that I knew would come.

''FredMcD [[#answer-768463|said]]'' <blockquote> Type '''about:config'''<Enter> in the address bar... </blockquote> Please read the entirety of a person's post before making knee-jerk replies like this. I already knew that this would be an inadequate response, and said so in the original post - precisely to try to head off the unhelpful responses that I knew would come.
cor-el
  • Top 10 Contributor
  • Moderator
17589 個解決方法 159130 個答案

Note that there might be cases where you do not want to enable automatic spelling check like the Google translate site where you paste or type text in languages of which you do not have a dictionary. When you use a Greasemonkey script then all words might get an underline marking. There may also be websites that use a sophisticated editor and offer their own spelling checker. I personally to prefer such things manually, so I know what is going on instead of doing this automatically. With a button on the Bookmarks Toolbar this is not too difficult unless you encounter this tens of times each day.

Note that there might be cases where you do not want to enable automatic spelling check like the Google translate site where you paste or type text in languages of which you do not have a dictionary. When you use a Greasemonkey script then all words might get an underline marking. There may also be websites that use a sophisticated editor and offer their own spelling checker. I personally to prefer such things manually, so I know what is going on instead of doing this automatically. With a button on the Bookmarks Toolbar this is not too difficult unless you encounter this tens of times each day.
jscher2000
  • Top 10 Contributor
8800 個解決方法 71984 個答案

cor-el said

Note that there might be cases where you do not want to enable automatic spelling check like the Google translate site where you paste or type text in languages of which you do not have a dictionary.
When you use a Greasemonkey script then all words might get an underline marking.

That's a good point. Greasemonkey has a mechanism to manually exclude sites from a script like this that runs on all sites by default. I have attached screen shots showing how that works, but if there are a lot of sites to opt out, it would be a hassle.

''cor-el [[#answer-768710|said]]'' <blockquote> Note that there might be cases where you do not want to enable automatic spelling check like the Google translate site where you paste or type text in languages of which you do not have a dictionary.<br> When you use a Greasemonkey script then all words might get an underline marking.</blockquote> That's a good point. Greasemonkey has a mechanism to manually exclude sites from a script like this that runs on all sites by default. I have attached screen shots showing how that works, but if there are a lot of sites to opt out, it would be a hassle.

提出問題者

cor-el said

Note that there might be cases where you do not want to enable automatic spelling check like the Google translate site where you paste or type text in languages of which you do not have a dictionary.
When you use a Greasemonkey script then all words might get an underline marking.

That sounds much more tolerable than dealing with the total lack of a spell checker.

jscher2000 said

https://greasyfork.org/en/scripts/11786-always-can-check-spelling

Thank you for whipping up that script so quickly; I really appreciate it - however, the site that's been giving me the most grief lately is SourceForge, and your script doesn't seem to work there.

''cor-el [[#answer-768710|said]]'' <blockquote> Note that there might be cases where you do not want to enable automatic spelling check like the Google translate site where you paste or type text in languages of which you do not have a dictionary.<br> When you use a Greasemonkey script then all words might get an underline marking.</blockquote> That sounds much more tolerable than dealing with the total lack of a spell checker. ''jscher2000 [[#answer-768505|said]]'' <blockquote> https://greasyfork.org/en/scripts/11786-always-can-check-spelling </blockquote> Thank you for whipping up that script so quickly; I really appreciate it - however, the site that's been giving me the most grief lately is SourceForge, and your script doesn't seem to work there.
jscher2000
  • Top 10 Contributor
8800 個解決方法 71984 個答案

T.BugReporter said

the site that's been giving me the most grief lately is SourceForge, and your script doesn't seem to work there.

I don't have a Sourceforge account to test.

If the editing control is added or modified dynamically after the page loads, you would need to use the "monkey menu" > User Script Commands > Clear Spellcheck Blockers to modify it. If that doesn't work, the site might be using a hidden input and showing you a clean output. Not sure there is any solution for that.

''T.BugReporter [[#answer-768896|said]]'' <blockquote>the site that's been giving me the most grief lately is SourceForge, and your script doesn't seem to work there. </blockquote> I don't have a Sourceforge account to test. If the editing control is added or modified dynamically after the page loads, you would need to use the "monkey menu" > User Script Commands > Clear Spellcheck Blockers to modify it. If that doesn't work, the site might be using a hidden input and showing you a clean output. Not sure there is any solution for that.
cor-el
  • Top 10 Contributor
  • Moderator
17589 個解決方法 159130 個答案

Did you try the bookmarklet?

It is also possible that the website is using a iframe. You can check that via the right-click context menu in the Inspector.

Did you try the bookmarklet? It is also possible that the website is using a iframe. You can check that via the right-click context menu in the Inspector.