This is the
talk page for discussing improvements to the
Gadget-edittop.js page. |
|
|
|
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)
http://en.wikipedia.org/?title=Template:SomeTemplate/doc&action=edit
, it doesn't have §ion=T
, so
if (a.href.indexOf ("§ion=T") == -1)
doesn't do his work correctlya.getAttribute ("href", 2).replace (/§ion=\d+/, "§ion=0")
doesn't do anything all.http://en.wikipedia.org/?title=Template:SomeTemplate&action=edit§ion=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)
<h1 id="firstHeading" class="firstHeading"><span class="editsection"><a href="/?title=Template%3A!&action=edit&section=0" title="Edit lead section"></a></span>Template:!</h1>
<span class="editsection plainlinks" id="doc_editlinks"><a href="http://en.wikipedia.org/?title=Template:!/doc&action=edit" class="external text" rel="nofollow" title=""></a>] [<span class="noprint plainlinks purgelink"><a href="http://en.wikipedia.org/?title=Template:!&action=purge" class="external text" rel="nofollow"><span title="Purge this page">purge</span></a></span></span>
<h3><span class="editsection"><a href="/?title=Template:!/doc&action=edit&section=T-1" title=""></a></span> <span class="mw-headline" id="Usage">Usage</span></h3>
<span class="editsection plainlinks" id="doc_editlinks">
(←) 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 = editspanses_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 (editspansi].className.indexOf ("plainlinks") == -1){
span1 = editspansi];
break;
}
If you replace that code this issue should be fixed. — AlexSm 18:59, 22 February 2011 (UTC)
{{
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)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Could someone implement this changes? Helder 19:53, 11 June 2011 (UTC)
a.setAttribute ("href", mw.util.wikiGetlink( mw.config.get( 'wgPageName' ) ) + "?action=edit§ion=0");
?title=
is already the first url parameter. Also, single statements do not need wrapping in {}. —
Edokter (
talk) — 20:45, 11 June 2011 (UTC)
mw.util.wikiGetlink( mw.config.get( 'wgPageName' ) )
returns
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:
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)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)
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)
Please add:
fa: 'ویرایش بخش آغازین',
Thanks, Z 19:38, 10 May 2012 (UTC)
is it possible to set float for rtl wikis. in these wikis [edit] comes before page title Reza1615 ( talk) 11:12, 17 June 2012 (UTC)
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)
// [[File:Wikipedia_Gadget-edittop.js]] Edittop imported from enWP
mw.loader.load( '//en.wikipedia.org/?title=MediaWiki:Gadget-edittop.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400' );
== appearance == * edittop|edittop.js
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:
HTH. -- Quiddity ( talk) 07:45, 15 August 2012 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
}
.
Matma Rex
talk 09:46, 13 May 2013 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
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)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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... Ignatz mice• talk 14:15, 29 June 2013 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
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)
/* @noflip */
to the end of
vi:MediaWiki:Gadget-edittop.css should've been copied into
MediaWiki:Gadget-edittop.css. (I added a comment in there to help you out. Sorry for being ambiguous earlier.)|edittop.css
to the line that begins with * edittop
.all done! — Martin ( MSGJ · talk) 08:51, 17 September 2013 (UTC)
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)
<a id="top"></a>
), otherwise the link in the edit summary does not work. —
Edokter (
talk) — 17:24, 27 February 2014 (UTC)
<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)<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)
<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)
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)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
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)
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)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
kk: 'Кіріспе бөлімді өңдеу',
Please add the translations for kazakh. Arystanbek ( talk) 11:26, 16 September 2014 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Can you add localtitle: "Редактиране на началото" for "bg" (bgwiki). Thanks. Termininja 07:59, 9 August 2015 (UTC)
-- [[
User:Edokter]] {{
talk}}
11:22, 9 August 2015 (UTC)This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
bn: 'সূচনা অনুচ্ছেদ সম্পাদনা করুন',
Please add the translations for bengali. -- Aftabuzzaman ( talk) 18:34, 11 August 2015 (UTC)
-- [[
User:Edokter]] {{
talk}}
19:38, 11 August 2015 (UTC)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)
-- [[
User:Edokter]] {{
talk}}
16:03, 25 August 2015 (UTC)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)
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)
@import "https://en.wikipedia.org/?title=MediaWiki:Gadget-edittop.css&action=raw&ctype=text/css";
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)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
th: 'แก้ไขย่อหน้าแรกสุด',
Please add the translations for Thai. Bebiezaza ( talk) 07:48, 3 March 2022 (UTC)
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)
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: 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:
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)
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)
This is the
talk page for discussing improvements to the
Gadget-edittop.js page. |
|
|
|
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)
http://en.wikipedia.org/?title=Template:SomeTemplate/doc&action=edit
, it doesn't have §ion=T
, so
if (a.href.indexOf ("§ion=T") == -1)
doesn't do his work correctlya.getAttribute ("href", 2).replace (/§ion=\d+/, "§ion=0")
doesn't do anything all.http://en.wikipedia.org/?title=Template:SomeTemplate&action=edit§ion=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)
<h1 id="firstHeading" class="firstHeading"><span class="editsection"><a href="/?title=Template%3A!&action=edit&section=0" title="Edit lead section"></a></span>Template:!</h1>
<span class="editsection plainlinks" id="doc_editlinks"><a href="http://en.wikipedia.org/?title=Template:!/doc&action=edit" class="external text" rel="nofollow" title=""></a>] [<span class="noprint plainlinks purgelink"><a href="http://en.wikipedia.org/?title=Template:!&action=purge" class="external text" rel="nofollow"><span title="Purge this page">purge</span></a></span></span>
<h3><span class="editsection"><a href="/?title=Template:!/doc&action=edit&section=T-1" title=""></a></span> <span class="mw-headline" id="Usage">Usage</span></h3>
<span class="editsection plainlinks" id="doc_editlinks">
(←) 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 = editspanses_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 (editspansi].className.indexOf ("plainlinks") == -1){
span1 = editspansi];
break;
}
If you replace that code this issue should be fixed. — AlexSm 18:59, 22 February 2011 (UTC)
{{
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)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Could someone implement this changes? Helder 19:53, 11 June 2011 (UTC)
a.setAttribute ("href", mw.util.wikiGetlink( mw.config.get( 'wgPageName' ) ) + "?action=edit§ion=0");
?title=
is already the first url parameter. Also, single statements do not need wrapping in {}. —
Edokter (
talk) — 20:45, 11 June 2011 (UTC)
mw.util.wikiGetlink( mw.config.get( 'wgPageName' ) )
returns
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:
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)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)
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)
Please add:
fa: 'ویرایش بخش آغازین',
Thanks, Z 19:38, 10 May 2012 (UTC)
is it possible to set float for rtl wikis. in these wikis [edit] comes before page title Reza1615 ( talk) 11:12, 17 June 2012 (UTC)
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)
// [[File:Wikipedia_Gadget-edittop.js]] Edittop imported from enWP
mw.loader.load( '//en.wikipedia.org/?title=MediaWiki:Gadget-edittop.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400' );
== appearance == * edittop|edittop.js
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:
HTH. -- Quiddity ( talk) 07:45, 15 August 2012 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
}
.
Matma Rex
talk 09:46, 13 May 2013 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
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)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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... Ignatz mice• talk 14:15, 29 June 2013 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
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)
/* @noflip */
to the end of
vi:MediaWiki:Gadget-edittop.css should've been copied into
MediaWiki:Gadget-edittop.css. (I added a comment in there to help you out. Sorry for being ambiguous earlier.)|edittop.css
to the line that begins with * edittop
.all done! — Martin ( MSGJ · talk) 08:51, 17 September 2013 (UTC)
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)
<a id="top"></a>
), otherwise the link in the edit summary does not work. —
Edokter (
talk) — 17:24, 27 February 2014 (UTC)
<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)<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)
<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)
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)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
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)
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)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
kk: 'Кіріспе бөлімді өңдеу',
Please add the translations for kazakh. Arystanbek ( talk) 11:26, 16 September 2014 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Can you add localtitle: "Редактиране на началото" for "bg" (bgwiki). Thanks. Termininja 07:59, 9 August 2015 (UTC)
-- [[
User:Edokter]] {{
talk}}
11:22, 9 August 2015 (UTC)This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
bn: 'সূচনা অনুচ্ছেদ সম্পাদনা করুন',
Please add the translations for bengali. -- Aftabuzzaman ( talk) 18:34, 11 August 2015 (UTC)
-- [[
User:Edokter]] {{
talk}}
19:38, 11 August 2015 (UTC)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)
-- [[
User:Edokter]] {{
talk}}
16:03, 25 August 2015 (UTC)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)
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)
@import "https://en.wikipedia.org/?title=MediaWiki:Gadget-edittop.css&action=raw&ctype=text/css";
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)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
th: 'แก้ไขย่อหน้าแรกสุด',
Please add the translations for Thai. Bebiezaza ( talk) 07:48, 3 March 2022 (UTC)
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)
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: 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:
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)
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)