Here is a new version of my toolbar for kamentov, the appearance, as well as the functionality, has changed quite a bit:

perhaps thanks to the active support of users in the form of suggestions and criticism, there will be many more changes and additions
Actually here and the source code: http://webcodes.ru/publ/1-1-0-1971 (I do not know how much the habra effect can withstand, will lag, say, I will transfer where the thread is) a direct link to the JS file , thanks to
SKYnv , fixed a small but nasty bug with a hint
Use it as
with the previous version.bug fixes:
- completely changed the look, made it a "clone" of other similar scripts, now it does not stand out
- changed the actions of the buttons (if you add a user, but do not enter a name, do not paste anything)
+ added syntax highlighting (for now only for JS, although some others will highlight well)
+ added some useful buttons
+ Added a single “feature”, next to each link “reply” a link “collapse” appears which collapses the entire branch of the keys
')
then it would be nice to add a few more languages out of the box, as long as there are no more ideas, it would be nice if you,% userName%, would suggest your desires, suggestions and bug reports ... thanks in advance
UPD: direct link to the JS file servac not so hot, it can sometimes go out
UPD2: mini manual how to insert your own / replace an existing button:
open the file, in the 6th line we see the variable buttons - these are all the buttons that are
let's say you need to change the ± button to the smiley ":)"
look in the buttons of the desired button, in this case it is
{
type: 'text',
caption: '±',
title: 'Plus / Minus',
text: '±'
},
and replace the required fields:
type - the type of the text / delimeter / image button, in our case it is a text button
caption - the short text will be displayed on the button
title - hint that will be shown when hovering.
text - the text that will be inserted into the field when pressed
we change fields like this:
{
type: 'text',
caption: ':-)',
title: 'Plus / Minus',
text: ':)'
},
let's say we need to add the ":(" button after the one just changed:
first we create a button layout, we can take any other one as a basis, take the newly modified one
{
type: 'text',
caption: ':-)',
title: 'Plus / Minus',
text: ':)'
},
and do the same thing as that time:
{
type: 'text',
caption: ':-(',
title: 'Plus / Minus',
text: ':('
},
and insert this piece after the desired button (note the commas)
all available fields:
type - buttons can be of 3 types: image (button in the form of a picture), delimiter (separator) and text (button with text)
src - link to the image that will be displayed on the button (provided that the type is image)
title - a hint that appears when you hover (assuming that the type - image)
text - the text that is inserted when you click on the button (? and %%% are considered control characters, see further,? is also replaced with the selected text in the input field)
processFunc - a function that processes the text before the show (replaces? with the result of the function)
prompt - shows the text input dialog (for example, the nickname of the user to create a link to his profile, the entered text replaces %%% in the text field, for example: text: '<hh user = "%%%">')
caption - the text on the button, provided that the button has the type text
script for opera, for other browsers it will need a little tweak
upd3: change the appearance, now the panel for the entire length of the field, thanks
Dlusskyupd4 if you use a script and are going to rename the script, do not use the name template of the type * .jser.js opera does not pick it up, thanks
SKYnv