Lost password? | Help

[ advanced search ]

[UserJS] Orangoo Spell Check 2

Forums » Opera Community » General Opera topics » User JavaScript

Go to last post

Thursday, 8. March 2007, 18:31:35

d.i.z.

bug hunter

avatar

Posts: 2943

Poland

[UserJS] Orangoo Spell Check 2

This is a continuation of work that Sombria (our Polish female script writer :eyes: :wink:) did some time ago.
Original version was working by opening new popup window, this one is working inline (in the same page).

How it works?
Just click on textarea you want to spell check and you'll see Orangoo button appearing. Click on it and you'll know what to do next.


Features/changes since original version:
  • Works inline (no popups).
  • Works with textareas added dynamically through JS.
  • Increases height of small textareas (enabled by default)
  • Supports keyboard shortcuts:
    - while in textarea:
    CTRL+, (comma) - invoke spell checker
    - while in spell checker window:
    CTRL+Enter - OK
    CTRL+' (apostrophe) - Cancel
  • Keyboard navigation is quite usable. Use spatial navigation (shift+arrows) to navigate in found errors. Use digits 1-9 to choose from listed suggestions. to revert to original word.
  • Prevents submitting when spell check window is still open.
  • Some small other tweaks, changes etc...

orangoo.spell.inline.js

Thursday, 8. March 2007, 19:38:52

Super, great script!

Sombria, congratulations!

Thursday, 8. March 2007, 20:55:38

Stevie1

avatar

Posts: 15

wow, a great script even improved! Very nice.

Thursday, 8. March 2007, 21:15:27

xErath

javascript guru

avatar

Posts: 6418

Norway

Opera Software
d.i.z. could you please translate the config vars comments to english ? p:

Thursday, 8. March 2007, 21:21:51

d.i.z.

bug hunter

avatar

Posts: 2943

Poland

Originally posted by xErath:

d.i.z. could you please translate the config vars comments to english ?


Arent they in english already? :smile:

Thursday, 8. March 2007, 23:05:30

Tamil

Opera :-(|)

avatar

Posts: 110362

Heaven

Thanks d.i.z.

Friday, 9. March 2007, 01:04:33

xErath

javascript guru

avatar

Posts: 6418

Norway

Opera Software

Originally posted by d.i.z.:

Arent they in english already?

oh .. it is p:

Friday, 9. March 2007, 01:50:15

fearphage

Trained Swordsman of Unwanted Opera Termination

avatar

Posts: 2034

USA

Very nice d.i.z

Friday, 9. March 2007, 01:55:12

BAMAToNE

Internet Sensation

avatar

Posts: 1857

Tuscaloosa, AL

Wow, that's pretty neat. Great work! :up:

Saturday, 10. March 2007, 04:51:40 (edited)

GT500

Security Industry

avatar

Posts: 3464

Fighting Malware

Now that is a mighty fine script. You did a great job augmenting Sombria's work. :wink:
(and much thanks to Sombria for the original)

I've been wanting a spell checker for Opera under Vista, and I wasn't too sure about Aspell. This script removes any need for Aspell, and enhances my browsing experience (or at least my blogging experience).

Saturday, 10. March 2007, 05:00:47

GT500

Security Industry

avatar

Posts: 3464

Fighting Malware

OK, I like this script so much that I'm thinking of giving it a page on my Opera Customizations site, alongside Operapedia. d.i.z. would you like it if I did that?

Saturday, 10. March 2007, 08:35:09

d.i.z.

bug hunter

avatar

Posts: 2943

Poland

Originally posted by GT500:

OK, I like this script so much that I'm thinking of giving it a page on my Opera Customizations site, alongside Operapedia. d.i.z. would you like it if I did that?


Nothing should stop you from doing that :wink:

Saturday, 10. March 2007, 09:16:00 (edited)

xErath

javascript guru

avatar

Posts: 6418

Norway

Opera Software
I detect one bug :wink:
Write something then press ctrl+comma to open the spell checker. The textarea should have focus. It's annoying to have to use the mouse, and beats the purpose of a keyboard shortcut.

Saturday, 10. March 2007, 09:25:39

Just a small test with this script, ignore me.
This is incredible. :D

One thing, though: Too bad you can't use the Submit button even though Orangoo is Enabled.

Saturday, 10. March 2007, 09:53:27

Another issue I have found.
If the text form/field/whatever is RTLed, the script doesn't adhere to that and the text box is switched to LTR while in spellchecker mode. :frown:

Saturday, 10. March 2007, 10:43:56

d.i.z.

bug hunter

avatar

Posts: 2943

Poland

Originally posted by xErath:

Write something then press ctrl+comma to open the spell checker. The textarea should have focus.


Yes, I can see this happening when spellchecking happens but no errors are found. Will be fixed.

Originally posted by YtseJam:

Too bad you can't use the Submit button even though Orangoo is Enabled.


That's on purpouse. It's easy to submit form (post comment or something) without OK'ing changes in spell check window first, which will result in posting uncorrected text.

Maybe should be made optional and changeable through config, though.

Originally posted by YtseJam:

If the text form/field/whatever is RTLed, the script doesn't adhere to that and the text box is switched to LTR while in spellchecker mode.


Have to look into it. I don't really know how this whole RTL works (besides being right-to-left).

BTW. On windows 98, keypress keyCode changes while holding ctrl. :eyes: This breaks shortcuts in these old systems. :frown:

BTW2. Forum eats every second linebreak? :irked:

Saturday, 10. March 2007, 11:01:04 (edited)

xErath

javascript guru

avatar

Posts: 6418

Norway

Opera Software

Originally posted by d.i.z.:

Have to look into it. I don't really know how this whole RTL works (besides being right-to-left).


Get direction computed style for the textarea, and assign that value to the generated one.

Originally posted by d.i.z.:

BTW2. Forum eats every second linebreak?

yes. I found that problem too.
http://my.opera.com/community/forums/findpost.pl?id=1946246

Saturday, 10. March 2007, 17:27:59 (edited)

d.i.z.

bug hunter

avatar

Posts: 2943

Poland

Orangoo Spell Check 2.01

Changes:
  • Support for RTL text
  • Reverting to original word wasn't working when done with keyboard
  • Added preventSubmit variable to easily disable this feature if needed
  • Fixed focus issue

orangoo.spell.inline.js

Saturday, 10. March 2007, 17:25:31

Thanks d.i.z., works great! :smile:

Saturday, 10. March 2007, 20:41:53

ar1pe

Meukow

avatar

Posts: 14197

Finland

I have a problem: it does not work for me. (I dl:d it today)
I have dl:ed the js now twice, yes it's in the right folder, yes js is on, yes I've restarted Opera and even Windows.
All other's work fine in that same folder.
Ideas?

Saturday, 10. March 2007, 20:57:54

d.i.z.

bug hunter

avatar

Posts: 2943

Poland

Originally posted by ar1pe:

I have a problem: it does not work for me. (I dl:d it today)


Any errors reported in Message Console? Are you using Opera 9?

Saturday, 10. March 2007, 21:14:02 (edited)

ar1pe

Meukow

avatar

Posts: 14197

Finland

Originally posted by d.i.z.:

Originally posted by ar1pe:

I have a problem: it does not work for me. (I dl:d it today)


Any errors reported in Message Console? Are you using Opera 9?




No messages.

Are you using Opera 9?

Yes. Look at my sig :whistle:

edit: I personally think I've tried everything. But as always, this must be something real simple that I haven't just noticed..... So please: tell me also the stupid things..

Saturday, 10. March 2007, 21:16:00

Saddle Magic

Psycho Chicken What_The_Cluck!

avatar

Posts: 19085

Did you use "Ctrl+," (Ctrl + comma) to activate it? Type something in a text field then hit "Ctrl+,"

Saturday, 10. March 2007, 21:31:54 (edited)

d.i.z.

bug hunter

avatar

Posts: 2943

Poland

Originally posted by ar1pe:

Yes. Look at my sig


Sorry, I have sigs disabled.

One thing that happened to someone else before, was that the file was modified by Proxomitron when downloading. Do you happen to have any of such proxy software enabled? Even firewall or antivirus can do that too but not very likely.

EDIT:

Did you use "Ctrl+," (Ctrl + comma) to activate it? Type something in a text field then hit "Ctrl+,"


Yes, good advice too. In some rare cases Orangoo button might not show up but script will work.

Saturday, 10. March 2007, 21:54:15 (edited)

ar1pe

Meukow

avatar

Posts: 14197

Finland

Originally posted by Saddle Magic:

Did you use "Ctrl+," (Ctrl + comma) to activate it? Type something in a text field then hit "Ctrl+,"



Thanks for the "stupid" idea :D Yes, I tried that: I've read all the information (???) I can get including the first post :frown:

edit: more "stupid" ideas, thank you
edit2: the forums just kicked me out???? Had to log in again...
edit3: @d.i.z.: nope (thanks anyway)
edit4: nope to your edit too
edit5: @d.i.z.: is there another js that might affect this one?
edit6: I created a totally new js folder that has no other js >>>> does not work:(
edit7: took the risk and turned off my firewall and antivirus (downloaded again (this time 4th) > does not work

Saturday, 10. March 2007, 22:25:59

ar1pe

Meukow

avatar

Posts: 14197

Finland

Off to bed. I'll try to come back tomorrow ( maybe not before friday, sorry!)

Sunday, 11. March 2007, 02:34:02

DynaBMan

avatar

Posts: 966

USA

Well, I can't seem to get this script to work for me either. I am running the latest weekly build and I have double checked every setting I can think of. No firewalls are enabled and the rest of my scripts seem to be working fine.

Sunday, 11. March 2007, 05:17:23

GT500

Security Industry

avatar

Posts: 3464

Fighting Malware

Thanks for the update d.i.z.... :wink:

Sunday, 11. March 2007, 12:06:43

DynaBMan

avatar

Posts: 966

USA

Just a quick question here. Do I have to disable Aspell before this script will work? I have it placed in my scripts folder and it is named as the one in the first post is named. When I start typing in a text area, as I am now, no buttons show up and nothing happens when I use Ctrl+,. No error messages show up in the message console. I am using Windows XP with the latest weekly build of Opera. Also, should the script work when composing an email message with M2?

Sunday, 11. March 2007, 12:18:00 (edited)

d.i.z.

bug hunter

avatar

Posts: 2943

Poland

I've made a debug version that spews out a bunch of messages.
For anyone having problems, try this:
  1. Save this script (disable any other version of it)
  2. Open Message Console and clear it
  3. Refresh (F5) this thread
  4. Click once on textarea so it gains focus
  5. Select all messages in message console (CTRL+A, CTRL+C) and show this to me somehow :wink:

debug.js

There is chance there will be no messages at all, it would mean Opera is ignoring this file or not liking it for some reason but we will cover this later eventually.

Originally posted by DynaBMan:

Do I have to disable Aspell before this script will work?


Nope.

Originally posted by DynaBMan:

should the script work when composing an email message with M2?


Nope, scripts are working only in web pages.

Sunday, 11. March 2007, 12:30:22

DynaBMan

avatar

Posts: 966

USA

I figured it out. I have different folders for my scripts because I have some site specific scripts I use. Some of them are for the Opera forums and some are for the Neowin and Mozilla forums and I have the script folder set in Site Prefs for each site. I moved the script to the folder I had chosen for the Opera forums and it started to work. How would be the best way to deal with this problem, I wonder? Should I keep all of my scripts in one folder?

Sunday, 11. March 2007, 12:42:05

HaJotKE

Grumbling Hyper-Critical Cantankerous Curmudgeon!

avatar

Banned User

Germany

Originally posted by DynaBMan:

Should I keep all of my scripts in one folder?

Not necessarily, I am using this method too... :smile:
M/B just put this script in all your folders, so did I... :D

Sunday, 11. March 2007, 13:04:48

DynaBMan

avatar

Posts: 966

USA

Originally posted by HaJotKE:

Not necessarily, I am using this method too... M/B just put this script in all your folders, so did I...



So, you just put copies of the script in your different folders? Is there any chance that will slow Opera down? I really don't know the answer, just wondering aloud.

Sunday, 11. March 2007, 13:05:32

DynaBMan

avatar

Posts: 966

USA

Originally posted by d.i.z.:

Nope, scripts are working only in web pages.



Any chance of getting the script to work with M2?

Sunday, 11. March 2007, 13:15:00

d.i.z.

bug hunter

avatar

Posts: 2943

Poland

Originally posted by DynaBMan:

Any chance of getting the script to work with M2?


Vote: http://my.opera.com/community/forums/topic.dml?id=163169

Sunday, 11. March 2007, 16:02:58

fearphage

Trained Swordsman of Unwanted Opera Termination

avatar

Posts: 2034

USA

why do you keep them all in seperate folders? The files themselves should determine which sites they execute on so there is really no need for that. The only distinction I make in scripts is between normal userjs scripts and real greasmonkey scripts (*.user.js) just because I want to make sure that the greasemonkey helper functions scripts runs before they do although I could myself use one folder for this. You know you can put multiple folders in the userjs path too, check it:

C:\Profiles\Phred\Application Data\Opera\_userjs,C:\Profiles\Phred\Application Data\Opera\_userjs\greasemonkey


It reads the scripts in path order from left to right.

Sunday, 11. March 2007, 18:56:31

DarkGashX

avatar

Posts: 37

Erm mine says it cant find remote server when i try to spell check.

Sunday, 11. March 2007, 19:11:44

d.i.z.

bug hunter

avatar

Posts: 2943

Poland

Yes, same here.
But it's likely to happen from time to time as script relies on third party service that might be down sometimes.

Sunday, 11. March 2007, 19:26:42

DynaBMan

avatar

Posts: 966

USA

Originally posted by fearphage:

why do you keep them all in seperate folders? The files themselves should determine which sites they execute on so there is really no need for that. The only distinction I make in scripts is between normal userjs scripts and real greasmonkey scripts (*.user.js) just because I want to make sure that the greasemonkey helper functions scripts runs before they do although I could myself use one folder for this. You know you can put multiple folders in the userjs path too, check it:



So, it shouldn't matter if all of the scripts are in one folder and shouldn't slow Opera down? If that is the case, then what is the use of being able to choose a specific user script folder in site preferences?

Sunday, 11. March 2007, 20:29:24

Leonan

avatar

Posts: 171

Brazil

Excellent script is of very value.:wink:

Sunday, 11. March 2007, 21:11:13

GT500

Security Industry

avatar

Posts: 3464

Fighting Malware

Originally posted by d.i.z.:

Originally posted by GT500:

OK, I like this script so much that I'm thinking of giving it a page on my Opera Customizations site, alongside Operapedia. d.i.z. would you like it if I did that?


Nothing should stop you from doing that :wink:



Done. :wink:

I did have to remove the two extra periods in the filename to make it compatible with my .htaccess file, but I replaced them with underscores for readability.

Sunday, 11. March 2007, 22:05:59

HaJotKE

Grumbling Hyper-Critical Cantankerous Curmudgeon!

avatar

Banned User

Germany

Originally posted by DynaBMan:

Is there any chance that will slow Opera down?

No slowdown here...
And I like the idea of having extra folders for some special sites, where I use multiple 'UserJavascripts' to make them behave how I need it... :D

M/B there are better solutions, I didn't try every possibility...

I didn't try what *fearphage* proposed, i.e. using multiple scripts in a comma separated list in Site Specific Preferences...
Will try it! :up:

Monday, 12. March 2007, 18:48:10 (edited)

d.i.z.

bug hunter

avatar

Posts: 2943

Poland

Unfortunately we killed Orangoo.

Author have something up it's sleeve so let's see what happens. :smile:

EDIT: Works now.

Monday, 12. March 2007, 19:54:09

GT500

Security Industry

avatar

Posts: 3464

Fighting Malware

The source code for Orangoo Spell Check is available for download. I wonder if I could set it up on my site, and take the extra load off of Orangoo.

d.i.z. can you tell me exactly what you need to make your script work off of my website? Would you need the Python based "Nox Spell Server" installed on my server, or is that not needed for the script to work?

Monday, 12. March 2007, 20:06:05

d.i.z.

bug hunter

avatar

Posts: 2943

Poland

Originally posted by GT500:

Would you need the Python based "Nox Spell Server" installed on my server, or is that not needed for the script to work?


Yes, this is a must for things to work.

But as script works fine now, and author is thinking about possible resolutions for such problems, maybe we should refrain with moving for now.

Monday, 12. March 2007, 20:10:40

GT500

Security Industry

avatar

Posts: 3464

Fighting Malware

Originally posted by d.i.z.:

But as script works fine now, and author is thinking about possible resolutions for such problems, maybe we should refrain with moving for now.



Alright, I'll wait untill we learn what the author has in mind. :wink:

Monday, 12. March 2007, 22:41:01

fearphage

Trained Swordsman of Unwanted Opera Termination

avatar

Posts: 2034

USA

Please let me host this! I have so much bandwidth I would love to use. It will be professionally hosted but my host oversells so I'd love to use some of what i'm paying for. I'll read up on what I need to do.

Tuesday, 13. March 2007, 00:59:34

GT500

Security Industry

avatar

Posts: 3464

Fighting Malware

Originally posted by fearphage:

Please let me host this! I have so much bandwidth I would love to use. It will be professionally hosted but my host oversells so I'd love to use some of what i'm paying for. I'll read up on what I need to do.



Well, I'm not going to stop you. :wink:

Tuesday, 13. March 2007, 12:40:23

fearphage

Trained Swordsman of Unwanted Opera Termination

avatar

Posts: 2034

USA

I set up the demo here. I tried to install the server portion but I couldn't get that functional so for now it relays to google. If I can make it work, I will. Anyone wanna make a better theme/look? I didn't want to blatantly copy the original. An Opera theme wouldn't be too shabby. If you need anything updated, let me know. I am at work this very second so it may have to wait until this evening at the latest.

Tuesday, 13. March 2007, 18:42:18

GT500

Security Industry

avatar

Posts: 3464

Fighting Malware

Originally posted by fearphage:

I set up the demo here...



Cool. :wink:

Forums » Opera Community » General Opera topics » User JavaScript