MediaWiki talk:Gadget-teahouse/content.js#Edit Request 26 Aug 2013

{{Clickable button|{{Space|7}}{{Plainlinks|1=//en.wikipedia.org/w/index.php?title=MediaWiki_talk:Gadget-teahouse/content.js&action=edit§ion=new&preloadtitle=Edit+Request+%7B%7Bsubst%3A%23time%3Ad+M+Y%7Cnow%7D%7D&preload=Template:Edit_protected/preload Request an edit}}{{Space|7}}}}

Edit Request

{{editprotected|answered=yes}}

I'd like someone to remove the added newline to the posted question. It would entail changing line 49 from:

var newText = oldText.replace( /^==/m, "\n"+wikitext+"==" );

to:

var newText = oldText.replace( /^==/m, wikitext+"==" );

that is, deleting the "\n"+ .

This would resolve a bug where each question asked through this gadget adds an extra newline above it; these newlines accumulate as more questions are added and mess up the spacing of the page. Thanks. Writ Keeper 14:48, 10 April 2012 (UTC)

Edit request

{{editprotected|answered=yes}}

Can someone replace $('h2:gt(0)').find('.mw-editsection') with $('h2:gt(0)').find('.mw-editsection:first')? The script goes crazy if more than one .mw-editsection element is present in a headline (e.g. if another script adds something to the header, to be styled identically). Nothing will change in the typical case. Keφr 12:02, 23 May 2013 (UTC)

: I still think that this script should be tied to .mw-headline and not .mw-editsection which would avoid this situation entirely. People are responding to/joining the section using a custom script/edit box, not directly editing the page like if they were using the [edit] link. Technical 13 (talk) 12:40, 23 May 2013 (UTC)

::File:Yes check.svg Done. I've fulfilled the request as Keφr stated it for now, with no prejudice against further improvements in line with Technical 13's suggestion. — Mr. Stradivarius ♪ talk ♪ 12:32, 31 May 2013 (UTC)

Interface edit request (May 31, 2013)

{{Editprotected|ans=yes}}

Please change:

var headline = $(this).parents('h2').find('span.mw-headline').html();

to:

var headline = $(this).parents('h2').find('span.mw-headline').html();

var headline = headline.replace(/[\d]*<\/span> /, '');

This will fix the bug as seen in the edit summary of {{Diff|Wikipedia:Teahouse/Questions|prev|557752140|this edit}} as can be seen in {{Diff|Wikipedia:Teahouse/Questions|next|557752140|this edit}} based on test edits using the code in my test script I created just for this purpose. Thanks. Technical 13 (talk) 23:13, 31 May 2013 (UTC)

:File:Yes check.svg Done. Thanks for your work! — Mr. Stradivarius ♪ talk ♪ 02:10, 1 June 2013 (UTC)

Edit request

{{editprotected|answered=yes}}

I would do this myself but I am not proficient with javascript. Per Wikipedia talk:Teahouse/Archive 7#Why Signatures necessary?, please replace:

:On Wikipedia, you should sign all of your posts by ending them with four tildes (~~~~)

With:

:On Wikipedia, you should sign all of your non-article posts by ending them with four tildes (~~~~)

Please add directly below this, using some kind of a break, the following text in a smaller font:

:(Note: this question submission form will not work without them.)

Thanks.--Fuhghettaboutit (talk) 00:59, 18 July 2013 (UTC)

  • {{U|Fuhghettaboutit}}, simply replace:

\

On Wikipedia, you should sign all of your posts by ending them with four tildes (~~~~) \

Ask my question \

\

WITH:

\

On Wikipedia, you should sign all of your non-article posts by ending them with four tildes (~~~~)\

Ask my question\

\

\

(Note: this question submission form will not work without them.)\

\

::Thanks Tecnical. I was mainly concerned that the small text had to be (or was better done) in a different way in javascript than the normal method and wasn't sure of the line break would be before or after the ask my question text--Fuhghettaboutit (talk) 02:36, 18 July 2013 (UTC)

Edit Request 15 Aug 2013

{{editprotected|answered=yes}}

Please replace:

var wikitext = '\n\n:' + text;

With:

var wikitext = '\n\n* ' + text;

This will put a bullet at the front of every response to the question which I feel is needed as it is kind of hard to see one user's answer from another, and I expect it is even more difficult for a new user. Thanks Technical 13 (talk) 12:42, 15 August 2013 (UTC)

:File:Red information icon with gradient background.svg Not done: per WP:TPYES, bullets do not yield standard indentation. --Redrose64 (talk) 15:06, 7 September 2013 (UTC)

  • Bullets

:* Do indeed

::* Yield a standard indentation. WP:INDENT is only and essay and mentions nothing of not using bullets as an indentation type. Technical 13 (talk) 03:01, 24 December 2013 (UTC)

::::File:Red information icon with gradient background.svg Not done: Sorry, but now that we have disagreement about the change, enacting it without discussion would be controversial. Could you ask people at the Teahouse what they think? If there's a consensus from a discussion there, I'd be willing to enact this. Best — Mr. Stradivarius ♪ talk ♪ 05:49, 24 December 2013 (UTC)

Edit Request 26 Aug 2013

{{editprotected|answered=yes}}

Please replace:

api.post(

{

'action' : 'edit',

'title' : 'Wikipedia:Teahouse/Questions',

'text' : newText,

'summary' : 'New question: '+title,

'token' : page.edittoken

},

with:

api.post(

{

'action' : 'edit',

'title' : 'Wikipedia:Teahouse/Questions',

'text' : newText,

'summary' : 'New question: ' + title + '',

'token' : page.edittoken

},

so that the new question name will be a section link in the edit summary. Thanks! Technical 13 (talk) 14:37, 26 August 2013 (UTC)

:File:Red information icon with gradient background.svg Not done: please establish a consensus for this alteration before using the {{tlx|edit protected}} template. That would make the edit summary even more non-standard. Why is the standard edit summary for a new thread - which would be coded as

'summary' : '/'+'* '+title+' *'+'/ new section',

:not being used? Placing the section heading between comment markers creates a link automatically. --Redrose64 (talk) 15:11, 7 September 2013 (UTC)

  • That would be fine. The purpose of the edit request is to add a link to the summary by whatever means acceptable. Technical 13 (talk) 16:30, 7 September 2013 (UTC)

:::File:Yes check.svg Done --Redrose64 (talk) 18:45, 7 September 2013 (UTC)

::::This change broke a lot of my logging scripts. HostBot keeps track of questions and answers on the Teahouse Q&A board, and it depends on a consistent edit comment format to identify Q/A pairs. I can update the scripts, but it'll take a bit of time. My bad for not documenting these dependencies better; I'll do that from now on. However, is there a good place for me to place a request to be notified about proposed changes to this script in future? Any advice is appreciated. Cheers, - J-Mo Talk to Me Email Me 19:47, 16 September 2013 (UTC)

Edit Request 29 Jan 2014

{{edit protected||answered=yes}}

As you can see in [https://bugzilla.wikimedia.org/attachment.cgi?id=14407&action=edit this screencast], there seems to be some z-index problem related to this script. Helder 12:11, 29 January 2014 (UTC)

:File:Red question icon with gradient background.svg Not done: please be more specific about what needs to be changed. --Redrose64 (talk) 12:56, 29 January 2014 (UTC)

:See also WP:Village pump (technical)#Unable to copy at the Teahouse. Helder 13:23, 29 January 2014 (UTC)

::Yes, I saw that: but it still doesn't indicate how the script should be amended. --Redrose64 (talk) 13:41, 29 January 2014 (UTC)

Update request (October 2014)

{{tlx|sudo}}

Hi. Please sync this page with testwiki:MediaWiki:Gadget-teahouse/content.js. This is related to [https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:Teahouse&oldid=629393408#Bottom_posting this discussion]. Thanks. --MZMcBride (talk) 04:48, 13 October 2014 (UTC)

:I did it. --Closedmouth (talk) 05:03, 13 October 2014 (UTC)

:: Heh, my bad. There's a bit of debugging code left in there. You can remove the "console.log()" line. <3 --MZMcBride (talk) 05:16, 13 October 2014 (UTC)

:::Yes. --Closedmouth (talk) 05:19, 13 October 2014 (UTC)

Protected edit request on 9 January 2017

{{edit fully-protected|MediaWiki:Gadget-teahouse/content.js|answered=yes}}

References to Wikipedia:Teahouse/Questions on lines 43, 58, 147, 167 and 181 need to be changed to Wikipedia:Teahouse to reflect the recent page move. As it is, the Teahouse gadget is completely broken. – Joe (talk) 10:50, 9 January 2017 (UTC)

:File:Yes check.svg Done -- Samtar talk · contribs 10:59, 9 January 2017 (UTC)

Edit request April 6, 2017

{{edit fully-protected|MediaWiki:Gadget-teahouse/content.js|answered=yes}}

The discussion Wikipedia talk:Teahouse#Top v bottom resulted in a decision to have new questions posted at the bottom of the page rather than the top. There is some confusion about how to implement this. See Wikipedia talk:Teahouse#Implementation. If this is the place to make the change, please do so. Thankyou. StarryGrandma (talk) 18:07, 7 April 2017 (UTC)

:{{notdone}} Discussion here is fine, once the technical code change is ready feel free to reactivate the edit request so patrolling administrators can implement it. — xaosflux Talk 12:36, 15 April 2017 (UTC)

::Hi {{u|Xaosflux}} where would we find someone who understands the current code and can figure out how to change it to get the desired result? Roger (Dodger67) (talk) 12:59, 15 April 2017 (UTC)

:::{{u|Dodger67}} perhaps recent editors to the page: {{ping|Fuhghettaboutit|There'sNoTime}} - if not, try WP:VPT. — xaosflux Talk 14:23, 15 April 2017 (UTC)

::::Thanks for the ping! Hmm, who I would first have thought of, Werdna (obviously, as the original coder), is inactive. No I am not competent to oversee this (though I am happy to implement a plan if provided). I can sometimes figure out technical stuff just by its internal logic, by playing around and emulation but I'm charitably a dilettante. However, I know of a few users who are wizes. Hope none of them mind these pings: {{u|Mr. Stradivarius}} {{U|MZMcBride}} and {{U|Johnuniq}}.--Fuhghettaboutit (talk) 15:08, 15 April 2017 (UTC)

:::::Sorry, JavaScript is outside my area (I'm good for Lua modules). Johnuniq (talk) 00:14, 16 April 2017 (UTC)

:::::I've just changed the gadget to add new questions at the bottom. In the end, the necessary edit was pretty simple (although not helped by my backwards edit summary...). — Mr. Stradivarius ♪ talk ♪ 06:52, 16 April 2017 (UTC)

::::::{{u|Mr. Stradivarius}}, thank you very much. StarryGrandma (talk) 08:54, 16 April 2017 (UTC)

Huh, I argued many years ago against top-posting. I guess everyone else has now come around as well. Mr. Stradivarius: if you're interested, the code could be improved to be more efficient. MediaWiki naturally supports appending sections to a page. This script hacked around the limitation/inability to top-post sections in MediaWiki by getting the existing revision text and then prepending to it. Instead of doing this, we could use section=new, as documented in . This would obviate the need to grab the existing revision text and would automatically handle the edit summary instead of manually concatenating/emulating the new section edit summary. --MZMcBride (talk) 05:47, 23 April 2017 (UTC)

:{{ping|MZMcBride}} Thanks for the tip! That saved 507 bytes of code. — Mr. Stradivarius ♪ talk ♪ 08:15, 23 April 2017 (UTC)

Remove from gadgets?

This gadget is no longer used, as the "Ask a question" button at Teahouse now uses mw:Extension:DiscussionTools. In addition, it will be broken by the upcoming :mw:Heading HTML changes. It should either me removed or userfied. --Ahecht (TALK
PAGE
)
15:51, 12 June 2024 (UTC)