User talk:Joeytje50/JWB
|
|
Before you post problem reports on this page: If another user running this script is causing problems with one or multiple of their edits, please first contact that user. More than likely, the problem is something caused by an incorrect JWB configuration on their part. Leaving them a message will temporarily prevent them from making more edits (until they read their talk page). JWBdeadman variable in the script. |
List based on search is missing
I only use this option on AWB. Uziel302 (talk) 22:28, 18 July 2019 (UTC)
- Uziel302 could you please elaborate on this function a bit more? I don't have the downloadable AWB installed on my pc, so I can't really check what the function of it is. If you give a clear description, though, I might be able to implement it. Joeytje50 (talk) 23:23, 9 October 2019 (UTC)
- Joeytje50, if I want to correct specific typo across wikipedia, how do I do it? I didn't find search option. Uziel302 (talk) 05:25, 10 October 2019 (UTC)
- @Uziel302: That's a good one; I'll have a look at implementing that some time in the future. I can't give any guarantees over when this will be implemented though.Joeytje50 (talk) 20:44, 11 October 2019 (UTC)
- Joeytje50, if search is complicated to implement, is there a way to copy here search results? Uziel302 (talk) 03:48, 12 October 2019 (UTC)
- @Uziel302: That's a good one; I'll have a look at implementing that some time in the future. I can't give any guarantees over when this will be implemented though.Joeytje50 (talk) 20:44, 11 October 2019 (UTC)
- Looks like the feature Uziel302 is describing is the "Wiki search" source documented here. I strongly agree, it would be really useful to be able to enter a search string and populate the pages list with the results returned by the CirrusSearch API for that query - the search API gives a lot of flexibility. I've been looking at your code a bit and I think adding a search generator would actually be pretty easy. Would you be interested in a patch if I could get something working? (I don't have much experience with Wiki user scripts, but I know my way around js well enough, and have a bit of experience working with the MW search API from building this tool). Colin M (talk) 19:50, 2 November 2019 (UTC)
- Wow, okay, it was actually even easier than I thought. I have a working fork at User:Colin M/scripts/JWB annotated.js (diff). It was literally 4 lines of html! I think the only thing it needs is localisation (I assume that's what the
JWB.msg
stuff is - but I wasn't sure how it worked, so I didn't touch it). Colin M (talk) 21:01, 2 November 2019 (UTC)- User:Joeytje50 Hi, do you think you might implement the stuff in the fork? It would be a great feature for everyone to have, and make running a bot on this much easier. DemonDays64 | Tell me if I'm doing something wrong :P 19:20, 23 November 2019 (UTC)
- Wow, okay, it was actually even easier than I thought. I have a working fork at User:Colin M/scripts/JWB annotated.js (diff). It was literally 4 lines of html! I think the only thing it needs is localisation (I assume that's what the
- Joeytje50, if I want to correct specific typo across wikipedia, how do I do it? I didn't find search option. Uziel302 (talk) 05:25, 10 October 2019 (UTC)
Making a bot with this
Hi! How can I use this to make a bot? Do I need anything more than approval and to leave a tab open with stuff inputted to automatically edit? Thanks! DemonDays64 | Tell me if I'm doing something wrong :P 15:50, 21 November 2019 (UTC)
- JWB isn't designed for completely automated editing; you have to click a button to save an edit. So you'd have to program your mouse to click at regular intervals, or program your computer to click "enter" at regular intervals with the button selected, or something. — Eru·tuon 19:28, 21 November 2019 (UTC)
- @Erutuon: this page says: “Users with the bot usergroup will also be able to automatically save their edits.“ so apparently that’s incorrect. My question is if I’d need to do anything more to have a bot work with this than leave a tab open with an approved bot account and stuff for it to do? DemonDays64 | Tell me if I'm doing something wrong :P
- Hmm! Maybe I'm wrong, because I've never operated JWB while being a bot. — Eru·tuon 00:26, 22 November 2019 (UTC)
- @Erutuon: this page says: “Users with the bot usergroup will also be able to automatically save their edits.“ so apparently that’s incorrect. My question is if I’d need to do anything more to have a bot work with this than leave a tab open with an approved bot account and stuff for it to do? DemonDays64 | Tell me if I'm doing something wrong :P
Links on page with Special:LinkSearch
Hi! I know there is a feature to add a list of all pages linked to on a specific page. Is there any way to do this but for a Special:LinkSearch, e.g. https://en.wikipedia.org/w/index.php?target=http%3A%2F%2Frogerebert.com%2F&title=Special%3ALinkSearch ? Seems like a good way to get pages to edit if it were possible. DemonDays64 | Tell me if I'm doing something wrong :P 15:43, 23 November 2019 (UTC)
- If the list based on search feature described above were implemented, this would be easy to do using the linksto: search keyword. Colin M (talk) 18:09, 23 November 2019 (UTC)
Bug - half article was deleted on edit
This edit was done with the Hebrew version of the script (I just changed the direction because we are RTL language). The previous edit has done what it was supposed to, but another edit was done right after, deleting half the article. Do you have any idea what may have caused it? Uziel302 (talk) 12:36, 9 April 2020 (UTC)
- @Uziel302: I am not sure what caused that problem exactly. I have had such problems in earlier versions of the script, but those times the problem was that it was possible (for example due to slow internet connection or slow wiki servers) to have a certain page take long to load, and then finally load only after another page loaded, which would cause the page to be saved to the wrong place or to be missing parts of it. I believe those problems have all been fixed now, but of course there can always still be other bugs with similar effects. If you have any idea at all what is causing this, or in which specific circumstances these kinds of things happen, please do let me know. Also, please let me know which find/replace rules you were using, so that I could have a look at possible problems with the replacements. Perhaps things like the RegEx Typo Fix or 'ignoring unparsed content' are not working correctly, and by knowing what the settings were when things like this occurred help with the debugging.
- I hope this problem doesn't occur often, but if it does please let me know about some of the circumstances, so that I may have a look at the causes. Anyway, thanks for letting me know about this. If I find something that may be causing stuff like this I'll be sure to try to fix it.
- Either way it's always useful to have some recentchanges-bot watching out for any bots that are misbehaving, including bots using JWB. I hope this helps! Joeytje50 (talk) 19:37, 5 May 2020 (UTC)
- It happened to me several times. I would say it doesn't happen that often relatively, but often enough for it to be a real concern. I'm feeling the occurrence rate would be somewhere between once in 100 or 300 edits for me. Anyhow, this of course obligates me to go over my recent contributions after my edits have been done, as we don't have any kind of recent changes bot in Hebrew Wikipedia.
- As for the reasons, I can't tell exactly how to reproduce this, but my feeling was that it happens when I have Internet connection problems. Sometimes I feel it may happen due to a proactive action on my side, for example Internet is stuck, an edit is being saved and I restart the Internet connection, which causes this (again, I can't be sure about it, as I didn't record those cases carefully, and the exact circumstances). What I can say is, that according to another user on Hebrew Wikipedia, User:חזרתי (he), who experienced a similar problem, he's sure his Internet didn't disconnect while this happened.
- As for the setup, it happened on very simple scenarios: just having a simple find and replace definition (no regex), and I suppose it also happened with regexes, but I don't use any advanced flags or options, just the flag "g" (which, by the way, I think should be set by default). Tomer T (talk) 07:55, 6 May 2020 (UTC)
@Joeytje50: this issue also occurred several times when I was using it. Like Tomer T says, I usually encounter this issue when there's an internet connection problem, but in the following diffs (1, 2, and 3) tens of thousands of bytes were removed from the article while the tool was saving an edit. In all these instances, there is a dialog in my browser saying "AJAX error", but the page is not removed from the "Enter list of pages" box. Epicgenius (talk) 19:38, 18 March 2021 (UTC)
- @Epicgenius: If you have any idea how to reproduce something like this I'd love to know, so I can try to test what causes this and try to fix the problems. At least I'm glad to see that there is an error that pops up, so the person controlling the bot will know something went wrong.
- I'll put on my to-do list to implement a "Report issue" button when an AJAX error occurs on enwp, so that I can more easily figure out what the exact cause of the error is. Joeytje50 (talk) 23:20, 19 March 2021 (UTC)
- @Joeytje50: Thanks. Sadly, I don't know the exact sequence of events that will lead to a page half-blanking. I'll keep an eye out for the next time this occurs and note what happened immediately beforehand. Epicgenius (talk) 23:29, 19 March 2021 (UTC)
- On Hebrew Wikipedia I've added three lines of code to prevent all edits that remove more than 50 chars. Maybe some use cases will need this limit to be higher but we can and should put a limit on big removals. Epicgenius, Joeytje50, Tomer T. Uziel302 (talk) 11:04, 3 April 2021 (UTC)
- I have many times done removals larger than 50 chars with JWB. My extensive {{aircraft specs}} conversion script for example almost always removed over 1000 characters of unused parameters not valid in the new template. If such a limit is imposed it should just be an option people can easily change. --Trialpears (talk) 13:18, 3 April 2021 (UTC)
- @Uziel302: That is a good idea, actually, but definitely not the way you implemented it there. JWB is not a "small edit browser" but a generic "semi-automated browser", so there should be no limits imposed on anyone using the tool. However, implementing it as a setting does seem useful, so I've added it to the bottom of the 'setup' tab. If the limit is set to 0 (default), then nothing changes, but if you set a number in that box, your maximum diff size will be that amount of characters. To replicate your implementation, you should just set that to 50 characters. Joeytje50 (talk) 08:48, 4 April 2021 (UTC)
- Joeytje50, I copied your recent changes to Hebrew wikipedia and both diff limit and AJAX work smoothly. Thanks a lot! Uziel302 (talk) 21:53, 4 April 2021 (UTC)
- @Uziel302: Of course you're allowed to maintain your own copy of my script, but I do recommend just importing it from the original URL, which keeps you up-to-date on change I make later on. Joeytje50 (talk) 13:00, 5 April 2021 (UTC)
- Joeytje50, I would love to make the Hebrew version synced with English version, but since I had to do some work to support RTL, I am not sure this is possible without changes on your end. You are welcome to see my working code on Hebrew: JS and more importantly, CSS and i18n. Uziel302 (talk) 20:01, 5 April 2021 (UTC)
- @Uziel302: Of course you're allowed to maintain your own copy of my script, but I do recommend just importing it from the original URL, which keeps you up-to-date on change I make later on. Joeytje50 (talk) 13:00, 5 April 2021 (UTC)
- Joeytje50, I copied your recent changes to Hebrew wikipedia and both diff limit and AJAX work smoothly. Thanks a lot! Uziel302 (talk) 21:53, 4 April 2021 (UTC)
- On Hebrew Wikipedia I've added three lines of code to prevent all edits that remove more than 50 chars. Maybe some use cases will need this limit to be higher but we can and should put a limit on big removals. Epicgenius, Joeytje50, Tomer T. Uziel302 (talk) 11:04, 3 April 2021 (UTC)
- @Joeytje50: Thanks. Sadly, I don't know the exact sequence of events that will lead to a page half-blanking. I'll keep an eye out for the next time this occurs and note what happened immediately beforehand. Epicgenius (talk) 23:29, 19 March 2021 (UTC)
I'd be more than happy to incorporate code that makes it possible to support RTL in the main JWB version (given that it doesn't break the LTR interface). In fact, I've had a request to facilitate that once before, and haven't had been able to find the time to support that yet. If you can, could you please create a pull request at https://github.com/Joeytje50/JWB so that I can merge your changes into the main script? That is by far the most convenient way to include your changes, as well as having the added benefit of directly crediting you with the changes you've made through the Git interface. If you can do that, I'll have a look at the changes you've made some time soon, and hopefully include as much of it as possible (although as I've said w.r.t. the 50 character limit, there may be some things I wouldn't want to include in the main JWB). If you need any help with setting up a fork of the repo and creating a pull request, just let me know, then I can give some tips on how to do that. PS: Check out User:Joeytje50/JWB#Contributing to JWB for some more info. Joeytje50 (talk) 21:45, 5 April 2021 (UTC)
- Joeytje50, sounds great, I'll try to get to it soon. Uziel302 (talk) 05:26, 7 April 2021 (UTC)
- Joeytje50, as a start, I pushed PR with Hebrew internationalization. Uziel302 (talk) 23:11, 15 April 2021 (UTC)
- Joeytje50, most of the changes to support RTL are changes in the CSS, changing from right to left and vice versa, how should we do it on your code? Should we have separate CSS for RTL or should we add RTL class for all the relevant elements? You can see my changes here. Uziel302 (talk) 14:08, 16 April 2021 (UTC)
- I think the easiest way to do this would be to add a class
.JWB-rtl
or something similar to the body, and then apply those styles to the elements that are children of.JWB-rtl
. That way all styles will be loaded at once, but the rtl styles will override the default ltr styles. Joeytje50 (talk) 12:42, 18 April 2021 (UTC)- Joeytje50, just got the bug of half article deleted again, and now I also got a new bug - the next edited article got the content of the article I half deleted. Can it be related to the AJAX change? And why the 300 chars limit didn't prevent the edits? Uziel302 (talk) 13:06, 30 April 2021 (UTC)
- I think the easiest way to do this would be to add a class
- Joeytje50, most of the changes to support RTL are changes in the CSS, changing from right to left and vice versa, how should we do it on your code? Should we have separate CSS for RTL or should we add RTL class for all the relevant elements? You can see my changes here. Uziel302 (talk) 14:08, 16 April 2021 (UTC)
- Joeytje50, as a start, I pushed PR with Hebrew internationalization. Uziel302 (talk) 23:11, 15 April 2021 (UTC)
- Joeytje50, tried to use i18n file from en wiki and got english text, what am i missing? can you give me a link for a wikipedia usage of this file in other language. Uziel302 (talk) 20:13, 30 July 2021 (UTC)
- Uziel302 Thanks for reporting that issue. I think I've fixed it with a few tweaks to the script. Let me know if this is giving you any further issues! Joeytje50 (talk) 14:16, 31 July 2021 (UTC)
I think I may be able to shed some light on this. For me, it has nothing to with RTL/LTR characters. Here is one example, which gave me the "AJAX error" message mentioned before (it was supposed to do something like this: a very basic find-replace). What I believe is happening here is that, when there are intermittent network outages, the following will happen:
- JWB grabs a page from the list.
- JWB attempts to get that page's source text from the API.
- JWB performs the find-replace.
- JWB sends the modified text to the API as a new revision.
What I suspect is happening here is that, if it receives a premature end-of-file in step 2 (due to network outages), it will merrily continue on its way through steps 3 and 4, completely oblivious to the fact that it is not working off a full version of the source text. My proposed solution is this, either as a feature, or a "shitty connection mode" option: prior to doing any edits, JWB could hit up the API (with batched requests, of course) to get the size of the pages it's editing. Then, when it receives "the source text" for any given page, it can compare this to the size it got from the API, and if it's grotesquely lower, then it knows something is up, and refuses to send an edit for that page. jp×g 06:30, 4 December 2022 (UTC)
Here is a list of JWB edits which shrank a page by >500 bytes in the last 30 days. A few have been reverted (rvtd=Y), many have comments such as "Delete ..." but some may be errors. Certes (talk) 15:55, 4 December 2022 (UTC)
Edit summary preview
Wikipedia's source editor provides preview of the edit summary when viewing the "Show preview" or "Show changes" page. It would be nice if JWB has also showed preview of the edit summary. —andrybak (talk) 09:42, 10 October 2020 (UTC)
Edit summary from replace fields
When editing using JWB, I often use several replace fields, which sometimes do unrelated edits. What if every replace field had additional textfield "edit summary"? JWB could then automagically construct the whole edit summary using edit summaries of those replace fields, which were applied in the whole edit. —andrybak (talk) 12:54, 10 October 2020 (UTC)
Tags
Just a very minor improvement with low priority: Some other tools like twinkle have moved away from appending a message such as via JWB and instead use tags which makes the edits easily searchable. Would be nice to have feature her as well. --Trialpears (talk) 09:33, 4 April 2021 (UTC)
- I also need this feature. Uziel302 (talk) 20:03, 5 April 2021 (UTC)
- I concur. ―Qwerfjkltalk 20:16, 1 July 2021 (UTC)
- I will have a look at this some time soon, although it is not as trivial as simply converting to using the tag, instead of appending something to the summary. Because tags need to be registered on a wiki, I would have to detect if the tag is available on the wiki, and only then use the tag. Also for it to work here, I'd need an admin to add it to the list of enabled tags. I don't want to hijack an existing tag. Also I'm not entirely sure if adding these tags is as simple as including the tag in the API call, but I'll have a look at that as well soon. Joeytje50 (talk) 13:17, 31 July 2021 (UTC)
- I came here to ask the same thing. Obtaining a new tag should be simple; any admin should be able to create a jwb tag similar to the existing awb tag. BilledMammal (talk) 16:33, 8 November 2022 (UTC)
JWB scripts
@Joeytje50 Can you disable other scripts on the JWB page, as User:Awesome Aasim/rcpatrol does, to prevent script errors? ― Qwerfjkltalk 12:37, 13 August 2021 (UTC)
- @User:Qwerfjkl: I could have a look at that. I already have some systems which disable existing scripts from running, but I could try making it a bit more thorough if that's needed. Which scripts in particular are you having issues with, which would need to be disabled? Joeytje50 (talk) 14:12, 1 October 2021 (UTC)
- @Joeytje50 No idea. I get errors like Uncaught TypeError in line ~4469: property "top/left" is undefined. (And error messages spam so I can get over 200 of them.) ― Qwerfjkltalk 14:19, 1 October 2021 (UTC)
- It might be tough preventing those, but I could have a look at that some time in the future. However, I can't guarantee when I'll have time to fix this issue. Joeytje50 (talk) 14:38, 1 October 2021 (UTC)
- @Joeytje50 No idea. I get errors like Uncaught TypeError in line ~4469: property "top/left" is undefined. (And error messages spam so I can get over 200 of them.) ― Qwerfjkltalk 14:19, 1 October 2021 (UTC)
The end of long pagenames are buried below the editing area
Hi!
Above the editing area it says: Editing area - You are editing: File:Lossy-page1-739px-Paulo Emílio de but the full name is c:File:Lossy-page1-739px-Paulo Emílio de Salles Gomes (1957).tif.jpg. I don't think it's supposed to hide the end of the name or am I wrong?Jonteemil (talk) 00:30, 22 August 2021 (UTC)
- While going through this talk page to archive old topics, I noticed I never responded to this. Apologies for that. I think the issue is that your screen width is too small to be able to show the full page name. However, hovering over the page name will always show the full page name (as a wikilink), meaning it is always possible to see which page you're editing. Also, the page list to the left shows the page name you've listed, which can be scrolled horizontally (shift+scroll) to reveal the full page name. I hope this helps! Joeytje50 (talk) 19:54, 29 January 2024 (UTC)
TC)
ECP?
Is there any way to do ECP? I only see semi-protection and admin. -- RoySmith (talk) 19:12, 26 October 2021 (UTC)
- @RoySmith: I had not heard about ECP before (in fact, I had to look for a bit to find WP:ECP). Because I like to keep JWB available not just on ENWP, but on all wikis (even non-Wikipedia wikis), I would like to make sure features I implement wouldn't break functionality on other places. After having a quick look, I was not able to find any documentation on mw:Manual:Protection or any other place on the MediaWiki wiki, giving me specific information about extended protection. Next, I tried looking for ways to detect which levels of protection are available on a given wiki (through the API), but unfortunately I wasn't able to find that either. Until I can find some more information about ECP, I don't think I can quite implement this yet. I'll put it on my list of things to check at some point, though, because this does seem like a useful addition. Joeytje50 (talk) 21:47, 11 July 2022 (UTC)
- Interesting. I had no idea that was an enwiki-specific feature. I just took a look at mw:Manual:Protection and also mw:Manual:page restrictions table, both of which just hint that there might be other protection levels. I wonder if there's something in the per-wiki configuration that sets them up? I'll ask around and let you know if I figure anything out. -- RoySmith (talk) 22:44, 11 July 2022 (UTC)
- @Joeytje50: See Special:ApiHelp/query+siteinfo; this submodule has a property that returns restrictions. Check my fork here (find protect). NguoiDungKhongDinhDanh 11:37, 13 July 2022 (UUTC)
QOL changes
Hello! I was using JWB recently and noticed some details in a quick glance. Not sure if this is the right place to report it but I'm trying.
- When you click "Generate", you're greeted by an all grey field. Can the tick-boxes be actually white so we know they are tickable? I remember back in my old days that I've spent literal hours starring at that part + doc pages not knowing why I wasn't allowed to generate anything until I randomly started clicking on the screen in frustration and one of the tick-boxes was ticked accidently and I heard the Hallelujah chorus start signing.
- When we are using more than 1 replace field, can a small notification of any kind be added to the interface that tells us that we are using more than 1 replace field?
- [Minor bug] In the Skip tab, in the Skip when section, there is definitely 1 space missing before neither and maybe some spaces missing before the tick-spheres so they don't get merged together with the prior entries. For an example of how it can be improved, look the tick-spheres just above in the Redirects section, in the same tab. - Klein Muçi (talk) 13:03, 6 March 2022 (UTC)
- While you're in there:
- When I open JWB, the first thing I do is edit the CSS to set "width=95%" on .JWBpopup input, so I don't have to perform keyhole surgery on the search terms. Please can this be the default?
- In "More replace fields", "Add more fields" appears at the top, but adds a field at the bottom. This is counter-intuitive. (Bottom is the best place, but I sometimes need to insert a change before the existing changes and wish it did insert at the top, rather than having to shuffle all my existing regexps down one. Having both options would be nice!)
- Could the height of the top diff area be adjustable, e.g. allowing the horizontal line at its bottom to be dragged up and down to resize it? I have a big gap across the bottom of my screen and would love to use that space for a few more rows of diff, so I don't have to move up to the diff and scroll it for every page before returning my mouse to the Save button. Again, I've resorted to fiddling the CSS to fit my screen, but the change I make won't suit everyone.
- Thanks again for a wonderful tool which is extremely useful and much appreciated despite these occasional frustrations! Certes (talk) 13:37, 6 March 2022 (UTC)
- 2 more small changes:
- After you increase the number of replace fields there is no way to clear them beside deleting them manually one by one. Can we add a "Clear" button?
- When you first open JWB, you're greeted by the "Editing" tab which does nothing until you generate some pages in the "Setup" tab. Can we get the "Setup" tab as an initial tab instead of the "Editing" tab? - Klein Muçi (talk) 17:45, 7 March 2022 (UTC)
- 2 more small changes:
- @Klein Muçi: @Certes: Thanks for the QOL suggestions. I've implemented most of these, so if you ever have any more suggestions please do let me know.
- The 'Generate' popup's checkboxes should now be more clearly clickable. If this is still not quite clear enough then please do let me know!
- I did not implement the notification telling you you are using more than 1 replace field right now. I'm not entirely sure what would be the best way to indicate this in the main window, so if you have suggestions how this would be made clear, without being intrusive in the main layout, please let me know about this as well.
- Thanks for reporting these spacing issues. You were right that they were indeed missing a few spaces.
- I've fixed the pagelist generating inputs not being wide enough. You were not the only one reporting this as being a QOL issue, so thanks for letting me know.
- I've implemented the suggestion to have multiple 'Add more fields' buttons. I think it works fairly intuitively now, so I did not include any further explanations through tooltips. Please do note that if you press the TAB button while working in the bottom-most field, another one will be created automatically, to make it easier to keep working after adding a rule (that way, there's always an empty replace field waiting for you).
- Unless I'm misunderstanding your suggestion, adjusting the diff/preview field's size is already possible. In most browsers, there should be an indicator in the very bottom right corner of the top section in JWB, indicating it is resizable (exactly the same resize indicator seen in the regular source editor). If this is not what you meant, please let me know.
- I did not implement a 'Clear' button right now, because I think it is quite dangerous to have buttons perform unrevertable actions that delete work. In the future I might implement this with some appropriate warning, but until then I left this alone for now.
- I agree with the suggestion of having 'Setup' being the default tab, so changed the script accordingly. Hopefully, people won't be too upset with this change ;)
- All in all, very nice suggestions, so thanks for leaving them! Joeytje50 (talk) 23:31, 11 July 2022 (UTC)
- @Joeytje50, thank you for taking our suggestions into consideration! Some comments in regard to what you wrote:
- The "generate ticks" are OK now.
- The notification of multi replace fields can be something really small on the right corner at the bottom of the fields at the Editing tab (right below the "With" field), as wide as the icons used in the Settings section of the Setup tab, that symbolizes multiplication somehow. When clicked, it works the same as clicking "More replace fields" and opens the said fields.
- A red Clear button beside the "Add more fields" button at the bottom of that page would be needed I believe. A popup warning asking for confirmation like you say could also be a good thing.
- [PET PEEVE] Maybe instead of the superscripted question mark over Regular Expressions used in Editing and Skip tabs we can have the number 101. I always intuitively expect the question mark link to send me into the RegEx article or somewhere similar explaining what RegEx is instead of a place that explains how particular RegExes work. Having Regular Expressions101 would literally read the name of the place it sends you (Regular Expressions101 = regex101) + 101 has been historically correlated with the usage instructions instead of general info.
- [PET PEEVE] The spinning 2 arrows icon beside RegEx Typo Fixing is the only icon of that kind in the whole program and it looks kinda blurry. Maybe it can be replaced with an icon similar to the ones used in the Settings section of the Setup tab, replaced with something in higher quality or removed altogether.
- [PET PEEVE] Maybe the "reset" button at the Setup tab, the "add now" button at the Editing tab, the "done" message at the bottom should be capitalized to follow the standard with all the other buttons of the program. Maybe the "Editing" tab should also be switched to "Edit" for the same reason, all the other commands in there are verbs in the imperative form.
- [PET PEEVE] Maybe some spaces can be added to the ticks in the Generate popup. They do get merged together in the Category and Links to page sections.
- Feel free to ignore all the pet peeve messages if you want. I just love the compactness and the lightweight feeling the script has to offer and started looking at its details wishing to make it extra-polished. - Klein Muçi (talk) 00:36, 12 July 2022 (UTC)
- "Other" tab suggestions:
- Can we add a small text notification in the bottom of the tab telling us that the summary for moves, protects and deletions will be taken from the Edit tab?
- Can we have a tooltip explaining how to the Expiry field works and what kind of values accepts? Especially for the indef. cases. I have literally no idea currently and didn't want to experiment.
- [Not sure if achievable] Can we add a skip option if the page that I'm trying to protect already has the same protection level that I'm trying to give? There are many cases in massprotect situations where I have to click "Protect" dozens of times to finish the whole list and in the end you see that there were only 3 entries that actually needed to be protected. If they could be auto-skipped without me needing to click "Protect" that would save me a lot of time.
- Question: What happens if you try to Move a page in a title that already exists? Again, too scared to experiment. - Klein Muçi (talk) 13:03, 16 July 2022 (UTC)
- "Other" tab suggestions:
- @Joeytje50, thank you for taking our suggestions into consideration! Some comments in regard to what you wrote:
- @Klein Muçi: @Certes: Thanks for the QOL suggestions. I've implemented most of these, so if you ever have any more suggestions please do let me know.
- Thanks for all the improvements. I should have noticed that the top area was adjustable – I'd been trying to drag the bottom line and hadn't noticed the diagonal stripes in the corner! The one thing that could still be improved is the tiny input window for "Wiki search/Search term" at the bottom of the Setup/Generate dialog. That's a frequently used box and we're rightly encouraged to add something complex like
African elephant insource:/African elephant/
, which simply won't fit in the default text space. Certes (talk) 09:28, 12 July 2022 (UTC)
Ignore references
I don't want to change any citation URLs, reference names, or reference quotes. Would it be possible to ignore anything inside <ref> </ref>
tags, similar to User:Joeytje50/JWB#Ignoring unparsed content? Thank you! Reywas92Talk 18:49, 30 March 2022 (UTC)
- Thanks for the suggestion. I've put this on my to-do list, because this would probably require me to look into a few other things that would need to change along with this. However, I do like the suggestion, so I'll try having a look at this in the future. Joeytje50 (talk) 23:34, 11 July 2022 (UTC)
Protection levels
I recently used this script for protection and saw that, it has only three levels of protections, can we add templateeditor too? as on mrwikisource its a most used level of protection. thanks QueerEcofeminist[they/them/their] 05:20, 21 May 2022 (UTC)
- Unfortunately, like this ECP suggestion above, I am currently not aware of a system that automatically detects the full list of protection levels available on a wiki. I'll have a look at this in the future, to be able to implement this feature without breaking the tool on other wikis that might not have this specific protection level. Thanks for suggesting this addition though! Joeytje50 (talk) 23:36, 11 July 2022 (UTC)
Suggestion: reminder of Skip and More replace fields
I sometimes run JWB for Foo, using the handy Skip feature to quickly dismiss pages not containing Foo, then run for Bar, wondering why nothing happens. (The Bar pages are skipped because they don't contain Foo.) Would it be helpful to change the tab header change from "Skip" to something like "Skip ON" when skipping is in force? Similarly, I forget that I have more replace fields which I set up temporarily for Foo. Would it be helpful to change the button which displays them from More replace fields to something like 3 more replace fields as a reminder that they are still in force? Certes (talk) 19:18, 20 July 2022 (UTC)
- I believe we are asking for the same thing here and your UI suggestion is better than mine. - Klein Muçi (talk) 20:51, 20 July 2022 (UTC)
"undefined" error
I'm editing Federal Way, Washington with JWB, and RETF would like to change "undefined" to "p$1up$1np$1dp$1ep$1fp$1ip$1np$1ep$1dp$1". A similar change is suggested in Undefined itself, for the first occurrence (which has a capital U). This doesn't happen in AWB. I've asked at WT:AWB/T, but could it be a JWB problem? For example, could an unused regex (text to be replaced) which has a JavaScript undefined value somehow get type cast to the string "undefined", then match successfully? Certes (talk) 11:38, 22 August 2022 (UTC)
- Now fixed by removing a blank rule. A potential minor bug may remain, but currently causes no problems. Certes (talk) 12:43, 22 August 2022 (UTC)
itwiki
Hi, I would like to know why do you change "cioè" to "ciòè"? Is it an error, can it be fixed? Also "un altra". GryffindorD (talk) 15:57, 21 July 2023 (UTC)
- @GryffindorD, I suspect this was done with RegExTypoFix on, from it:Wikipedia:AutoWikiBrowser/Typos. — Qwerfjkltalk 17:04, 21 July 2023 (UTC)
- Yes, they were made with RegExTypoFix but Wikipedia:AutoWikiBrowser/Typos does not have those modification. --GryffindorD (talk) 17:31, 21 July 2023 (UTC)
- @GryffindorD, I am fairly sure it's caused by this replacement:
<Typo word="Ciò" find="\b(C|c)i(?:o’|o(?!')\b|ó\b|o'(?!'))" replace="$1iò" /></nowiki> <nowiki>
— Qwerfjkltalk 07:18, 23 July 2023 (UTC)- Yes: JWB does not think è is a word character for the purposes of \b, so it thinks it sees the word cio, followed and delimited by a non-word è. Certes (talk) 11:52, 23 July 2023 (UTC)
- I think AWB RegExTypoFix would work fine though, because it uses a different regex system. — Qwerfjkltalk 17:24, 23 July 2023 (UTC)
- Yes, I think you're right. JWB can fail dangerously when applying expressions designed for AWB's interpretation of \b to text with accents. Certes (talk) 17:38, 23 July 2023 (UTC)
- @Certes: This does look like a fairly serious issue; I think I will disable any regex typo fixes that contain expressions that might work unexpectedly in JavaScript RegEx (compared to PCRE). Do you happen to know where I might be able to find a complete list? Joeytje50 (talk) 14:16, 21 December 2023 (UTC)
- @Joeytje50: I'm not sure it's a JavaScript vs PCRE issue. It may have more to do with the locale in which JavaScript is executing, which thinks only A–Z and a–z are letters. Some of the changes I undo don't involve accents directly: García is becomes Garcían is, because JWB thinks í isn't a letter, sees the phrase a is, and changes a to an before the vowel. Certes (talk) 15:23, 21 December 2023 (UTC)
- Another example, found in my normal editing today: N. D. Cocea, where JWB RETF wants to change Roșie to Roși.e. because ie as a word usually stands for id est, and ș isn't a word character in this locale. Certes (talk) 22:05, 23 December 2023 (UTC)
- @Certes:I do understand the issue that those specific characters aren't recognised as word characters, and therefore are treated as a word boundary, but I am a bit confused on how to mitigate this issue for RETF, to be cross-compatible with the format AWB uses. When testing with Regex101's JavaScript and PCRE versions, both of those seem to be triggered on that same replacement rule. So I'm not sure how typo fixes like the one that was originally reported could be working correctly in AWB.
- However, I am interested in trying to fix issues that occur in JWB, which do not occur in AWB, to ensure pages do not get edited for the worse due to RETF. If anyone has suggestions on what needs to be changed to the script then I'd love some feedback. Other than that, in this specific case, I think the RETF rule is simply not working as intended, going by the fact PCRE also seems to pick up the same issue.Joeytje50 (talk) 23:04, 27 December 2023 (UTC)
- Newer versions of ECMAscript seem to treat "Unicode letters" (é, etc.) as word characters if the /u flag is given. Have you tried adding u to the RegExp flags, e.g.
new RegExp(RETF.list[i][0], 'gu')
at User:Joeytje50/RETF.js#L-78 (adding "u" to existing code)? Certes (talk) 23:40, 27 December 2023 (UTC)- I just tried enabling the flag
u
in the regex101 links I added earlier, and the JavaScript one still seems to (incorrectly) match the given string, while with this flag, PCRE does function correctly. So based on that, the JavaScript RegEx engine still doesn't seem to support proper selection of\b
with special unicode characters. Joeytje50 (talk) 20:31, 29 January 2024 (UTC)
- I just tried enabling the flag
- Newer versions of ECMAscript seem to treat "Unicode letters" (é, etc.) as word characters if the /u flag is given. Have you tried adding u to the RegExp flags, e.g.
- @Certes: This does look like a fairly serious issue; I think I will disable any regex typo fixes that contain expressions that might work unexpectedly in JavaScript RegEx (compared to PCRE). Do you happen to know where I might be able to find a complete list? Joeytje50 (talk) 14:16, 21 December 2023 (UTC)
- Yes, I think you're right. JWB can fail dangerously when applying expressions designed for AWB's interpretation of \b to text with accents. Certes (talk) 17:38, 23 July 2023 (UTC)
- I think AWB RegExTypoFix would work fine though, because it uses a different regex system. — Qwerfjkltalk 17:24, 23 July 2023 (UTC)
- Yes: JWB does not think è is a word character for the purposes of \b, so it thinks it sees the word cio, followed and delimited by a non-word è. Certes (talk) 11:52, 23 July 2023 (UTC)
- @GryffindorD, I am fairly sure it's caused by this replacement:
- Yes, they were made with RegExTypoFix but Wikipedia:AutoWikiBrowser/Typos does not have those modification. --GryffindorD (talk) 17:31, 21 July 2023 (UTC)
Using deprecated API module list=deletedrevs
JWB uses the deprecated API module list=deletedrevs whenever fetching page data: [1] – however, it does not seem to actually use the results. Is there a chance that this code could just be deleted, or is it used somewhere in a non-obvious way? This would unblock T221869 (task to remove that API module). Matma Rex talk 02:02, 10 December 2023 (UTC)
Bug report: regex in "When page doesn't contain" doesn't work
I'm using a simple regex \{\{ *([Nn]avbox
in the field "When page doesn't contain:" (flags: g) to filter out pages which are not using template {{navbox}}. However, JWB is not filtering out pages like Template:Epi and Template:Mountain range table cell (I'm going through Category:Mountain templates). —andrybak (talk) 08:39, 10 December 2023 (UTC)
- I have also tested non-regex filtering by "avbox" – it seems to work, but the pages don't appear as "skipped" in the log tab. —andrybak (talk) 08:42, 10 December 2023 (UTC)
- @Andrybak: If you are literally using that regex, it has an unbalanced left parenthesis. Certes (talk) 16:23, 10 December 2023 (UTC)
- My bad. The actual regex is
\{\{ *([Nn]avbox|[Mm]ilitary navigation|[Cc]ivil navigation|([A-Za-z]+){1,5} topic|[dD]ocumentation subpage)
(value ofskipNotContains
at the top of User:Andrybak/JWB-settings.json). - I've just tested
\{\{ *[Nn]avbox
, without the buggy unbalanced left parenthesis, and it is also broken. An example of a page which should be skipped, but isn't is Category:Mountain navigational boxes. —andrybak (talk) 17:22, 10 December 2023 (UTC)- I downloaded your settings, imported them into a fresh JWB and made a list of one page: Category:Mountain navigational boxes. I clicked Start; it skipped and is listed in the log as skipped. My next thought was that your list of pages has junk to the right of the page name which doesn't show because the page list is a narrow window, and you're trying to edit a redlink like Category:Mountain navigational boxes(lots of whitespace here)14 pages (been there; banged my head for hours), but that would still appear in the log. Certes (talk) 19:42, 10 December 2023 (UTC)
- My bad. The actual regex is
Hmm. OK. The weirdness in the list is not it. 1) I've encountered the bug in a list populated via a category; and 2) the edit of the page is performed (diff & editor are filled).
🤔 I couldn't reproduce the bug when the only page in the list is Category:Mountain navigational boxes. But when the list is:
Template:100 Famous Japanese Mountains Category:Mountain navigational boxes Category:Japan geography navigational boxes
then none of the pages are skipped. Both pre-parse mode and regular editing are affected. If I put a category at the start:
Category:Mountain navigational boxes Category:Japan geography navigational boxes Template:100 Famous Japanese Mountains
then only the first category is skipped. After skipping the first category in pre-parse mode, the second category isn't skipped if I start editing. But if I click "stop" and then "start" again, the second category gets skipped too.
It's as though the regex is a one-off, which gets reset on every click of "stop". Let me know if I need to write down more detailed steps to reproduce the bug. —andrybak (talk) 21:52, 10 December 2023 (UTC)
Regexp change not happening
I tried editing Uzbekistan with JWB to fix a typo: "Vladimir Klitschko" to "Wladimir Klitschko" (without quotes). This works correctly. However, if I tick Regular Expression then the change is not made, even though the plain text is a perfectly good regexp. I've noticed a number of other changes not happening recently too, though I don't have details. Has something changed? Certes (talk) 16:50, 12 January 2024 (UTC)
- Another case: change Writer's to Writers' in Baseball Writers' Association of America, because they have more than one scribe. Works as text but not as regexp .... unless I turn RETF off. (It's not a misguided WP:AWB/T entry changing it back: the plain text replacement works even with RETF on.) I suspect a timing hazard, with the replacement quietly giving up after n seconds and working or not depending on the speed and load of one's PC. Certes (talk) 23:07, 14 January 2024 (UTC)
- The Baseball example now works (perhaps coincidentally, I removed a browser extension which was slowing my PC) but I'm still seeing the behaviour at Uzbekistan. Please can another JWB user try that and see if it works for you? Certes (talk) 21:36, 15 January 2024 (UTC)
- Sorry, but JWB is now working so erratically for me (applying about half of the fixes at random) that I'm going to abandon using it until someone can respond. Certes (talk) 13:26, 16 January 2024 (UTC)
- Hey, sorry for the delay. I'm not sure what settings you use specifically, but my suspicion is that you're missing the
g
(Global replace) flag in your regular expression. As stated on WP:JWB#Using regex, you can test your regular expressions in one of the linked websites, where you would also have needed theg
flag to match all occurrences. I've updated the documentation to more explicitly mention this. - However, if this is not the issue, I think I'm going to need a bit more information to determine what the issue is. Could you please provide me with some edit diffs which went wrong, or if you've caught them all before submitting, could you let me know which settings on User:Certes/JWB-settings.json I should use to reproduce the issue? Joeytje50 (talk) 09:52, 29 January 2024 (UTC)
- Just to elaborate: I tried starting up JWB with the default settings, and adding
Uzbekistan
as the only page in the list, and filling the replacement fields withVladimir Klitschko
andWladimir Klitschko
, and that worked correctly both with and without regex, for me (using Firefox, at least). Joeytje50 (talk) 09:56, 29 January 2024 (UTC)- Sorry, I never noticed your reply! I did remember to add the g flag (though it might be helpful if it were added by default for compatibility with AWB – I think that used to happen). I tested my regexps elsewhere and also in JWB where they work fine as long as RETF is switched off. However, it clearly works for you so the problem may be at my end. I'm still having the problem but my PC is quite slow (or rather its memory is overloaded with other browsers etc.) and I suspect that a replacement is silently timing out rather than producing a error message. Thanks again for JWB which is still very useful for me as long as I turn off RETF. Certes (talk) 11:46, 11 June 2024 (UTC)
- Hey, sorry for the delay. I'm not sure what settings you use specifically, but my suspicion is that you're missing the
Sync from GitHub needed
The GitHub pull request previously discussed has been merged. Differences between on-wiki code and on-GitHub code:
- the changes in that PR
class="fullwidth"
change inJWB.init = function() { ... }
@version
at the top
I don't know what the release/publishing workflow is, but the on-wiki code needs to be updated. —andrybak (talk) 14:36, 2 March 2024 (UTC)
Plugin
Thanks for the wonderful tool. great job. How to use plugins used in AWB in JWB? I couldnt see any option to use or load any plugins. I used that often in ta.wikisource to create pages during transcription. Thanks -- Balaji (Let's talk) 06:37, 14 July 2024 (UTC)
Dark mode compatibility
JWB is currently having problems if the associated Wikipedia account has dark mode enabled. There are some suggested fixes on mw:Recommendations for night mode compatibility on Wikimedia wikis. -- Beland (talk) 05:22, 16 July 2024 (UTC)
Not working on frwp
Hi,
@Joeytje50: on the French Wikipedia the launch page fr:Wikipédia:AutoWikiBrowser/Script was created and then delete, it seems to prevent JWB to work... (I tried and used JWB on other Wikimedia projects, it worked fine, the deleted page seems to be the only difference). Is it fixable?
Cheers, VIGNERON * discut. 15:56, 21 July 2024 (UTC)
- Nevermind, my mistake: I forgot to add the script to my common.js on fr.wp. Solved. Cheers, VIGNERON * discut. 16:37, 21 July 2024 (UTC)