Wikipedia talk:AutoEd
AutoEd no longer runs on Chrome and Firefox?
[edit]AutoEd doesn't seem to be working on the latest versions of Chrome and Firefox using the Vector 2010 skin anymore. When I click on the "AutoEd" button, it opens the Edit window, but doesn't do anything. Oddly enough, Safari seems to be working just fine. —k6ka 🍁 (Talk · Contributions) 15:37, 11 June 2025 (UTC)
- Works for me. If you try that again after installing the "Show an alert when you encounter JavaScript errors" gadget, do you get any error messages? Or, if you know how to get there, are there any error messages in the dev console? Aaron Liu (talk) 15:55, 11 June 2025 (UTC)
- The really weird thing is... it started working after I enabled the "Show an alert when you encounter JavaScript errors" gadget! —k6ka 🍁 (Talk · Contributions) 16:14, 11 June 2025 (UTC)
- ...ah yes, a heisenbug Aaron Liu (talk) 16:51, 11 June 2025 (UTC)
- The really weird thing is... it started working after I enabled the "Show an alert when you encounter JavaScript errors" gadget! —k6ka 🍁 (Talk · Contributions) 16:14, 11 June 2025 (UTC)
2017 Wikitext editor support
[edit]This edit request to WP:AutoEd/core.js has been answered. Set the |answered= parameter to no to reactivate your request. |
Please replace the target page with User:Aaron Liu/sandbox.js, which adds compatibility for the 2017 Wikitext editor that works with existing autoEdFunctions() configs. My IDE automatically formatted what I was working on, so see Special:Diff/1297550064/1297549236 for the differences. Aaron Liu (talk) 22:45, 26 June 2025 (UTC)
- Tagged for intadmins, even though it is a legacy script that admin could handle in project space - but most admins don't review javascript. — xaosflux Talk 12:25, 27 June 2025 (UTC)
- Looks like nothing should break with 2010 if this was merged as is. Izno (talk) 20:24, 27 June 2025 (UTC)
Done Sohom (talk) 15:06, 29 June 2025 (UTC)
- Hi @Aaron Liu@Sohom Datta, we have users on Arabic Wikipedia who use this script. Last week, we've noticed that the tool tab doesn't work directly unless you are in edit mode, possibly due to the latest update. Maybe Adding a fallback
clickhandler at the end of themw.loader.using('user.options', ...)callback, that triggersautoEdExecute()only if no other click handler has been registered on$link. This ensures the tab always works as expected, even if none of the VE conditions match. // Fallback: add click handler only if none registered if (!$._data($link[0], 'events')?.click) { $link.on('click', (e) => { e.preventDefault(); autoEdExecute(); }); }
- I haven't had a chance to test it yet due to other commitments, but I wanted to bring this suggestion to your attention. --Mohanad (talk) 21:02, 11 July 2025 (UTC)
- Hey @Mohanad, could you give an example of a page where this doesn't work? Aaron Liu (talk) 21:30, 11 July 2025 (UTC)
- @Aaron Liu any one, this for example --Mohanad (talk) 21:49, 11 July 2025 (UTC)
- Okay, I can reproduce this here as well though only for the 2017 editor. I'm guessing that something in VisualEditor changed since this worked last week. I'll look into it. Aaron Liu (talk) 23:03, 11 July 2025 (UTC)
- @Aaron Liu any one, this for example --Mohanad (talk) 21:49, 11 July 2025 (UTC)
- @Mohanad I fixed this in Phab:T399350. According to WP:THURSDAY, the changes should be deployed by now. Could you confirm? Aaron Liu (talk) 02:04, 18 July 2025 (UTC)
- @Aaron Liu Sorry for the late reply. It's working now, but some users are reporting that it's not as it was before. They mention that it used to prepare an edit summary, but it no longer does. There are also reports that some attached tools are no longer functional. Is it possible the June 29th update is responsible for these changes? --Mohanad (talk) 02:55, 24 July 2025 (UTC)
- @Mohanad It works for me. Could you give some examples of non-functional attached tools and pages on which the edit summary doesn't work where it worked before? (If it worked before, it would have to be under the older Wikitext editor that doesn't give you a progress bar.) Aaron Liu (talk) 03:05, 24 July 2025 (UTC)
- @Aaron Liu any one, this for example, and these additional substitutions on this user's page --Mohanad (talk) 03:22, 24 July 2025 (UTC)
- @Mohanad I cannot edit either of those, but it still works on a random page for me. Could you link to the other users' complaints? Since you're using the 2017 editor (the one with a progress bar), I think you should know that absolutely no features of AutoEd worked with the 2017 editor before this update. Edit summaries do indeed not work yet in this editor but neither did they before; they only worked in the editor without the progress bar, which you have to manually turn off to not use.I also still need to know what you mean by "attached tools". Aaron Liu (talk) 03:34, 24 July 2025 (UTC)
- @Aaron Liu Sorry, I meant some of the functions found within user's common.js pages. A user who complained about this change was, in fact, using the 2017 editor before and after this update, and this is his recent complaint --Mohanad (talk) 03:48, 24 July 2025 (UTC)
- @Mohanad Very weird; AutoEd has never worked in the VisualEditor. Though I may be comprehending that discussion wrong as Google Translate is very much prone to errors. Could you ask @أبو هشام to upload a screen recording of the problems? Aaron Liu (talk) 15:04, 24 July 2025 (UTC)
- @Aaron Liu any one, this for example, and these additional substitutions on this user's page --Mohanad (talk) 03:22, 24 July 2025 (UTC)
- @Mohanad It works for me. Could you give some examples of non-functional attached tools and pages on which the edit summary doesn't work where it worked before? (If it worked before, it would have to be under the older Wikitext editor that doesn't give you a progress bar.) Aaron Liu (talk) 03:05, 24 July 2025 (UTC)
- @Aaron Liu Sorry for the late reply. It's working now, but some users are reporting that it's not as it was before. They mention that it used to prepare an edit summary, but it no longer does. There are also reports that some attached tools are no longer functional. Is it possible the June 29th update is responsible for these changes? --Mohanad (talk) 02:55, 24 July 2025 (UTC)
- Hey @Mohanad, could you give an example of a page where this doesn't work? Aaron Liu (talk) 21:30, 11 July 2025 (UTC)
- Hi @Aaron Liu@Sohom Datta, we have users on Arabic Wikipedia who use this script. Last week, we've noticed that the tool tab doesn't work directly unless you are in edit mode, possibly due to the latest update. Maybe Adding a fallback
Fix replacement of HTML bold and italics
[edit]This edit request to WP:AutoEd/htmltowikitext.js has been answered. Set the |answered= parameter to no to reactivate your request. |
Replace
str = str.replace(/<B[ ]*>((?:[^<>]|<[a-z][^<>]*\/>|<([a-z]+)(?:| [^<>]*)>[^<>]*<\/\3>)*?)<\/\1[ ]*>/gi, "'''$1'''");
str = str.replace(/<I[ ]*>((?:[^<>]|<[a-z][^<>]*\/>|<([a-z]+)(?:| [^<>]*)>[^<>]*<\/\3>)*?)<\/\1[ ]*>/gi, "''$1''");
with
str = str.replace(/<B[ ]*>((?:[^<>]|<[a-z][^<>]*\/>|<([a-z]+)(?:| [^<>]*)>[^<>]*<\/\2>)*?)<\/B[ ]*>/gi, "'''$1'''");
str = str.replace(/<I[ ]*>((?:[^<>]|<[a-z][^<>]*\/>|<([a-z]+)(?:| [^<>]*)>[^<>]*<\/\2>)*?)<\/I[ ]*>/gi, "''$1''");
This is entirely my fault. I was less acquanted with RegExps last year and was very bad at testing. Thus I didn't realize that the expression self-referred to old capture groups that would not match up with the deletion of the first capture group. Aaron Liu (talk) 14:24, 16 July 2025 (UTC)
Troubleshooting Custom Module
[edit]I have a custom module for AutoEd created here, which I haven't been able to get working. I'm a little unclear as to whether I should be using common.js or monobook for function importing. Basic AutoEd functions were previously working but now throw "AutoEd core error: autoEdFunctions is undefined" since using both monobook and common.js. Any advice appreciated.
Thanks in advance! 81567518W (talk) 00:57, 16 October 2025 (UTC)
- I think you're missing an "else". Look at the bottom of Wikipedia:AutoEd/wikilinks.js for a similar example. – Jonesey95 (talk) 16:25, 16 October 2025 (UTC)
- Thanks, I've added the else statement but not seeing any changes. 81567518W (talk) 02:49, 17 October 2025 (UTC)
- You are welcome to take a look at one of my custom functions at User:Jonesey95/AutoEd/month.js, but I did a bunch of customization to avoid running the main AutoEd functions and only run my specific function, so YMMV. – Jonesey95 (talk) 02:58, 17 October 2025 (UTC)
- Finally got it to work by hooking it into AutoEdFunctions, thank you! 81567518W (talk) 03:31, 17 October 2025 (UTC)
- You are welcome to take a look at one of my custom functions at User:Jonesey95/AutoEd/month.js, but I did a bunch of customization to avoid running the main AutoEd functions and only run my specific function, so YMMV. – Jonesey95 (talk) 02:58, 17 October 2025 (UTC)
- Thanks, I've added the else statement but not seeing any changes. 81567518W (talk) 02:49, 17 October 2025 (UTC)
Curlyfixer breaking images
[edit]Please see this edit for an example. 81567518W (talk) 13:19, 26 November 2025 (UTC)