MediaWiki talk:Gadget-edittop.js

Gadget on templates with documentation edit

This gadget doesn't work as intended on templates with documentation subpage. Anyway I think it is better to turn off this gadget for templates (by adding wgNamespaceNumber != 10) instead of fixing because actually it is not useful for templates at all. --DixonD (talk) 12:12, 20 February 2011 (UTC)Reply

How does it not work as intended? It should open the template itself for editing (not the first section of the documentation page). Edokter (talk) — 14:12, 20 February 2011 (UTC)Reply
It should but it doesn't. It just copies same links as they are for documentation. Anyway is there any benefit of adding extra edit link for templates if they don't have sections? --DixonD (talk) 17:10, 20 February 2011 (UTC)Reply
Hmm... it does work for me. In fact, the problem you describe has been fixed long ago. Edokter (talk) — 18:31, 20 February 2011 (UTC)Reply
Easy - href for edit link from documentation looks like http://en.wikipedia.org/w/index.php?title=Template:SomeTemplate/doc&action=edit, it doesn't have &section=T, so
  1. if (a.href.indexOf ("&section=T") == -1) doesn't do his work correctly
  2. a.getAttribute ("href", 2).replace (/&section=\d+/, "&section=0") doesn't do anything all.
Actually, I cannot imagine how it could work for you. Maybe is it matter of skin? I use 'vector' one. --DixonD (talk) 06:19, 21 February 2011 (UTC)Reply
I also use vector. I still don't understand the problem though... What do you expect the link to do on a template page? Edokter (talk) — 11:29, 21 February 2011 (UTC)Reply
Actually IMO a link for "editing leading section" is useless on templates at all. But still in case of existence it should provide link for editing template itself but not for editing template documentation. And I explained why it doesn't work. What exact href for the edit link transcluded from documentation you have? --DixonD (talk) 12:06, 21 February 2011 (UTC)Reply
(←) I get http://en.wikipedia.org/w/index.php?title=Template:SomeTemplate&action=edit&section=0, which is correct; the code is doing its job as intended. Are we talking about the same link? The top link in the green part is not touched by this code. Edokter (talk) — 13:18, 21 February 2011 (UTC)Reply
Ok, I think it will be easier if you look at the markup that I get, for example, for Template:!: here it is. --DixonD (talk) 13:34, 21 February 2011 (UTC)Reply
Right, that is not correct. In fact, I have no idea how the [purge] link ended up there. Do you have any gadgets enabled? Edokter (talk) — 13:47, 21 February 2011 (UTC)Reply
Yes, but deactivating them doesn't change anything. In fact, I have no idea how the [purge] link ended up there. Of course, we have it because we are looking for any span with class "plainlinks" and span with links "edit" and "purge" has it as well. Could you also share HTML markup that you get in result so that I could have a look into it? --DixonD (talk) 13:54, 21 February 2011 (UTC)Reply
This is what I get:
<h1 id="firstHeading" class="firstHeading"><span class="editsection">[<a href="/w/index.php?title=Template%3A!&amp;action=edit&amp;section=0" title="Edit lead section">edit</a>]</span>Template:!</h1>
It's looking for a .editsection span. If it then finds one that also has class .plainlinks, it will use that one and modifies the link to replace "&section=T" with "&section=0". The [purge] link does not meet the search criterium, so it should never end up there. I really can find no fault in the code, but I'll let someone else look into it. Edokter (talk) — 15:39, 21 February 2011 (UTC)Reply
Could you also share markup for span with links transcluded from documentation? It seems that you have something quite different in html than me. --DixonD (talk) 16:30, 21 February 2011 (UTC)Reply
(←) This is the HTML for the top [edit] and [purge] links:
<span class="editsection plainlinks" id="doc_editlinks">[<a href="http://en.wikipedia.org/w/index.php?title=Template:!/doc&amp;action=edit" class="external text" rel="nofollow" title="">edit</a>] [<span class="noprint plainlinks purgelink"><a href="http://en.wikipedia.org/w/index.php?title=Template:!&amp;action=purge" class="external text" rel="nofollow"><span title="Purge this page">purge</span></a></span>]</span>
This is the second [edit] link (plus header) in the documentation:
<h3><span class="editsection">[<a href="/w/index.php?title=Template:!/doc&amp;action=edit&amp;section=T-1" title="">edit</a>]</span> <span class="mw-headline" id="Usage">Usage</span></h3>
Both are transcluded versions on the template's page. Edokter (talk) — 17:05, 21 February 2011 (UTC)Reply
So you have
<span class="editsection plainlinks" id="doc_editlinks">
with [edit] and [purge] links. As it has both classes "editsection" and "plainlinks", it copies to the "lead section" in this script. I cannot understand why you get other result. --DixonD (talk) 08:53, 22 February 2011 (UTC)Reply
No; The [purge] link does not have the .editsection class, so it is ignored by the script. Why it ends up at the top in your case remains a mistery. Edokter (talk) — 12:53, 22 February 2011 (UTC)Reply
The [purge] span is inside <span class=editsection /> and since the script copies the whole span.editsection of course the result is [edit][purge] above H1. — AlexSm 18:59, 22 February 2011 (UTC)Reply

(←) There are two issues here. First, Template:Documentation creates the construction <span class=editsection...>[edit] [purge]<span> which imho is not very nice but whatever. The other isssue is the logic error in the script introduced with this big edit in April 2009 (by the way, who needs top [edit] on the page with no <H2>s? I don't know). Anyway, the code

   for (es_count = 0; editspans && es_count < editspans.length; es_count++) {
      span1 = editspans[es_count];
      if (span1.className.indexOf ("plainlinks") == -1)
        break;
    }

stops it finds the first span that's not span.plainlinks OR when there are no more spans left. When there are no good spans (like in Template:!) the code ends up with span.plainlinks which was not the intended behavior. The correct loop would be

    for (var i = 0; editspans && i < editspans.length; i++)
      if (editspans[i].className.indexOf ("plainlinks") == -1){
        span1 = editspans[i];
        break;
     }

If you replace that code this issue should be fixed. — AlexSm 18:59, 22 February 2011 (UTC)Reply

I still don't understand why Dixon sees the problem while I don't on {{!}} in both IE8 en Chrome9 on XP. I'll change the code (which is basically a line-swap). Edokter (talk) — 23:35, 22 February 2011 (UTC)Reply
This basically line-swap changes the logic completely   --DixonD (talk) 11:22, 23 February 2011 (UTC)Reply
I know. Still doesn't explain why I didn't see the problem. Is it fixed now? Edokter (talk) — 11:53, 23 February 2011 (UTC)Reply
Yes, at least for me. --DixonD (talk) 15:27, 23 February 2011 (UTC)Reply

Portuguese translation edit

{{Editprotected}} Please add 'pt' and 'pt-br' translation of "Edit lead section":

   pt: 'Editar a seção superior',
   pt-br: 'Editar a seção superior',

Helder 00:13, 23 February 2011 (UTC)Reply

What is the second line (pr-br) needed for? Edokter (talk) — 00:36, 23 February 2011 (UTC)Reply
The script doesn't knows that if a user has selected 'pt-br' (Brazilian Portuguese) and there is no 'pt-br' translation it should use 'pt' (as a fallback language), so it seems to be needed to add both. Helder 01:13, 23 February 2011 (UTC)Reply
  Done. Edokter (talk) — 01:48, 23 February 2011 (UTC)Reply

MW 1.17 updates and JSHint fixes edit

Could someone implement this changes? Helder 19:53, 11 June 2011 (UTC)Reply

I spotted one error in
a.setAttribute ("href", mw.util.wikiGetlink( mw.config.get( 'wgPageName' ) ) + "?action=edit&section=0");
"?action=" should be "&action=" as ?title= is already the first url parameter. Also, single statements do not need wrapping in {}. Edokter (talk) — 20:45, 11 June 2011 (UTC)Reply
The code mw.util.wikiGetlink( mw.config.get( 'wgPageName' ) ) returns
"https://secure.wikimedia.org/wikipedia/en/wiki/MediaWiki_talk:Gadget-edittop.js"
on the current page, without "?title=", since it uses the value of wgArticlePath (which is equals to "/wikipedia/en/wiki/$1"). I've included the {} because I've validated the code using JSHint, as suggested on mw:Manual:Coding_conventions#JavaScript:
* Validate with JSHint as much as possible. Recommended JSHint settings:
[x] Require curly braces around all blocks;
[x] Don't check line breaks;
[x] Browser
Helder 20:38, 12 June 2011 (UTC)Reply
  Done. Obviously, you use the secure server... on my end, wgArticlePath returns /wiki/$1. Still, the top edit link now points to the wiki URL instead of the full URL the other point to, so not very consistent. The script needs an overhaul anyway; I bet jQuery can slash 75% of the code. Edokter (talk) — 23:10, 12 June 2011 (UTC)Reply

edittop and lefteditlinks? edit

Aloha!

Is there any chance to combine the two respectively the effect of them? Meaning the edit link of the top section appearing next to the page title? No idea how that could be done best, maybe by branching off a "leftedittop.js".

-- Eric — Preceding unsigned comment added by 87.179.156.169 (talk) 15:12, 12 January 2012 (UTC)Reply

Documentation for gadget authors edit

I saw you had done some work on heavily-used gadgets. We're trying to start a library for gadget authors to use. Please check it out and post any questions or comments there. -- MarkAHershberger(talk) 02:10, 9 March 2012 (UTC)Reply

Persian translation edit

Please add:

      fa: 'ویرایش بخش آغازین',

Thanks, Z 19:38, 10 May 2012 (UTC)Reply

  Done Anomie 04:17, 12 May 2012 (UTC)Reply

rtl wikis edit

is it possible to set float for rtl wikis. in these wikis [edit] comes before page titleReza1615 (talk) 11:12, 17 June 2012 (UTC)Reply

  Done. This should now be working. —TheDJ (talkcontribs) 11:12, 4 August 2012 (UTC)Reply

Punjabi wiki don't have it edit

Hello, author/admin. Thanks for such nice tool. I'm using it on English wikipedia but I've not found a preference to use it on Punjabi wiki (pa.wiki). Actually there is no Gadgets setting in the preferences on Punjabi wiki. Please help me how can I make it available there. I strictly need and really miss it there. Please help. Thank you. Tari Buttar (talk) 07:59, 4 August 2012 (UTC)Reply

An administrator there, will need to create a MediaWiki:Gadgets-definition, and define a list of gadgets to be published in the preferences. —TheDJ (talkcontribs) 11:19, 4 August 2012 (UTC)Reply
Thanks for the quicker reply  . I'm an admin there, you can explain to me what to do exactly? Tari Buttar (talk) 13:28, 4 August 2012 (UTC)Reply
In that case I advise you read: mw:Extension:Gadgets. In order to load this gadget, you can create a local gadget on pa.wiki pa:MediaWiki:Gadget-edittop.js which contains
// [[File:Wikipedia_Gadget-edittop.js]] Edittop imported from enWP
mw.loader.load( '//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-edittop.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400' );
You than add the definition :
== appearance ==

* edittop|edittop.js
to the page pa:MediaWiki:Gadgets-definition. Lastly, navigate to pa:Special:Gadgets and fill out/create the remaining description texts to be used to present the interface. —TheDJ (talkcontribs) 13:46, 4 August 2012 (UTC)Reply
Oh thanks! I'm gonna try it. You're welcome on my talk page here and stay in touch. 'll be there if any more help needed about that. Please have a look that there are some spaces in the text between <syntaxhighlight style="overflow: auto"> and </syntaxhighlight> is it okay or there should be no space like URLs? And one more thing that is this text is enough, I mean No need to copy the full source of edittop tool?? Tari Buttar (talk) 14:15, 4 August 2012 (UTC)Reply

Village pump Proposals - Wording and Default edit

Discussion is currently going at WP:Village pump (proposals)/Archive 92#Activate section 0 edit link for everyone about this feature.

Also, a subthread suggests changing the wording from [Edit] to [Edit intro].

There are also suggestions to:

  1. Add an automatic edit-summary-prefix, like other subheaders will give you, e.g. /* Header name */
    • Because currently it just give an empty edit-summary, same as full-page edit
    • [I suggest /* intro */ , or something equally minimal, so that it stands out and gets read, both by the newcomers whilst editing, and watchlist patrollers whilst glancing through lists]
  2. Fix the display in old skins (TheDJ lists the broken skins (Nostalgia, cologneblue, standard and simple), and gives an explanation)

HTH. -- Quiddity (talk) 07:45, 15 August 2012 (UTC)Reply

See ongoing discussion at bugzilla:156 (with a huge CC list! be warned). –Quiddity (talk) 02:12, 15 April 2014 (UTC)Reply

Fixes for m:Change to section edit links edit

Please copy the fixed version from commons:MediaWiki:Gadget-edittop.js. All of the skin- and directionality-specific fixes will no longer be needed after the new version of section edit links is live. Matma Rex talk 16:16, 4 May 2013 (UTC)Reply

All done. It seems they're early... big ugly edit links everywhere! Edokter (talk) — 19:14, 6 May 2013 (UTC)Reply
  Done I copied it verbatim with no guarantee as to its effects. Javascript, being one of the C++ family, leaves me hopelessly confused. --Redrose64 (talk) 19:15, 6 May 2013 (UTC)Reply
I beat you to it, so all you did was actually removed one line. I restored it. Edokter (talk) — 19:17, 6 May 2013 (UTC)Reply
I hit Show changes before Save page and it showed a lot more than this that was different, and on saving, I didn't get an edit conflict. --Redrose64 (talk) 19:45, 6 May 2013 (UTC)Reply
That is weird. I must have saved it right in between those actions. Edokter (talk) — 20:03, 6 May 2013 (UTC)Reply

Vietnamese translation edit

Please add the following item to the localtitles variable:

      vi: 'Sửa phần mở đầu',

Thanks!

 – Minh Nguyễn (talk, contribs) 05:51, 13 May 2013 (UTC)Reply

  Done; thanks. Chris Cunningham (user:thumperward) (talk) 09:11, 13 May 2013 (UTC)Reply
You broke the gadget :( Remove the last trailing comma before }. Matma Rex talk 09:46, 13 May 2013 (UTC)Reply
Fixed. Yay, Javascript. Chris Cunningham (user:thumperward) (talk) 10:03, 13 May 2013 (UTC)Reply

Indonesian & Minangkabau translations edit

      id: 'Sunting bagian atas',
      min: 'Suntiang bagian ateh',

Please add the translations for Bahasa Indonesia and Baso Minangkabau. Kind regards,  Ę-oиė  >>>  ™ 07:43, 14 May 2013 (UTC)Reply

topicon code edit

I've temporarely restored the topicon code. This should be moved to the righteditlinks gadget. Give me a little time. Edokter (talk) — 19:12, 14 May 2013 (UTC)Reply

We have a right edit links gadget ? Sigh, why am I even surprised..... —TheDJ (talkcontribs) 19:58, 14 May 2013 (UTC)Reply
Why does this Edit Top script need the ".style.marginRight" lines exactly? I'm using Monobook and it just seems to unnecessarily add extra space to the right of the protected icons and pending changes box. Gary King (talk · scripts) 19:46, 3 August 2013 (UTC)Reply
Because some users have the edit links aligned to the right. Edokter (talk) — 10:17, 4 August 2013 (UTC)Reply
Okay, so can't we only apply the code for those users? I thought I had something broken in one of my scripts when I applied the Edit Top script yesterday, because it looked so out of place. Gary King (talk · scripts) 16:54, 4 August 2013 (UTC)Reply
Fixed, it's now only active if people use that gadget. —TheDJ (talkcontribs) 08:53, 5 August 2013 (UTC)Reply
And in doing so broke the gadget so the edit link overlapped the icons. The error was that you used a type eval ('===') to compare a string (returned by .get) to an integer. Edokter (talk) — 09:22, 5 August 2013 (UTC)Reply
Oh heavens, I see we have a huge amount of 'mixed case' in the settings. That really shouldn't return a string, it's a boolean option. —TheDJ (talkcontribs) 11:33, 5 August 2013 (UTC)Reply
Reported bugzilla:38141TheDJ (talkcontribs) 11:42, 5 August 2013 (UTC)Reply
Actually bugzilla:52542. Edokter (talk) — 11:49, 5 August 2013 (UTC)Reply
Grr, Safari and it's stupid history caching for redirects... —TheDJ (talkcontribs) 12:09, 5 August 2013 (UTC)Reply

VisualEditor? edit

Per this discussion, it might be an idea for the code to be updated to link to VisEd as well as the "source" code. If that seems like too much coding work, fine—I don't see a very pressing need for it (though some might). Sorry for the non-specific {{editprotected}}, but I don't know what the code would be... Ignatzmicetalk 14:15, 29 June 2013 (UTC)Reply

Use editprotected only for specific edits please, not feature requests. That said, this gadget needs a rewrite anyway. I always planned to do this from scratch. Edokter (talk) — 15:41, 29 June 2013 (UTC)Reply
As a frequent user of the "edit" link in the lead section, it would be good to have this consistent with the rest of the section "edit" links. I'm not yet sold on VisualEditor (I haven't used it yet, actually), but if I do — and for those who do prefer it — it might quickly become annoying not being able to do in the lead what can be done in every other section independently. sroc (talk) 14:51, 3 July 2013 (UTC)Reply
  The edittop [edit] link is about the only one which still behaves sensibly. It's always there (doesn't disappear or change its position), always looks the same, and always does the same thing. --Redrose64 (talk) 20:17, 3 July 2013 (UTC)Reply

jQuery rewrite edit

This gadget has been broken for awhile: neither link is corrected to point to the lead section, because (a) the VisualEditor link is first, but the code only modifies the first link inside the brackets; and (b) VisualEditor now uses the parameter section rather than vesection.

Over at vi:MediaWiki:Gadget-edittop.js, I rewrote the gadget to address these issues and make better use of jQuery's convenience methods. It's a lot shorter and seemingly just as performant. I also removed the body fallback for skins that have neither a #content nor a #mw_content, because those skins have been removed from MediaWiki.

Finally, I added a couple rules to vi:MediaWiki:Gadget-edittop.css to ensure that the brackets are spaced the same way they are in page content. (The first rule isn't necessary due to a rule that was already added to MediaWiki:Modern.css here.)

Please consider adopting this code, because I'm getting tired of manually correcting the section=1 in my URL bar. :^) Let me know if you see anything else that needs fixing.

 – Minh Nguyễn (talk, contribs) 08:36, 31 August 2013 (UTC)Reply

Even with Redrose64's edit, the VisualEditor link still points to the wrong section. That's because the code here still operates on only the first link between the brackets, leaving the second link untouched. The code at vi:MediaWiki:Gadget-edittop.js fixes both links. – Minh Nguyễn (talk, contribs) 20:45, 31 August 2013 (UTC)Reply

Performed. Nyttend (talk) 22:39, 10 September 2013 (UTC)Reply
Sorry, it looks like you accidentally removed whitespace but left everything else as is. So unfortunately the bug remains. I recommend copying vi:MediaWiki:Gadget-edittop.js wholesale.
  Done
If you have time, please also consider copying the last two rules in vi:MediaWiki:Gadget-edittop.css into MediaWiki:Gadget-edittop.css
  Done — Martin (MSGJ · talk) 10:23, 16 September 2013 (UTC)Reply
and referencing that stylesheet from MediaWiki:Gadgets-definition.
Eh? — Martin (MSGJ · talk) 10:23, 16 September 2013 (UTC)Reply
Thank you! – Minh Nguyễn (talk, contribs) 06:11, 11 September 2013 (UTC)Reply
@Mxn: vi:MediaWiki:Gadget-edittop.js seems to have substantial differences to the current version. Can you confirm it is okay to copy over? — Martin (MSGJ · talk) 10:02, 16 September 2013 (UTC)Reply
Yes, it's OK. I simply rewrote the script to use jQuery idioms instead of raw DOM methods, but the logic is identical except for the bug fix I mentioned above. – Minh Nguyễn (talk, contribs) 10:05, 16 September 2013 (UTC)Reply
Okay, done. You're going to have to help me with the last part though. — Martin (MSGJ · talk) 10:23, 16 September 2013 (UTC)Reply
Awesome, the links actually work again! The rest is all just to space out the brackets just like in ordinary headings:
Thanks so much! – Minh Nguyễn (talk, contribs) 05:59, 17 September 2013 (UTC)Reply

  all done! — Martin (MSGJ · talk) 08:51, 17 September 2013 (UTC)Reply

Translation of "top" in summary edit

Hi, is it possible to add translations of that top which is after this change showed in edit summaries? Czech editors would like to rather see úvod there (according to this discussion). Thanks in advance. --16:13, 27 February 2014 (UTC), Utar (talk)

The Czech wiki should probably just copy the script to their own wiki, then just replace the word "top" with whatever they want, if they're not doing that already. Gary (talk · scripts) 16:56, 27 February 2014 (UTC)Reply
Keep in mind that "top" must be equal to the actual id at the top of the page (<a id="top"></a>), otherwise the link in the edit summary does not work. Edokter (talk) — 17:24, 27 February 2014 (UTC)Reply
The pages served by the Czech Wikipedia have the element <a id="top"></a> in the same place as those served by the English Wikipedia. Since the id= is the same, the pre-filled edit summary should be the same. --Redrose64 (talk) 20:38, 27 February 2014 (UTC)Reply
@Edokter: So it asks for renaming one more thing? Or that id in <a id="top"></a> can't be renamed for other reasons? Is this tag a thing also newly added in MediaWiki or is it something older than your change to edittop.js? --20:47, 27 February 2014 (UTC), Utar (talk)
The <a id="top"></a> element has been present in Wikipedia pages for several years. It's inserted by the MediaWiki software into every Wikipedia page (including the Special pages), and AFAIK the sole purpose is to provide a fixed anchor point for the top of the page content, before any site notices and the page title, but below the tabs. We recently decided to utilise "top" in MediaWiki:Gadget-edittop.js because it was known to be constant and (in English, anyway) meaningful. More at Wikipedia:Village pump (technical)/Archive 123#Editing the lede as opposed to editing the whole article. --Redrose64 (talk) 21:21, 27 February 2014 (UTC)Reply
Well yes, making localisation for that top anchor in MediaWiki is probably not the easiest thing, though probably also nothing too difficult. But as Mormegil has pointed out on cswiki technical Village Pump: the correct link from summary to article is in fact not needed. If there is "/* abc */" written in summary it is showed as a link to the headline of that article; in case there is no such headline found, using the link will get you to the top of the article ... which will show you the top section.
So: Can you add localisation for summary link to top section here? Even if it is not correctly linked to that anchor it would still show the asked text in summaries and show you the top section when clicked. If such change is not possible/appreciated here, we might copy the gadget page to cswiki and change that part ourselves. --15:24, 28 February 2014 (UTC), Utar (talk)
You will have to copy the script. It is not a good idea to add changes to our gadgets intended for other Wikipedias. In the future, there will be global gadgets, which allows fo a better mechanism for localization. Edokter (talk) — 22:50, 28 February 2014 (UTC)Reply
We should probably disable the top thing for anything but en.wp —TheDJ (talkcontribs) 15:27, 1 March 2014 (UTC)Reply

Place the cursor at the end of the edit summary textbox edit

Any chance this script could be updated so that the cursor is placed at the end of the textbox? Right now, when editing the lead section, then hitting "Tab" to move to the edit summary textbox, the cursor is at the start of the text. Perhaps make it start at the end instead? This isn't a huge problem, but it'd be nice.

I think something like the following will work (will need to be tweaked a bit; the last line is most important):

var editSummary = $('input[id=wpSummary]');
var currentSummary = editSummary.val();
editSummary.focus().val('').val(editSummary);

Gary (talk · scripts) 19:54, 28 February 2014 (UTC)Reply

Protected edit request on 15 July 2014 edit

Since gerrit:90569, mw.util.wikiGetlink is deprecated and should be replaced by mw.util.getUrl. Could you make replace "wikiGetlink" by "getUrl" on this script? This will make the warning "Use of "wikiGetlink" is deprecated. Use mw.util.getUrl instead." to go away from the console. Helder.wiki 13:27, 15 July 2014 (UTC)Reply

  Done --Krenair (talkcontribs) 13:46, 15 July 2014 (UTC)Reply

Bug report: duplicate article titles edit

There's a bug report at Wikipedia:VisualEditor/Feedback/Archive 2014 3#Doubled_article_title_following_a_VE_edit that involves this gadget. Whatamidoing (WMF) (talk) 22:42, 20 August 2014 (UTC)Reply

I filed this as T71857. The blame is split between VE and the gadget, but it's a lot easier to fix in VE. :) Matma Rex talk 16:33, 21 August 2014 (UTC)Reply

Bug related to VE edit

This gadget gives an incorrect link for VE: it includes parameters &veaction=edit&vesection=1, but it should actually only include &veaction=edit. See here for some relevant discussion. From the explanation given there, it sounds like the right fix would be to add a substitution: any instance of &vesection=1 in the link being duplicated should be deleted. Mike Christie (talk - contribs - library) 01:55, 3 September 2014 (UTC)Reply

done —TheDJ (Not WMF) (talkcontribs) 09:32, 3 September 2014 (UTC)Reply
Thanks; it works perfectly now. Mike Christie (talk - contribs - library) 10:06, 3 September 2014 (UTC)Reply

Protected edit request on 16 September 2014 (add kazakh translation) edit

      kk: 'Кіріспе бөлімді өңдеу',

Please add the translations for kazakh. Arystanbek (talk) 11:26, 16 September 2014 (UTC)Reply

  Done — Martin (MSGJ · talk) 11:38, 16 September 2014 (UTC)Reply

Protected edit request on 9 August 2015 edit

Can you add localtitle: "Редактиране на началото" for "bg" (bgwiki). Thanks. Termininja 07:59, 9 August 2015 (UTC)Reply

  Done. -- [[User:Edokter]] {{talk}} 11:22, 9 August 2015 (UTC)Reply

Protected edit request on 11 August 2015 edit

 bn: 'সূচনা অনুচ্ছেদ সম্পাদনা করুন', 

Please add the translations for bengali. --Aftabuzzaman (talk) 18:34, 11 August 2015 (UTC)Reply

  Done. -- [[User:Edokter]] {{talk}} 19:38, 11 August 2015 (UTC)Reply

Master version location? edit

I think this gadget's master version should be located on MediaWiki.org, the same way how UTCLiveClock and a bunch of other gadgets are. Furthermore, I'd like to have my old coding conventions edits restored to the current version — that is, more spacing, single quotes instead of double and indentation via tabs instead of spaces, as per MediaWiki coding conventions on JavaScript. (I could've done those myself, but I wanted to ensure that this is OK instead of having the changes suddenly overwritten one day.) @Edokter: Would you agree with this proposal? --Jack Phoenix (Contact) 15:29, 25 August 2015 (UTC)Reply

No objections from me. The only problem I see is getting all other project to use the MediaWiki version. -- [[User:Edokter]] {{talk}} 16:03, 25 August 2015 (UTC)Reply

Bug: The link sometimes is unclickable (with righteditlinks in Vector) edit

I use Gadget-righteditlinks.css, which is the setting "Move section [edit] links to the right side of the screen" in the gadget preferences (because I prefer the fixed-to-right position of the links and because it gives a hint if I'm logged in or not).

On a small screen and on pages with long titles such as Athletics at the 2014 Commonwealth Games – Women's 800 metres, depending on the font-size setting ("zoom") in the browser, it sometimes happens that there's no room for the edit link on the same line as the page title, and the link then drops down below the horizontal line (the easiest way to reproduce this is to resize the browser window until it happens).

When that happens, the link becomes unresponsive to clicking (or any mouse action).

This happens with Gadget-righteditlinks and the Vector (default) skin in Firefox, Safari, and Chrome, but not with other skins. --Pipetricker (talk) 09:36, 8 December 2017 (UTC)Reply

The reason I bothered to report the above is that if you encounter this, and (as is quite likely) don't change the zoom level or resize the browser window, this will look like a problem specific to the current article, which may lead you on a wild-goose chase to find which template or other page error is causing it. --Pipetricker (talk) 18:58, 8 December 2017 (UTC)Reply

No padding between brackets and edit links edit

Hello, on Czech Wikipedia (cswiki) there is no padding between enclosing brackets and edit links inside. I'm not sure why, on enwiki this just works nicely and the gadget on cswiki just calls the code here. Also no other gadget is affecting this. Could someone look into this matter and find the cause? --Dvorapa (talk) 20:28, 9 September 2019 (UTC)Reply

@Dvorapa: notably on Special:Gadgets, we are loading both the javascript, and a css: MediaWiki:Gadget-edittop.css. cswiki is not using a css. — xaosflux Talk 20:41, 9 September 2019 (UTC)Reply
Oh, I see, thank you. Is there a way to just import (programmatically) the css from enwiki into cswiki as it is with javascript or do we have to copy/paste the actual code from enwiki? --Dvorapa (talk) 20:57, 9 September 2019 (UTC)Reply
At cs:MediaWiki:Gadget-edittop.css, you should need just one line:
@import "//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-edittop.css&action=raw&ctype=text/css";
I've not tested it. --Redrose64 🌹 (talk) 22:09, 9 September 2019 (UTC)Reply
Yes, it works, just with one exception: When an article does not contain any heading (other than the article title) the gadget does not work at all. Is it an issue or a future? Is there a way to fix this issue? --Dvorapa (talk) 22:44, 9 September 2019 (UTC)Reply
This is normal behaviour where there are no sections. --Redrose64 🌹 (talk) 14:27, 10 September 2019 (UTC)Reply
Okay, thank you then. --Dvorapa (talk) 16:53, 10 September 2019 (UTC)Reply

Suggestion for better lead editing UI edit

 

As noted on WP:VPT, maybe update the displayed text to indicate it's for the lead? -- RoySmith (talk) 14:57, 24 June 2021 (UTC)Reply

Interface-protected edit request on 3 March 2022 edit

 th: 'แก้ไขย่อหน้าแรกสุด', 

Please add the translations for Thai. Bebiezaza (talk) 07:48, 3 March 2022 (UTC)Reply

  Donexaosflux Talk 11:29, 3 March 2022 (UTC)Reply

Poor positioning on Vector-2022 edit

The gadget places the [edit] link adjacent to the page-title. On older skins, that was all below the toolbar at the top, which contained the [edit] link for the whole page. On V2022, the page-title is above that toolbar. So the layout now goes:

[Title] [edit section 0]
[row of links, including [edit] for whole page]
[lead section]
[sections, each with [edit] link]

That's confusing because the edit-section-0 link is not near section-0 and instead a link near the title not near the body suggests that it acts on the whole article. I don't know what the best position is. DMacks (talk) 01:20, 9 February 2023 (UTC)Reply

Gadget causes page layout to shift on pages with a long title edit

This gadget causes page layout to shift on pages whose titles are long enough that the "[ edit | edit source ]" links wrap to another line, but short enough that the title itself fits in one line. The issue affects all skins, but it's most reliable to reproduce on Vector 2022 with limited width enabled. For example the following pages reproduce the problem for me:

Screenshots: loadingfully loaded

Additionally, on Vector 2022 only, this also causes links to sections to be imprecise, as the added line of text causes the whole page to shift under the scroll position. For example:

This could be fixed by reserving space for the link somehow in CSS, so that actually adding the link in JS would not cause the page layout to shift. It would significantly increase the complexity of the code though, so I'm not proposing fixes for now, and just documenting the problem. Matma Rex talk 21:56, 20 February 2023 (UTC)Reply

I proposed a workaround for links to sections in Vector 2022, which is the most annoying part of this problem, in T330108. Matma Rex talk 02:56, 21 February 2023 (UTC)Reply

Edit summary section link to the lead on mobile edit

I opened an issue on Phabricator (phab:T362467) to ask that the /* top */ section link is added to the edit summaries on mobile. Since this gadget is where I got the idea, I figured I should let anyone who watches this page know. (I opened that issue a while ago. I would have written this earlier but I forgot.) Nickps (talk) 00:57, 3 May 2024 (UTC)Reply