User talk:MarkS/extraeditbuttons.js

// function addCustomButton(imageFile, speedTip, tagOpen, tagClose, sampleText){ mwCustomEditButtons.push({ "imageFile": imageFile,  "speedTip": speedTip,  "tagOpen": tagOpen,  "tagClose": tagClose,  "sampleText": sampleText}); }

Isrc='http://upload.wikimedia.org/wikipedia/'; addCustomButton(Isrc+'en/c/c9/Button_strike.png','Strike',' ',' ','Strike-through text'); addCustomButton(Isrc+'en/e/ea/Button_align_left.png','Left-Align',' \n','\n ','Left-aligned text'); addCustomButton(Isrc+'en/5/5f/Button_center.png','Center',' \n','\n ','Centered text'); addCustomButton(Isrc+'en/6/60/Button_insert_table.png','Table','\n{| border=1 \n|- \n| 1 || 2\n|- \n| 3 || 4','\n|}\n',''); addCustomButton(Isrc+'en/1/13/Button_enter.png','Line break',' ',,); addCustomButton(Isrc+'en/8/80/Button_upper_letter.png','Superscript',,,'Superscript text'); addCustomButton(Isrc+'en/7/70/Button_lower_letter.png','Subscript',,,'Subscript text'); addCustomButton(Isrc+'en/5/58/Button_small.png','Small',' ',' ','Small Text'); addCustomButton(Isrc+'en/3/34/Button_hide_comment.png','Insert hidden Comment','','Comment'); addCustomButton(Isrc+'en/1/12/Button_gallery.png','Insert a picture gallery','\n','Image:FileName.jpg|Caption1\Image:FileName2.jpg|Caption2'); addCustomButton(Isrc+'en/e/e9/Button_headline2.png','Secondary headline','\n===','===','Secondary headline'); addCustomButton(Isrc+'en/8/8e/Button_shifting.png','Insert tab(s)',':','',':'); addCustomButton(Isrc+'en/f/fd/Button_blockquote.png','Insert block of quoted text','\n','\n ','Block quote'); addCustomButton(Isrc+'en/1/1e/Button_font_color.png','Insert colored text',' ',' ','Span of text'); addCustomButton(Isrc+'en/2/23/Button_code.png','Insert code',' ','Code'); addCustomButton(Isrc+'en/9/93/Button_sub_link.png','Insert link to sub-page','Page','Sub_page'); addCustomButton(Isrc+'en/d/d3/Button_definition_list.png','Insert definition list','\n; ',' : ','Insert text'); addCustomButton(Isrc+'commons/3/3b/Button_template_alt.png','Template','','Template name'); addCustomButton(Isrc+'commons/5/5a/Button_category_alt.png','Category','','Category title'); addCustomButton(Isrc+'commons/7/79/Button_reflink.png',' ','Insert reference material'); addCustomButton(Isrc+'commons/a/a0/Button_references_alt.png','Reference footer',' ',,);

//

This a bit optimized code does the same as your code. —Olliminatore 12:28, 13 September 2006 (UTC)

Does anyone know how to get this code suitable for use as an extension for other wikis?--Robnock 09:38, 8 November 2006 (UTC)

This script in other wiki
Hi, This is good script. How I can use it in ar.wp?--OsamaK 10:25, 14 June 2007 (UTC)


 * To use the code as is then simply enter the following into monobook.js on any other wikimedia project:


 * but I don't find this monobook.js, where is it please?


 * monobook.js can be found under User:XXXX/monobook.js  If you don't have this file then create it and paste the code into it. -- Mark  S (talk) 20:20, 23 July 2007 (UTC)

document.write(' ');


 * This should get XEB to work fine in the other project. I have just tested this on my Wiki Commons account. However, doing this would result in the English language version being used in the other project. If you want to change the language then you will need to copy the XEB code and the CSS file which goes with it (details of where to find the files are at the bottom of the XEB home page). Once copied you can amend the code to use the appropriate language. If you are copying between wikimedia projects then there is no need to move the button images as they are in commons and not English wikipedia. Any problems let me know. -- Mark S (talk) 19:52, 14 June 2007 (UTC)


 * Well, I try it in ar.wp. It's good! ,But which file I copy and edit to edit language? (give me like ,Please). Thank you!--OsamaK 14:22, 15 June 2007 (UTC)


 * To change the language you will need to copy the script itself from User:MarkS/extraeditbuttons.js in en.wp to a subpage of your ID in ar.wp (I'd suggest you give the subpage the same name as I'm using). You can then edit the text in the script to update the language as required. I would suggest if you copy the script you also copy the CSS file (User:MarkS/XEB/live.css) to ar.wp at the same time. Copying the XEB script will give you an entirely separate copy. This allows you to change the language or any other part of the script as you wish. However, it would also mean you didn't get any updates to the script.
 * The alternative if you don't want an entirely separate version of the script would be for me to move the parts of the script containing text to display into a separate language file. The script could then be told to use different language files according to user preference. The weakness of this approach is that the language files would need to be updated when the script is changed. I'd be happy to do the english language file but would need other people to update the other language files as necessary.
 * If you have any problems copying the script to ar.wp or want to discuss the second option then let me know. -- Mark S (talk) 20:00, 17 June 2007 (UTC)

Statusbar tooltip
How can I get the tooltip ("speedTip") to appear in the status bar? Firefox doesn't seem to be able to display the tooltip more than once if the mouse cursor is moved over multiple icons, requiring right-clicking and cancelling the popup menu to get another tooltip to display. I'd rather have the tooltip display in the status bar. —Remag Kee 08:33, 8 September 2007 (UTC)

Updates
Hi!

As reported on this script is broken since the recent MediaWiki update.
 * Village_pump_(technical)/Archive_93
 * Wikipedia:Village pump (technical)#Some JS tools broken
 * 31511

Could someone copy the version of this script which is at de:MediaWiki:Gadget-Extra-Editbuttons.js and than copy its translation to English? This way will (hopefully) work again. Helder 13:50, 21 October 2011 (UTC)
 * I've synched it with the sandbox version you linked but it still don't seem to be working. Perhaps work on getting a working version in your own userspace and then I can synch it with this one? – xeno talk 14:46, 21 October 2011 (UTC)
 * Sorry for that. I missed part of the syntax. This will fix the JS errors. Helder 14:50, 21 October 2011 (UTC)
 * Why is it so much smaller than the current version? – xeno talk 16:48, 21 October 2011 (UTC)

Disabled request as no response from OP. &mdash; Martin (MSGJ · talk) 11:00, 25 October 2011 (UTC)

Migration and compatibility with the Enhanced toolbar
Hi!

Could someone do [//en.wikipedia.org/w/index.php?title=User:MarkS/extraeditbuttons.js&oldid=456685582&diff=478303054 this update] to the script to backport some updates which were made on Portuguese Wikipedia? This will make it more compatible with the new version of MediaWiki, fix some errors detected by JSHint and also allows the inclusion of buttons to the enhanced toolbar. Helder 20:29, 22 February 2012 (UTC)
 * There's a lot of changes there so I'll hold off changing the live version for now. Instead, I've put the update into User:MarkS/XEB/dev.js. If you could confirm that you've tested the updates with the browsers required in User:MarkS/Extra_edit_buttons we can then look at making the changes live. Tra (Talk) 06:44, 23 February 2012 (UTC)