MediaWiki talk:Gadget-edittop.js

message: 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)
replies: text: What is the second line (pr-br) needed for?  — Edokter (talk) —  00:36, 23 February 2011 (UTC)
replies: text: 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)
replies: text: .  — Edokter (talk) —  01:48, 23 February 2011 (UTC)
thread_title:  Portuguese translation 

message: 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)
thread_title:  edittop and lefteditlinks? 

message: 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)
thread_title:  Documentation for gadget authors 

message: Please add:
      fa: 'ویرایش بخش آغازین',
Thanks, Z 19:38, 10 May 2012 (UTC)
replies: text: Done Anomie⚔ 04:17, 12 May 2012 (UTC)
thread_title:  Persian translation 

message: is it possible to set float for rtl wikis. in these wikis [edit] comes before page titleReza1615 (talk) 11:12, 17 June 2012 (UTC)
replies: text: . This should now be working. —TheDJ (talk • contribs) 11:12, 4 August 2012 (UTC)
thread_title: rtl wikis

message: 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:
# 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]
# 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)
replies: text: See ongoing discussion at bugzilla:156 (with a huge CC list! be warned). –Quiddity (talk) 02:12, 15 April 2014 (UTC)
thread_title:  Village pump Proposals - Wording and Default 

message: 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)
replies: text: All done. It seems they're early... big ugly edit links everywhere!  — Edokter (talk) —  19:14, 6 May 2013 (UTC)

text: 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)
replies: text: 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)
replies: text: I hit  before  and it showed  that was different, and on saving, I didn't get an edit conflict. --Redrose64 (talk) 19:45, 6 May 2013 (UTC)
replies: text: That is weird. I must have saved it right in between those actions.  — Edokter (talk) —  20:03, 6 May 2013 (UTC)
thread_title:  Fixes for [[m:Change to section edit links]] 

message: 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)
replies: text: ; thanks. Chris Cunningham (user:thumperward) (talk) 09:11, 13 May 2013 (UTC)
replies: text:  You broke the gadget :( Remove the last trailing comma before }. Matma Rex talk 09:46, 13 May 2013 (UTC)
replies: text:  Fixed. Yay, Javascript. Chris Cunningham (user:thumperward) (talk) 10:03, 13 May 2013 (UTC)
thread_title:  Vietnamese translation 

message: 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)
thread_title:  Indonesian & Minangkabau translations 

message: 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)
replies: text: We have a right edit links gadget ? Sigh, why am I even surprised..... —TheDJ (talk • contribs) 19:58, 14 May 2013 (UTC)
replies: text:  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)
replies: text: Because some users have the edit links aligned to the right.  — Edokter (talk) —  10:17, 4 August 2013 (UTC)
replies: text:  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)
replies: text: Fixed, it's now only active if people use that gadget. —TheDJ (talk • contribs) 08:53, 5 August 2013 (UTC)
replies: text: 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)
replies: text: 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 (talk • contribs) 11:33, 5 August 2013 (UTC)

text: Reported bugzilla:38141 —TheDJ (talk • contribs) 11:42, 5 August 2013 (UTC)
replies: text: Actually bugzilla:52542.  — Edokter (talk) —  11:49, 5 August 2013 (UTC)
replies: text: Grr, Safari and it's stupid history caching for redirects... —TheDJ (talk • contribs) 12:09, 5 August 2013 (UTC)
thread_title:  topicon code 

message: 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 , but I don't know what the code would be... Ignatzmice•talk 14:15, 29 June 2013 (UTC)
replies: text: 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)
replies: text: 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)
replies: text:  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)
thread_title:  VisualEditor? 

message: 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)
thread_title:  Place the cursor at the end of the edit summary textbox 

message: 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)
replies: text: --Krenair (talk • contribs) 13:46, 15 July 2014 (UTC)
thread_title:  Protected edit request on 15 July 2014 

message: 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)
replies: text: I filed this as . 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)
thread_title:  Bug report:  duplicate article titles 

message: 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)
replies: text: done —TheDJ (Not WMF) (talk • contribs) 09:32, 3 September 2014 (UTC)
replies: text: Thanks; it works perfectly now. Mike Christie (talk - contribs -  library) 10:06, 3 September 2014 (UTC)
thread_title:  Bug related to VE 

message: kk: 'Кіріспе бөлімді өңдеу',
Please add the translations for kazakh. 
Arystanbek (talk) 11:26, 16 September 2014 (UTC)
replies: text: — Martin (MSGJ · talk) 11:38, 16 September 2014 (UTC)
thread_title:  Protected edit request on 16 September 2014  (add kazakh translation) 

message: Can you add localtitle: "Редактиране на началото" for "bg" (bgwiki). Thanks.
Termininja 07:59, 9 August 2015 (UTC)
replies: text: . -- User:Edokter  11:22, 9 August 2015 (UTC)
thread_title:  Protected edit request on 9 August 2015 

message: bn: 'সূচনা অনুচ্ছেদ সম্পাদনা করুন', 
Please add the translations for bengali. --Aftabuzzaman (talk) 18:34, 11 August 2015 (UTC)
replies: text: . -- User:Edokter  19:38, 11 August 2015 (UTC)
thread_title:  Protected edit request on 11 August 2015 

message: 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.)  Would you agree with this proposal? --Jack Phoenix (Contact) 15:29, 25 August 2015 (UTC)
replies: text: No objections from me. The only problem I see is getting all other project to use the MediaWiki version. -- User:Edokter  16:03, 25 August 2015 (UTC)
thread_title:  Master version location? 

message: 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)
replies: text: 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)
thread_title:  Bug: The link sometimes is unclickable (with righteditlinks in Vector) 

message: 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)
replies: text: 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)
replies: text:  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)
replies: text: 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)
replies: text:  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)
replies: text: This is normal behaviour where there are no sections. --Redrose64 🌹 (talk) 14:27, 10 September 2019 (UTC)
replies: text:  Okay, thank you then. --Dvorapa (talk) 16:53, 10 September 2019 (UTC)
thread_title:  No padding between brackets and edit links 

message: 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)
thread_title:  Suggestion for better lead editing UI 

message: th: 'แก้ไขย่อหน้าแรกสุด', 
Please add the translations for Thai. Bebiezaza (talk) 07:48, 3 March 2022 (UTC)
replies: text: — xaosflux Talk 11:29, 3 March 2022 (UTC)
thread_title:  Interface-protected edit request on 3 March 2022 

message: 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)
thread_title:  Poor positioning on Vector-2022 

message: 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:
* https://en.wikipedia.org/wiki/United_States_Department_of_Health_and_Human_Services?useskin=vector-2022
* https://en.wikipedia.org/wiki/Wikipedia:Requests_for_comment/Rollback_of_Vector_2022?useskin=vector-2022 (ironic)
Screenshots: loading – fully 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:
* https://en.wikipedia.org/wiki/United_States_Department_of_Health_and_Human_Services?useskin=vector-2022#History
* https://en.wikipedia.org/wiki/Wikipedia:Requests_for_comment/Rollback_of_Vector_2022?useskin=vector-2022#Background
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)
replies: text: 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)
thread_title:  Gadget causes page layout to shift on pages with a long title 

message: 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)
thread_title:  Edit summary section link to the lead on mobile