Skip navigation.

web:config

tips and tricks for the interwebs

for heavy duty posters

, , , , , ,

I present you with a new script to enhance user experience on my.opera, dubbed Scribit.

The script provides the user the hability to edit all his/her forum posts, blog posts and comments, dev.opera comments and widget discussion's page comments without the need of opening a new webpage with the edit form. The script will create a inline editor, that will replace the original post, or comment, so the user can edit it inplace, therefore making editions much more pleasant and quick. The script also displays a inline toolbar with all the available formatting commands used to produce bbcode. The toolbar is not only displayed in the inline editor, but also in the already existing reply boxes in the forums, blogs and at dev.opera.

This script initially only worked for forum posts and was very simple. I coded version 2.0, to submit to the User Javascript contest but by influence of the others the script never got to the juri's inbox. Oh well...

Screenshot with default setup (standard skin)

Screenshot of Quick Edit link

Screenshot of post quick editing (Oxygen skin)

Instructions
The following keyboard shortcuts are supported in the inline editor, producing bbcode formating. Press Ctrl plus any of the following keys:
  • b - bold
  • i - italic
  • u - underline
  • s - strikethrough
  • p - preformatted code
  • t - insert unordered list
  • l - align text to the left
  • g - center text
  • r - align text to the right
  • j - justify text
  • m - insert image
  • h - create hyperlink
  • e - insert email link
  • f - attach file
  • q - format text as quote
  • w - whisper text
  • ENTER - submit post
Later on, I'll make these easier customizable.

The script's configuration has sensible defaults. The entire UI is drawn using the current Opera skin, therefore providing an extra integration with the browser. Note however, that some skin bugs might be releaved. This script was succcessfully tested with Opera's default skin, and some other popular skins.
You can tweak the editor's behavior, although you need to edit the script itself.

This script does a daily new version check, warning the user of the new script version. You can disable this feature though. Check the configuration kCheckForNewVersion.

This entire script was done by me from scratch. The version check code was imported from the myopera-enhancements script, also made by me, and Robin Zalek. I recomend you to check it out. :cool:
http://my.opera.com/xErath/blog/2009/02/10/my-opera-community-enhancements

Credit also for AyushJ's quick-reply script for some inspiration. :wizard:
http://my.opera.com/community/forums/topic.dml?id=185091

Many thanks to Lars Kleinschmidt as well for testing and feedback. :wink:

However, the script has much to catch up. The roadmap is:
  • finishing html editing support :yikes:
  • supporting html to bbcode convertion and back on the fly
  • adding a 'remove formatting button', trivial for html, hard for bbcode :knight:
  • removing all prompt boxes and replacing them with proper floating
  • menus providing the user input suggestions, like listing his/her files when the attach button is pressed.
  • replacing the default new blog post, new form thread, and new dev opera article
  • making a lovely UI to edit configurations

Etimology: Scribit derives from scribe :spock:

Download the script from:
xerath-myopera-scribit.js
Future versions will be announced here, and the script will notify the user of the new version.

For the geeks
Script documentation is available at, generated using JSDoc:
scribit-documentation.zip

All text strings stored by this script are properly grouped to ease the script's localization. Currently, the suported languages are english and portuguese. Other users are encouraged to contribute. The language is autodetected and will match your UI language, but this can be overriden by setting the kPreferedLanguage configuration variable. If the UI language is not supported, english will be used.

Translations code chunk:
var translations = {
    en:{//plain english 
        L_SUBMIT: 'Submit',
        L_CANCEL: 'Cancel',
        L_QUICK_EDIT: 'Quick edit',
        L_QUICK_EDIT_LINK_TOOLTIP: 'Quick edit this post using inline editor',
        L_ERROR_ON_LOAD: 'Error loading post from server',
        L_LOADING_DATA_STATUS_MSG: 'Loading data from server...',
        L_POST_NOT_CHANGED_NOTIF: 'Post not changed (to quit press Cancel)',
        L_SUBMITTING: 'Submitting...',
        L_ERROR: a'Error',
        ...

Have fun! :cheers:

typical disclaimergallery crawler

Comments

BAMAToNE 17. February 2009, 04:28

This is fantastic! :up: What about Tamil's smilies that are added in the enhancements script?

Not sure if this is known, but the dropdown menu text is hard to read:

Tamil 17. February 2009, 04:38


Can you add an option to merge formatting & content?

Currently, we have to scroll to see smilies at bottom. Can you make smilies to occupy entire text area width similar to this?

FataL 17. February 2009, 06:45

:up:

serious 17. February 2009, 07:13

aw, doesn't look good with kawii :frown: Now I'll have to search another skin cool as that, as your script is so awesome and I surely will keep it ^^


PS: using opera 10 valentine edition qt4 build here

PPS: what skin variable sets the background color for the tabs? in kawii (and many other skins) it is white with wite buttons -> text not readable. I just made a quick workaround in your script by adding style="color:black" to the buttons, but this surely can be set somehow in the skin.

kyleabaker 17. February 2009, 10:51

Nice work!

d.i.z. 17. February 2009, 11:28

Looks nice and works seamlessly.

Just having similar issue to others. With c00 skin text is unreadable.

d.i.z. 17. February 2009, 11:54

BTW. The file http://files.myopera.com/xErath/scribit/scribit-documentation.zip must be rather weirdly packed cause TC shows now files in there :/

xErath 17. February 2009, 12:11

Originally posted by BAMAToNE:

Not sure if this is known, but the dropdown menu text is hard to read:


Are you using the standard skin or a customizedd version? Works just fine here with both kestrel and peregrine. Black text on white background.

Originally posted by Tamil:

Can you add an option to merge formatting & content?


Well, those are dropdown menus. I can make them wider, or even resizable.

Originally posted by serious:

aw, doesn't look good with kawii

Originally posted by d.i.z.:

With c00 skin text is unreadable.


Set kEnableToolbarFancyStyling to false, or switch skin.
Tabs use colors -o-skin("Pagebar Button Skin") and -o-skin("Tab Button Skin.selected")
Menus use text color -o-skin("Help Tooltip Skin")
These work ok in most of the skins I tested: native, standard, ibis, oxygen.
I'm not a designer nor photoshop geek so I couldn't build my own custom skin for the editor, therefore I opted using the browser skin, with the option to disable it.

Originally posted by kyleabaker:

Nice work!

Thank you :smile:

Originally posted by d.i.z.:

BTW. The file http://files.myopera.com/xErath/scribit/scribit-documentation.zip must be rather weirdly packed cause TC shows now files in there :/

**shrugs**.. no files here as well. i'll fix it when I get home..


serious 17. February 2009, 12:11

@d.i.z.: you just have to click the ".." entry about 5 times. the path is: "/../../../../../home/jce/operastuff/userjs/js_docs_out/" ^^

d.i.z. 17. February 2009, 12:33

Originally posted by serious:

you just have to click the ".." entry about 5 times. the path is: "/../../../../../home/jce/operastuff/userjs/js_docs_out/" ^^


Well, seems like TC does not allow me to get up the hierarchy. I see two items with ".." but both navigate out of the zip.
I could use 7zip probably but it's not that important to me right now. :smile:

Originally posted by xErath:

Tabs use colors -o-skin("Pagebar Button Skin") and -o-skin("Tab Button Skin.selected")


Then maybe there is some bug in Opera because Tab Button Skin.selected color in c00 skin is defined as black. I've even trying different other values for -o-skin and neither changed color of the text (Opera 10).

d.i.z. 17. February 2009, 12:49

BAMAToNE 17. February 2009, 14:27

Originally posted by xErath:

Are you using the standard skin or a customized version? Works just fine here with both kestrel and peregrine. Black text on white background.

Negative. "Opera Standard" with no color scheme in latest snapshot (1285).

xErath 17. February 2009, 20:10

Originally posted by serious:

@d.i.z.: you just have to click the ".." entry about 5 times. the path is: "/../../../../../home/jce/operastuff/userjs/js_docs_out/" ^^


:faint:

Originally posted by BAMAToNE:

Negative. "Opera Standard" with no color scheme in latest snapshot (1285).


It seems it's the bug diz is telling.

GeekK 17. February 2009, 21:40

:eyes: Wow. Thank you. Works good, except the 'bug' mentioned.

kyleabaker 17. February 2009, 22:26

I love how the tabs make use of the current theme! That's amazing! Other than the color issue bug, it's working great! It's going to be a most used script for me!

Also, in the Content tab, clicking cancel doesn't cancel as it should when you click the Whisper button. :wink:

Cyro 18. February 2009, 01:24

That's pretty good and yay for Portuguese!

xErath 18. February 2009, 01:48

Originally posted by kyleabaker:

Also, in the Content tab, clicking cancel doesn't cancel as it should when you click the Whisper button. :wink:


You mean, having the empty tags afterwards ? That's by design.

@all, if the skin issue is affecting you and you don't want to switch skin set the following to false
var kEnableToolbarFancyStyling = false;

Also, if you don't like the fullblown tabbar you can disable it by setting the following to false
var kMultipleEditorTabs = true;

Jurgi 19. February 2009, 16:00

Some notes. Tamil has once published similar UserJS (my.opera-quick-reply), buy without quick edit. But my.opera-quick-reply has added some nice emoticons, it would be great to add them also to this invention (preferably under another button).


Currently both of them are working together, but it look strange. I hope the new one will take place of old good my.opera-quick-reply.

What's more would be nice? Uploading files onto account, with catalog choosing. And possibility to edit also header (intro) of an blog entry, currently only main part is loaded. And then it wouls be really PERFECT. Great job, anyway, I love it.

dude09 19. February 2009, 16:05

Nice!!! Thank you. :D

PLnet 19. February 2009, 17:24

Wondering how to turn it on... I'm using My.Opera with russian interface, and no new controls appear here in the comment field?

MetalRaise 19. February 2009, 19:54

I've translated it to German.

scribit_german_translation.txt

Jurgi 19. February 2009, 20:45

Unfortunatelly, one bad bug. Typing national (Polish) letters (AltGr+letter) also bring up formatting and content functions, thus making it impossible to write anything. Example: ę

ra-mon 19. February 2009, 23:06

I've translated it to French.

scribit_french_translation.txt

Nerak 19. February 2009, 23:30

This is flippin' badass. Thank you so much for sharing it with us! :happy:

xErath 20. February 2009, 00:15

@Jurgi, thanks for the bug reports. I'll look over it during the weekend

@all, thanks for the comments and translations :smile:

MetalRaise 20. February 2009, 12:04

I've just made a small change to the translation of L_IS_CONNECTED.
(The text file from my comment above is still valid and contains the updated translation.)

d.i.z. 10. March 2009, 22:16

Originally posted by d.i.z.:

Yeah, bug: http://files.myopera.com/d.i.z./bugs/oskin.html
EDIT: bug DSK-247053


...and fixed (in latest build)

Jurgi 31. March 2009, 09:12

@xErath — anything done with the bug I've reported?

(And I still hope for adding Tamil's QuickReply smilies)

samfresco 21. June 2009, 06:08

hi!! mmhh i noticed a problem :frown:

The script doesn't work in the new My Opera (banana release).

The structure of the html changed a little bit, maybe that's the reason.

I like it!! Very useful when formatting text and adding images!

xErath 22. June 2009, 01:02

Hello everyone.
I posted an update, changelog inside script.
You'll get nagged with the auto-update notification :wink:

samfresco 22. June 2009, 02:34

Wow! So quick! Thank Youuuu! :happy:

I'll download it when I get back home! :smile:

d.i.z. 22. June 2009, 12:07

I suppose not a lot of Polish people use this script because it has problems that makes it unusable.
When pressing shortcut for one of the many polish letters, the formatting options are triggered.
Happens for: ę, ś, ł

I write them by pressing right alt+e/s/l

BAMAToNE 22. June 2009, 14:54

Great! Except..

Maybe I'm going crazy, but... The link in the original post still goes to 2.02 from Feb., and I haven't been notified by any auto-update in the script. So where's the new version?

xErath 22. June 2009, 16:38

Originally posted by d.i.z.:

I write them by pressing right alt+e/s/l


It's fixed!

Originally posted by BAMAToNE:

Maybe I'm going crazy, but... The link in the original post still goes to 2.02 from Feb.,


Homer: Doh! fixed.. I uploaded it to the wrong folder... p:

BAMAToNE 22. June 2009, 20:40

Jurgi 22. June 2009, 21:05

I've downloaded it again and… it's still old version:

* Copyright (c) 2008, João Eiras
* All rights reserved.


Also file comparison shows, that it's identical to old version?

Jurgi 22. June 2009, 21:49

OK, it perhaps needes some time? Now I've got notification and everything seems to work fine. Big Thanks! And for Tamil's emos!

Tamil 22. June 2009, 23:35

samfresco 23. June 2009, 00:59

:cry: I can't make it work!!

What can I be doing wrong? I'm using Opera Beta 1589 (Opera Unite).

OakdaleFTL 23. June 2009, 21:00

…update caught me by surprise! I clicked the link, instead of right-clicking for Save Linked Content As… (No harm done, of course: Copy/Pasted it to an editor and saved from there.)
This is still a highly functional, well-implemented add-on.
Thanks!

xErath 23. June 2009, 22:37

Originally posted by samfresco:

:cry: I can't make it work!!


You need to be more detailed. Above you told it did not work with the new my.opera release. Does that mean that the script works partially but buggy, or does not work at all ?
Have you properly downloaded the script to the right folder ?

samfresco 24. June 2009, 04:47

Hi!! I'm very very sorry!! :frown:

It was me. I don't know how, but in the override.ini file inside Opera profile there was this:

[my.opera.com]
User Prefs|Ignore Target=0
User Prefs|Target Destination=0
User Prefs|Ignore Unrequested Popups=1
User Prefs|Force Encoding
User Prefs|Local CSS File=C:\Archivos de programa\Opera\styles\user.css
User Prefs|Allow script to raise window=1
User Prefs|Allow script to lower window=1
User Prefs|User JavaScript=0
User Prefs|Always Load User JavaScript=0
User Agent|Spoof UserAgent ID=1

[Overrides]
my.opera.com


So, there is
User Javascript=0


I deleted the override entry for my.opera.com and that fixed it!!

CCVo 27. August 2009, 10:59

Originally posted by samfresco:

I deleted the override entry for my.opera.com and that fixed it!!

:idea:

I didn't delete anything. Instead, I changed the relevant User JavaScript values from 0 to 1.
But, hey! Thanks for the tip - I couldn't get the thing to work before - it works great now.banana


BTW:
Just wondering if there might be any way to hook into a few more fonts. Like, some I have installed or can copy to a directory for the purpose. ?????

zikzakatak 20. September 2009, 01:19

i do NOT want to upgrade but every time i load a opera forum page an upgrade spam pop up is sooooooo annoying please how do i stop the upgrade spam.

xErath 20. September 2009, 22:23

Originally posted by zikzakatak:

i do NOT want to upgrade


Why not ? The upgrade has bug fixes, so you should be using it

Originally posted by zikzakatak:

i do NOT want to upgrade but every time i load a opera forum page an upgrade spam pop up


There is only one daily check.

Originally posted by zikzakatak:

how do i stop the upgrade spam.


Search for
var kCheckForNewVersion = true;
and replace true with false, like
var kCheckForNewVersion = false;


I probably should make an external preferences file.

zikzakatak 21. September 2009, 23:53

thanx a lot...


well i dont want to upgrad now.


but also is not daily check every time i load any page on my opera the message pop up...after a while very annoying.

thanx again.

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.

Download Opera, the fastest and most secure browser