Jump to content

User talk:DaxServer/DiscussionCloser

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
[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)

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)
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)
@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)
Thanks! Unfortunately after the latest update, the close link has disappeared for me. Example: http://en.wiki.x.io/wiki/User_talk:DaxServer/DiscussionCloser?useskin=vectorNovem Linguae (talk) 16:28, 27 June 2024 (UTC)
Oopsie, my bad. Fixed now. — DaxServer (t·m·e·c) 18:34, 27 June 2024 (UTC)
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)
@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)
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)
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)

RMs

[edit]

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

Thanks for letting me know. Let me check into that — DaxServer (t·m·e·c) 18:55, 23 July 2024 (UTC)
 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)
Also added a link to Move+DaxServer (t·m·e·c) 08:37, 1 August 2024 (UTC)

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)

@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)
Seems to be working fine. voorts (talk/contributions) 22:00, 5 August 2024 (UTC)

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)

@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)

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)

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)

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)

@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)
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)
@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)
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)
@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)
I think it's probably a good idea. is also added by DiscussionTools. Aaron Liu (talk) 15:42, 4 January 2025 (UTC)
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)
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)
@Novem Linguae Thanks for the suggestion. I've added a notice — DaxServer (t·m·e·c) 18:04, 2 January 2025 (UTC)
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)
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)
Interesting.. thanks for the suggestion. — DaxServer (t·m·e·c) 09:09, 4 January 2025 (UTC)
[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)

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

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)

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

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)