Jump to content

User talk:DaxServer/DiscussionCloser

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 6 days ago by FaviFake in topic Preview makes it freeze
[edit]

Howdy! On vector (2010), the close link looks a bit different than it did before. Image. It used to look like the Archive link in that image (bold, smaller font), and be right next to the Archive link instead of creating a sandwich around the subscribe link, which was a little less visually jarring. If you're interested, it may be good to restore this previous behavior. Oh, and FYI, the archive link is from WP:1CA. –Novem Linguae (talk) 16:08, 25 June 2024 (UTC)Reply

Yes, I wanted to work on that but didn't have much of the energy this morning. Do you know of any reusable CSS classes from mediawiki software that can be applied? — DaxServer (t·m·e·c) 20:31, 25 June 2024 (UTC)Reply
My recommendation would be to install a one click archiver such as User:Elli/OneClickArchiver, find the Archive link, right click -> inspect element, and copy that style exactly, so that the two links are identical. It uses the same style that the Close link used to use. As for mediawiki/vector tokens to use, not sure. –Novem Linguae (talk) 22:19, 25 June 2024 (UTC)Reply
@Novem Linguae I've adjusted the styling and moved it after so it is now aligned closer to the archive link. Also moved the styling to .DC-close-widget class and thus can be customized by overriding the default styles. — DaxServer (t·m·e·c) 09:08, 27 June 2024 (UTC)Reply
Thanks! Unfortunately after the latest update, the close link has disappeared for me. Example: https://en.wikipedia.org/wiki/User_talk:DaxServer/DiscussionCloser?useskin=vectorNovem Linguae (talk) 16:28, 27 June 2024 (UTC)Reply
Oopsie, my bad. Fixed now. — DaxServer (t·m·e·c) 18:34, 27 June 2024 (UTC)Reply
Yay, it's back. Thanks! It looks a little different than the "Archive" link. 1) Consider bolding it. 2) Consider matching its color. –Novem Linguae (talk) 19:36, 27 June 2024 (UTC)Reply
@Novem Linguae Would you be able to test out this User:DaxServer/DiscussionCloser-new.js and give some feedback. I haven't put a preview yet. — DaxServer (t·m·e·c) 20:42, 27 June 2024 (UTC)Reply
Sure. Unfortunately the Close link is way out of position in the dev version. It's on the left now. Screenshot.Novem Linguae (talk) 23:55, 27 June 2024 (UTC)Reply
The styling was missing. It worked for me as I had both the userscripts in the same file in the localhost and thus the styling loaded for me. lol — DaxServer (t·m·e·c) 06:03, 28 June 2024 (UTC)Reply

RMs

[edit]

DiscussionCloser was used to improperly close a RM at . Please add code to detect RMs and refuse to operate on them. 142.113.140.146 (talk) 18:32, 23 July 2024 (UTC)Reply

Thanks for letting me know. Let me check into that — DaxServer (t·m·e·c) 18:55, 23 July 2024 (UTC)Reply
 Done with a message to direct to use User:TheTVExpert/rmCloser instead, altho the implementation is a bit hacky but will do it for now — DaxServer (t·m·e·c) 08:58, 30 July 2024 (UTC)Reply
Also added a link to Move+DaxServer (t·m·e·c) 08:37, 1 August 2024 (UTC)Reply

Discsussion top/bottom

[edit]

Would you be able to add {{dtop}} and {{dbot}} as an option? Thanks, voorts (talk/contributions) 01:51, 5 August 2024 (UTC)Reply

@Voorts I've added the option in a newly improved version here: User:DaxServer/DiscussionCloser-new.js Would you be able to install and test it? Once any bugs are fixed, I'm looking to move that code into this script. Thanks — DaxServer (t·m·e·c) 12:39, 5 August 2024 (UTC)Reply
Seems to be working fine. voorts (talk/contributions) 22:00, 5 August 2024 (UTC)Reply

Not working on some pages

[edit]

For some reason, the close tool isn't showing up here. voorts (talk/contributions) 16:39, 9 August 2024 (UTC)Reply

@Voorts  Done
The script works when it detects an "Add new section" in the menu near the Edit at the top. Unfortunately, this page doesn't have that functionality. I've added a hook so that the script can work on additional pages as configured. I'm looking forward to make that user-configurable variable if someone wants to enhance for their specific use. — DaxServer (t·m·e·c) 17:03, 9 August 2024 (UTC)Reply

RSN

[edit]

Hi @DaxServer, I hope all is well. RE User:DaxServer/DiscussionCloser-new.js, the close button isn't showing up for level 2 headings at WP:RSN, but it's working for level 3 headings. Best, voorts (talk/contributions) 23:08, 30 August 2024 (UTC)Reply

Hi @Voorts. Interestingly, it shows up for me, both in Vector legacy and Vector new. Which theme are you using? Do you see any errors in the console on WP:RSN? — DaxServer (t·m·e·c) 08:53, 31 August 2024 (UTC)Reply

Show up on archived pages

[edit]

This is a nice script! @DaxServer I think we can remove the "temporary" from "temporary fork" now, lol.
It would be nice if the script shows up on pages that use the __ARCHIVEDTALK__ magic word by querying the page properties with the API.
It would also be nice if we had dark mode compatibility by using --background-color-neutral (or maybe --background-color-progressive-subtle) for #DC-interface instead. Aaron Liu (talk) 14:22, 31 December 2024 (UTC)Reply

@Aaron Liu: I don't intend to make any changes to this script as I consider this a legacy script and I personally don't want to tinker with it. Feel free to propose any changes, I'd be happy to update the script. Otherwise, I'd recommend the User:DaxServer/DiscussionCloser-new.js script instead which is built with mw:Codex. It also supports the dark mode (by default I guess).
Re the magic word, can you give me some examples where it'd be useful to invoke the script as the magic word is supposedly used on the archived talk pages? I can incorporate it into the new script. — DaxServer (t·m·e·c) 16:14, 1 January 2025 (UTC)Reply
Woah, the Codex script is so cool! I didn't know it existed! Could I list it at US/L for you?
Closers often have to close a discussion that has been archived. For example, just yesterday I closed Wikipedia:Reliable sources/Noticeboard/Archive 461#RfC: Check Your Fact. Most archived talk pages use the {{archive}} header-banner template, and that emits the magic word, which talk page tools bind against, blocking the usual addition of the new-section link. Aaron Liu (talk) 17:12, 1 January 2025 (UTC)Reply
@Aaron Liu I've updated the new script with your changes. Let me know how it is now.
Re US/L, I want to replace this script temporary fork User:DaxServer/DiscussionCloser.js with the new Codex-app, but I haven't decided yet. If you still want to mention it, feel free to do so. — DaxServer (t·m·e·c) 17:49, 2 January 2025 (UTC)Reply
The new config variable detection is awesome! How does one even find DiscussionTools's config vars? Aaron Liu (talk) 19:02, 3 January 2025 (UTC)Reply
@Aaron Liu Amm... I actually abused the mw:DiscussionTools (MediaWiki extension) configuration variable here (DiscussionCloser - userscript) - most likely not a good idea. The extension is loaded on pages which are "discussions" are present and injects `wgDiscussionToolsFeaturesEnabled` and `wgDiscussionToolsPageThreads` config into the `mw.config`. In DevTools console, type `mw.config`.
I defo need to look into a better solution. — DaxServer (t·m·e·c) 09:23, 4 January 2025 (UTC)Reply
I think it's probably a good idea. __ARCHIVEDTALK__ is also added by DiscussionTools. Aaron Liu (talk) 15:42, 4 January 2025 (UTC)Reply
Also, the Codex script's dialog has max-width 75%, which is, uh, a bit fat on my large screen. Could you disable that style if limited width is enabled, i.e. the .vector-feature-limited-width-clientpref-1 class is present? Aaron Liu (talk) 17:17, 1 January 2025 (UTC)Reply
Consider mentioning User:DaxServer/DiscussionCloser-new.js on User:DaxServer/DiscussionCloser somewhere. Maybe a {{Notice}} at the top of the page. I assume you'd want people to use the newer script rather than this older one. –Novem Linguae (talk) 23:40, 1 January 2025 (UTC)Reply
@Novem Linguae Thanks for the suggestion. I've added a notice — DaxServer (t·m·e·c) 18:04, 2 January 2025 (UTC)Reply
Thanks! Am I looking at something wrong, or is user:DaxServer/DiscussionCloser-fork.js an exact copy of user:DaxServer/DiscussionCloser.js? Aaron Liu (talk) 18:43, 3 January 2025 (UTC)Reply
According to the notice at the top of User talk:DaxServer/DiscussionCloser, I think the idea is that User:DaxServer/DiscussionCloser.js will get replaced with -new.js, and then folks that want to stay on the old version can install the fork. I wouldn't personally recommend doing this as that's a bit confusing. Probably best to just have one version, assuming that the new version is better. Up to DaxServer though :) –Novem Linguae (talk) 21:07, 3 January 2025 (UTC)Reply
Interesting.. thanks for the suggestion. — DaxServer (t·m·e·c) 09:09, 4 January 2025 (UTC)Reply
[edit]

For example, in this diff, the new DiscussionCloser links back to the old DiscussionCloser. It appears it uses a different version number system completely, so I imagine it should link to DiscussionCloser-new to avoid confusion. –Novem Linguae (talk) 20:47, 2 January 2025 (UTC)Reply

 Done Thanks! — DaxServer (t·m·e·c) 21:16, 2 January 2025 (UTC)Reply

Non-admin closure template erroneously placed for admin in new DiscussionCloser

[edit]

Same as title. Here's a diff. I'm an admin so it's a little strange to have my post contain the {{NAC}} tag. Some folks commented on it on my user talk page. Thanks. –Novem Linguae (talk) 20:48, 2 January 2025 (UTC)Reply

@Novem Linguae I've fixed the bug Special:Diff/1266922827 Thanks! — DaxServer (t·m·e·c) 21:16, 2 January 2025 (UTC)Reply

user-select

[edit]

Could you add user-select: none; to the .DC-close-widget div? This prevents me from selecting the close widget when I want to copy a section heading. Thanks! Aaron Liu (talk) 19:19, 12 January 2025 (UTC)Reply

@DaxServer Aaron Liu (talk) 14:48, 9 February 2025 (UTC)Reply

Indent and add "user-select: none;" to line 302 of the first page and line 399 of the second (-new) page. DaxServer hasn't edited for a month. Aaron Liu (talk) 20:45, 22 February 2025 (UTC)Reply

Not done for now: Please attempt to contact them on their talk page, which will likely trigger an email (whereas a casual ping may or will not). I'm happy to take an edit request for this if they don't respond there. Izno (talk) 20:18, 23 February 2025 (UTC)Reply
@Izno: I've tried that now. Aaron Liu (talk) 16:25, 4 March 2025 (UTC)Reply
 Done * Pppery * it has begun... 21:19, 5 March 2025 (UTC)Reply

Double enters converted to single enters

[edit]

Steps to reproduce:

  • Try to close something with type = RFC and close message of...
Sentence one.

Sentence two.

What happens?

  • Wikicode is converted to...
Sentence one.
Sentence two.

What should happen instead?

  • Wikicode should not be changed. Should stay as...
Sentence one.

Sentence two.

Notes

Novem Linguae (talk) 09:51, 3 May 2025 (UTC)Reply

Doesn't work in user talk namespace

[edit]

Steps to reproduce:

What happens?

  • No "close" link present in section header

What should happen instead?

  • "Close" link present in section header

Novem Linguae (talk) 09:54, 3 May 2025 (UTC)Reply

@Novem Linguae, per WP:TPO does it need to work in user talk? TarnishedPathtalk 10:46, 3 May 2025 (UTC)Reply
For me, it's intuitive for it to work in every talk namespace. In the case above, I wanted to test it in my sandbox and wasn't able to. Others may have different opinions, of course. –Novem Linguae (talk) 11:53, 3 May 2025 (UTC)Reply
Agreed. It's up to the user to decide. FaviFake (talk) 19:31, 8 August 2026 (UTC)Reply

Preview makes it freeze

[edit]

Trying out the new version, I found that when I click preview it caused my browser to freeze... Running Chrome on mac OS if that helps... Hope you keep working on this!! It is super useful. Zackmann (Talk to me/What I been doing) 07:01, 24 November 2025 (UTC)Reply

@Zackmann08 If you're still having problems you should try installing the new version, linked at the top of this page FaviFake (talk) 19:32, 8 August 2026 (UTC)Reply

Appears not to work in new talk style

[edit]

Just a heads up - the close button doesn’t seem to appear for me with the new beta talk style. At the moment I can’t see it on my own talk page, haven’t seen it elsewhere. The 1CA script is seeing the same issues. Danners430 tweaks made 21:10, 22 July 2026 (UTC)Reply

@Danners430 Same here, try installing User:DaxServer/DiscussionCloser-new.js instead in the meantime.
@DaxServer, is this new "beta" script ready for public usage? Since the current one broke, I think it's a good time to replace it with the new version unless there are some huge issues with the beta version. FaviFake (talk) 12:44, 1 August 2026 (UTC)Reply

Reply button is gone

[edit]