Skip navigation.

galanga 的博客

"this is not a blog" - R. Magritte

my.opera-quick-reply.js for Firefox (& Opera)

my.opera-quick-reply.js is an Opera User Javascript by Ayush (Modified by Tamil... and now me - who's next ?) that allows to add formatting tools into the text area of comments in my.opera, and with extra animated smileys (including your own if you want to).

To have the same thing in Firefox (please, don't tell me you use Internet Explorer ...) you have to:
-install the "GreaseMonkey" plugin in Firefox (after installing it, you will have to restart Firefox)
- download this file : my.opera-quick-reply.js
- save the file as my.opera-quick-reply.user.js for example on your Desktop
- open the file in Firefox (drag and drop from the Desktop to the address bar of Firefox, press Enter)
- a dialog will open, asking you if you whan to install the script, accept the install of the script

From now on when you open a Opera comment page in Firefox, you should have all the edition buttons (bold, italic, and so on), including a very smiling smiley, when you click on it it will show all the smileys. Click on a smiley to insert it where the cursor is.

This version of the script also works as Opera UserJS (but you should keep the original name: "my.opera-quick-reply.js") and fixes a problem with the original script : the extra animated smileys can now be inserted into a text line (with the original script each appears alone on a single line, due to the use of the Opera [img] tag).

Rabindranath Tagore : "L'offrande lyrique"Prix Pictet : "Yangtze, The Long River"

Comments

Aprilsnow 四月雪 13. August 2009, 05:38

Thank you very much for taking time writing the instruction, it's very helpful. I followed it all the way even though I am not very sure about step 6 and 7. Anyway, I did get all the smilies in the comment area, not in the main post area though (normal, as you said in the post above) I think I can manage to make it work now!


非常感谢 galanga!

Here is a snap shot of the smilies at the comment area, a bit messed up, but it's OK, I guess this is what you said "strange scroll behavior" on my blog.



Aprilsnow 四月雪 14. August 2009, 06:17

Please don't spend more time debugging the problem, I can solve it by simply turning off greasemonkey when not in use. Today I got another set of smilies, more than enough I can use now...

谢谢你总是帮助我。

galanga 15. August 2009, 05:43

不客气!
the bug your snapshot shows is only when I am anonymous, when I login (as galanga) it appears fine, like this :

Maybe you don't know, but I am a computer science engineer, so this was easy to adapt. The problem is that firefox doesn't have some Javascript functions that are available in Opera because Opera added them to be compatible with websites using the Internet Explorer specific Javascript functions (do you follow ? It's quite messy, isn't it ?).
So the trick is to change the functions that generate an error to the functions available in Firefox.

You probably notice that there's another bug: these smileys are each alone on a line, but this is a problem of the original script (because it uses an IMG tag). But you're animated smiley is on the same line of the text, so from where did you get it ?


Aprilsnow 四月雪 15. August 2009, 06:15

OK, after I logged in the mess is gone, it displayed fine, just like yours, done!

Yeah, I have a general idea about your explanation about the missing Javascript function in Firefox, but please don't say I need to understand what's javascript, that's intimidating.

I discovered my smileys from a Firefox add-on, I haven't figured out everything yet, but I know what's the problem that our smileys can't go after a text. Here is the trick I found out:

<img src="http://files.myopera.com/Tamil/Smilies/Fool.gif">


You have to replace the existing IMG tag with the above line, I did this manually. Do you want a firefox add-on? Let me know if so.

galanga 15. August 2009, 11:45

This is a test : to see if now it works.
Yes, it works now (in both Opera and Firefox) !
I will update the script on my blog post (not now, I will enjoy the sun, right now ).
Thank you very much for this piece of advice !

Aprilsnow 四月雪 16. August 2009, 06:12

Glad it worked, 不用谢!

galanga 17. August 2009, 18:54

I have updated the script, if you want to try.
I discover that there's also something else interesting in this script: you can add your own smileys, to be available next to the animated ones. You have to change the path and add the list of the smileys starting from line 469 to the file (or search for "MySmiliesBase" and "MySmiliesList").
In the version here there is your last smiley (bye_girl) as an example.

Note: and now the same file (with the name unchanged : "my.opera-quick-reply.js") works in Opera as a UserJS file.

Aprilsnow 四月雪 19. August 2009, 03:33

Thanks for the update! I will update it too , so my smilies will be able to go after a text, plus the added bye_girl smiley. It's really nice to have the capability of adding more smilies, good discovery job! :up:

galanga 20. August 2009, 19:25

You're welcome !
It should be also possible to remove smileys, if you know that you will never use some of them, by simply commenting out the corresponding line(s) in the corresponding tables before the "MySmiliesBase".

Aprilsnow 四月雪 22. August 2009, 01:35

Yes, you are right! and I truly believe you are a CS engineer now. p: I was wondering where the final file is located after installation, or say, do I have to go through the installation process (listed in your main post) each time after editing the file (my.opera-quick-reply.js)? You see I don't really understand what happened in the "installation process".

galanga 22. August 2009, 02:34

For the installation process, Firefox behave differently than Opera, it is foreseen that you reinstall each time by following the same process as described.
But you can also modify the file directly, it is located in the following path, if you use Windows (parts between "%" depends on your profile and system) :
c:\Documents and Settings\%your login%\Application Data\Mozilla\Firefox\Profiles\%a directory with numbers and letters%\gm_scripts\-_myopera_formatting_too\

But there the filename is changed to "-_myopera_formatting_too.user.js" , as Firefox seems to take the title of the script to build this filename.

Aprilsnow 四月雪 23. August 2009, 06:01

I found the file, 非常谢谢!

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies