User talk:Joeytje50/Archive 1
This is an archive of past discussions with User:Joeytje50. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 |
Welcome
Welcome!
Hello, Joeytje50, and welcome to Wikipedia! Thank you for your contributions. I hope you like the place and decide to stay. Here are some pages that you might find helpful:
- The five pillars of Wikipedia
- Tutorial
- How to edit a page and How to develop articles
- How to create your first article (using the Article Wizard if you wish)
- Manual of Style
I hope you enjoy editing here and being a Wikipedian! Please sign your messages on discussion pages using four tildes (~~~~); this will automatically insert your username and the date. If you need help, check out Wikipedia:Questions, ask me on my talk page, or ask your question on this page and then place {{helpme}}
before the question. Again, welcome! Rich Farmbrough, 20:43, 3 November 2010 (UTC).
Auth problem
I use AWB as SmackBot over there but I have been rebuilding the bot (AWB is not really ideal for its job there) so nothing happened recently. Other AWB users include CookMePlox who seems to be using it fine, you could ask him. Presumably you are on the approved list? Rich Farmbrough, 20:43, 3 November 2010 (UTC).
Here you go
Per your own request on IRC TBloemink (talk) 14:42, 1 August 2011 (UTC) |
- nom nom nomJoeytje50 (talk) 14:44, 1 August 2011 (UTC)
A barnstar for you!
The Original Barnstar | |
hi bumze 15:00, 19 August 2011 (UTC) |
AWB script summary?
Hi Joeytje50, I just tried out your AWB script. I like it, but was wondering why I'm unable to edit the summary field. I like how AWB will let you choose a default summary, but you can modify it as necessary. It's also cool how AWB will append (via AWB) to the commit message. -Paul2520 (talk) 23:56, 10 September 2014 (UTC)
How to start AWB script
I'm enjoying AWB script already. Great, especially since my AWB.exe is broken. Could you add to the intro (once added to the /common.js userpage) how to start it? I expected this in section User:Joeytje50/AWB#Getting_started ;-) . -DePiep (talk) 19:10, 23 June 2015 (UTC)
- Did store my settings, cannot find back when restarting. Map? -DePiep (talk) 00:09, 24 June 2015 (UTC)
- I don't get it (I hope). When I store settings, I cannot retrieve it? Why & what is "store to wiki"? -DePiep (talk) 00:38, 24 June 2015 (UTC)
- For the second time, I could not save my settings (a dozen time-consuming REGEX's!). This time, when Save to wiki it fails saying:
API error: Invalid token
. Download it starts an endless waiting-mode without any feedback (still don't know which filename or map is used). -DePiep (talk) 12:59, 24 June 2015 (UTC)- Short: can you make it a serious script? -~~
- For the second time, I could not save my settings (a dozen time-consuming REGEX's!). This time, when Save to wiki it fails saying:
- I don't get it (I hope). When I store settings, I cannot retrieve it? Why & what is "store to wiki"? -DePiep (talk) 00:38, 24 June 2015 (UTC)
AWB script feature suggestions
Just some notes.
- I'd like to see something like: "You are editing page [[...]]"
- With that, I'd like to have an option "open this page (in regular wiki)"
Phabricator
FYI, I've had to open up a phabricator thread on the AWB script here. --I dream of horses If you reply here, please ping me by adding {{Ping|I dream of horses}} to your message. (talk to me) (contributions) @ 04:56, 28 June 2015 (UTC)
Major bug in AWB script
I have experienced that AWB script sometimes mixes up texts between articles. See [1]. The AWB script edit sequence was:
- Potassium_oxide (CASNo=12136-45-7): [2]
- Vanillin (CASNo=121-33-5): [3]
The second edit puts in the text of the previous article! (A check is the CASNo chemical identifier). It also happens in a longer series. -DePiep (talk) 21:47, 14 July 2015 (UTC)
- @DePiep: This sounds like something I've seen before in this script, but I thought I had fixed it. I think I know a way to fix it, which would also make it easy to implement your suggestion above: I'm going to create a variable that stores which page is currently being edited, and then make sure that variable corresponds with the url that's being saved to. Thanks for the suggestions and the bug report, and apologies for my inactivity. Joeytje50 (talk) 20:27, 24 December 2015 (UTC)
- Thanks, would be great. So far I managed by editing more relaxed ... -DePiep (talk) 00:05, 25 December 2015 (UTC)
- @DePiep: I think I fixed the bug you reported here, and added the feature you requested above. Could you try checking if you can reproduce this bug now? If not, I'm going to assume the fix has worked. If there's anything else wrong now, please report it again. Despite my inactivity I do still want to hear about any bug reports. Thanks again for reporting the bug and suggesting the extra feature. Joeytje50 (talk) 18:04, 27 February 2016 (UTC)
- Trying to reproduce is difficult: I need to click "Save" quickly = unchecked (which is illegal in AWB ...). But when I meet it again, I'll report it. Actually, yesterday it happened: [4] and another one (more data on request). I hope that was before you changed the code ;-). Thanks for fixing, the other points are features so less urgent. I like the
toytool. -DePiep (talk) 18:26, 27 February 2016 (UTC)- Luckily that was indeed before my edits to the script. I'll try to fix the other reported problems some time soon too. Especially the setting-saving and the typo-fixing reported in the Phabricator are problems I want to have a good look at. I'm glad you like it ;) Joeytje50 (talk) 00:16, 29 February 2016 (UTC)
- Trying to reproduce is difficult: I need to click "Save" quickly = unchecked (which is illegal in AWB ...). But when I meet it again, I'll report it. Actually, yesterday it happened: [4] and another one (more data on request). I hope that was before you changed the code ;-). Thanks for fixing, the other points are features so less urgent. I like the
- @DePiep: I think I fixed the bug you reported here, and added the feature you requested above. Could you try checking if you can reproduce this bug now? If not, I'm going to assume the fix has worked. If there's anything else wrong now, please report it again. Despite my inactivity I do still want to hear about any bug reports. Thanks again for reporting the bug and suggesting the extra feature. Joeytje50 (talk) 18:04, 27 February 2016 (UTC)
- Thanks, would be great. So far I managed by editing more relaxed ... -DePiep (talk) 00:05, 25 December 2015 (UTC)
- Joeytje50 It happened again: in [5], Atorvastatin was overwritten with the content from Atomoxetine (which was edited just before). -DePiep (talk) 13:47, 2 April 2016 (UTC)
- Why don't you just block the Save button until everything is finished, presented & saveable? -DePiep (talk) 20:33, 2 April 2016 (UTC)
- DePiep This is quite curious actually. I'll soon have a look at how this is still possible. Your suggestion sounds like that would work too indeed, so I'll consider that when having a look. I'll also try to fix the other problems you've reported then. Joeytje50 (talk) 19:03, 3 April 2016 (UTC)
- OK, I'll keep an eye for all this of course. Note that my browser (Ffox atop WinXP) can be very very slow, so a 1 ms time in a sequence (function a - blank something, function b - write new text), sometimes shows like 0.5 sec in real life over here. Enough to catch a Save click halfway. -DePiep (talk) 19:07, 3 April 2016 (UTC)
- DePiep This is quite curious actually. I'll soon have a look at how this is still possible. Your suggestion sounds like that would work too indeed, so I'll consider that when having a look. I'll also try to fix the other problems you've reported then. Joeytje50 (talk) 19:03, 3 April 2016 (UTC)
- Why don't you just block the Save button until everything is finished, presented & saveable? -DePiep (talk) 20:33, 2 April 2016 (UTC)
AutoWikiBrowser script in galician
Hi, I have found today your AutoWikiBrowser Script, great! :), and I wanted to translate it to galician. How can I do that? Bye, Elisardojm (talk) 12:48, 23 March 2016 (UTC)
- @Elisardojm: Thanks very much for helping out! I'd love to have more translations of the script. Unfortunately I'm not sure how to integrate translatewiki with my script, so unfortunately I can't link you there.
- I've created a talk page at User talk:Joeytje50/AWB.js/i18n.js where you can submit translations of the messages for the script. I've also made a walkthrough there on what would make this the easiest I could think of. If something's not clear about that walkthrough please do ask me to explain it further.
- Again, thanks very much for helping me out with the script. Joeytje50 (talk) 14:45, 23 March 2016 (UTC)
- Done Thank you for share that tool! :) And, how can I set the language? Elisardojm (talk) 20:12, 23 March 2016 (UTC)
- @Elisardojm: You can use this now by setting your language preferences to galician, or by putting
?uselang=gl
behind the url when using the AWB script. If you've already set your preferences to galician, that shouldn't be needed though. The reason you didn't see the new language until now is because I hadn't added them to the script yet. I've done that now though, so you should be able to see the messages. Thanks again for helping out with the script!Joeytje50 (talk) 20:35, 23 March 2016 (UTC)
- @Elisardojm: You can use this now by setting your language preferences to galician, or by putting
- Done Thank you for share that tool! :) And, how can I set the language? Elisardojm (talk) 20:12, 23 March 2016 (UTC)
- Great, it works fine now! :) Only a detail, could you change 'tab-setup' to "Config." and 'tab-editing' to "Edición"? It's because tabs in galician don't show correctly because the text is greater than in english. Bye, --Elisardojm (talk) 22:51, 23 March 2016 (UTC)
- @Elisardojm: Sure, no problem, I've changed those to what you requested.Joeytje50 (talk) 23:14, 23 March 2016 (UTC)
- Thanks! Bye, --Elisardojm (talk) 03:03, 24 March 2016 (UTC)
- @Elisardojm: Sure, no problem, I've changed those to what you requested.Joeytje50 (talk) 23:14, 23 March 2016 (UTC)
- Great, it works fine now! :) Only a detail, could you change 'tab-setup' to "Config." and 'tab-editing' to "Edición"? It's because tabs in galician don't show correctly because the text is greater than in english. Bye, --Elisardojm (talk) 22:51, 23 March 2016 (UTC)
Hi!, I have two new questions about AWB Script O:) I think that it will useful that the script make a sound when it find a change, because if you are working with other articles or programs it could warn you. It could be an option at Settings...
The other thing. I have a problem and I don't know how to solve it. I want to search a category with 15.698 articles, this, but I can't because the page list only has the first 5000 articles, and when it ends that page list and I want to work with the next 5000 articles, AWB creates the same page list with the first 5000 articles. How can I get the next 5000 articles loaded at the page list? Cheers!, Elisardojm (talk) 12:48, 31 March 2016 (UTC)
Curious: null-edits
In my AWBscript page, I see this counter note: "Null-edits: 16;". (About 3–5/100 edits end up here, in my AWB run). But during AWB-editing and Save-ing, I have met no irregularities (all pages were edited, as the AWB diff screen shows before saving). Then when I run the same pages again (because unedited, they remain in the dedicated maintenance category), the edit is performed OK. Curious (in other situations eg without category, this could be a more harmful effect). -DePiep (talk) 18:32, 2 April 2016 (UTC)
- Null edits are performed when AWB saves without any diff on the page. So, if there's no change from the regular expressions, either something is going wrong with the script, or the regular expression(s) you were using don't recognise anything on the page. Did you have 'skip when nothing is changed' enabled? Because if so, there should not even be any null-edits in the whole run (since that option should exclude null-edits completely, except when you're manually reverting the regex-made changes). If that is the case, there's really something majorly wrong. Joeytje50 (talk) 12:30, 3 April 2016 (UTC)
- I get this. I did not have any 'skip when ...' enabled. Also, the category I was handling was explicitly filled with pages that required an edit (parameter "| InChI =" was present). Also, those null-pages remained in the category, and so I could revisit them: then the edit did happen (2nd time: no null-edit on that same page).
- Opinion: of course this bug is very hard to detect or reproduce. I have the impression that it has to do with speed & sequence: I might have clicked 'save' when the browser page was not complete yet (my browser Ffox atop WinXP can be very slow!, so a 1 ms wait can become a full sec over here ;-) ). Anyway, I'll try to be alert for such situations. -DePiep (talk) 18:34, 3 April 2016 (UTC)
AWB script blanks the page
The page Rifapentine was blanked. [6]. In this AWB run yesterday (3750 pages), I did not edit manually (so manually blanking the page is unlikely to be the cause). -DePiep (talk) 12:13, 3 April 2016 (UTC)
- That does look like a big problem. It might be related to the null-edits problem you reported. Do you have your AWB-settings exported somewhere? If so, could you tell me which one it is? Perhaps that has something to do with it. Joeytje50 (talk) 12:28, 3 April 2016 (UTC)
- I used script settings named "Drugbox rm inchi v101" throughout. I did make intermediate savings of that set [7], but these were mostly category-list updates, not the REGEX and not handling changes (e.g., no 'skip when' changes): these I kept stable. -DePiep (talk) 18:25, 3 April 2016 (UTC)
AWB script chokes on titles containing "&"
Great script, many thanks for your effort here! I just wanted to let you know that any page title containing an ampersand character "&" results in a "can't save" error which stops further processing. Examples from today's session:
You might want to look into this… — JFG talk 08:30, 18 August 2016 (UTC)
- @JFG: I think I've fixed it now. It had to do with HTML escaping ampersands, which caused the script to get confused, thinking you were editing another page than the actual page you're editing. Thanks for reporting this bug. Joeytje50 (talk) 22:23, 9 October 2016 (UTC)
AWB Script: wrong links in log
In AWB Script's log panel, the links to diffs are wrong. To correct them, you must replace prefix https://en.wikipedia.org/index.php
with https://en.wikipedia.org/w/index.php
. Thanks! — JFG talk 05:46, 19 August 2016 (UTC)
- @JFG: I've fixed it so it works on any wiki now, for any url they use for the index.php location. Thanks for reporting this bug. Joeytje50 (talk) 22:24, 9 October 2016 (UTC)
AWB Script
Hi, Could you please use a different name for your AWB script? It's confusing many people, unnecessarily blaming the wrong software. It has little relation to the original, not by the same development team, at most, it reuses some of it's shared features such as RETF, which is fine.
Reedy (talk) 22:39, 9 October 2016 (UTC)
- @Reedy: Okay, I understand. Changing the name everywhere would take a while though, and I'm quite busy IRL right now, so I don't have time to do this right now. I'll mark your request as unread, and I'll try to get to it as soon as possible. I'll just have to think of an original name first though... I used this one because I've taken the idea directly from your AWB. Joeytje50 (talk) 22:58, 9 October 2016 (UTC)
- @Reedy and Joeytje50: I discovered AWB Script as I wanted to use AWB but couldn't because it only runs on Windows machines whereas I use a Macintosh and I don't want to run a Windows VM just for this purpose. Other editors on Mac or Linux may well have followed this same path, so that AWB Script should be mentioned as a viable alternative in the AWB for Linux/Mac instructions. Therefore I'd like you to keep the name as is, while making it clear in the script's page that is was "inspired by AWB" but independently developed. To address the potential confusion as
blaming the wrong software
, perhaps a note could be added in the bug reporting instructions of each tool. I hope both authors can come to a gentlemen's agreement on naming and referencing each other's work. Thanks for your attention. — JFG talk 10:07, 10 October 2016 (UTC)- Don't get me wrong, I'm not against someone writing another version, I just want to prevent any confusion. I'm more than happy for it to be linked from AWB pages, as appropriate. I do think a different name might be better... jAWB? JWB? Reedy (talk) 21:15, 10 October 2016 (UTC)
- @Reedy: I've moved the script to JWB, and updated all of the documentation and i18n messages. Let's just say JWB stands for Javascript Wiki Browser, not Joey Wiki Browser (or Joey's Own Editor if you like;). Joeytje50 (talk) 04:31, 14 November 2016 (UTC)
- Don't get me wrong, I'm not against someone writing another version, I just want to prevent any confusion. I'm more than happy for it to be linked from AWB pages, as appropriate. I do think a different name might be better... jAWB? JWB? Reedy (talk) 21:15, 10 October 2016 (UTC)
Wikia sites - Save and Download the setting
I can't save the setting for AWB script on any wikia sites because they lock all the js page on User namespace by default (except coomon.js and wikia.js page)
Beside, I can't download the json setting file from wikia sites. I don't know why it happen
123.26.221.80 (talk) 03:31, 12 November 2016 (UTC)
- @123.26.221.80: I've made settings save to /AWB-settings.css for all
wikia.com
sites now. The reason I use.js
(or.css
for Wikia then) subpages is because those pages can only be edited by the user whose subpage it is, or an administrator. That way, nobody can break a bot by editing its settings without the operator knowing it. I hope this change works for you. If Wikia ever decides to also abolish personal CSS subpages, please let me know, but I don't think there's any way to save it to the wiki securely then. Until that happens, this should work just fine though. - I put it on my to-do list to fix the downloading of the config files, but as far as I could test, importing the config files from your computer works just fine as long as you save it as a
.json
file to your computer, or change its file extension afterwards. Again, when I fix the downloading of the file, the default extension should be.json
again for the config files again, but after a change to browser behaviour the method I built in does not work anymore. Try downloading the config again and saving it as a json file to your computer, and see if it still does not work then. If it doesn't, please tell me, so I at least know there's something else wrong. Joeytje50 (talk) 00:18, 13 November 2016 (UTC)
- I still have this error message when saving the configs
- API error: Bad title "User:xxx%20xxx%20xxx/AWB-settings.css"
- xxx are characters of my username which divided by blank spaces.
- 123.26.221.80 (talk) 03:22, 13 November 2016 (UTC)
- @123.26.221.80: I fear that I can't really help you if I don't know what that username is. Perhaps there's something wrong with escaped characters? Perhaps you're using reserved characters somehow? Could you please link your userpage so that I can have a look at what could possibly be causing this? Also, I've tested this on one specific Wikia wiki, but could you try editing a random .css subpage of your userpage? For example, edit
User:MyUsername/test.css
and see if it gives an error if you try to edit it (you don't have to submit the edit, just open the edit page and see if it gives an error in the normal editor). Perhaps some wikis have different settings than others. - Of course, if you want to, you could also link the full url to your user page on the Wikia wiki in question, and I could see for myself what the problem is. Joeytje50 (talk) 02:42, 14 November 2016 (UTC)
- @123.26.221.80: I fear that I can't really help you if I don't know what that username is. Perhaps there's something wrong with escaped characters? Perhaps you're using reserved characters somehow? Could you please link your userpage so that I can have a look at what could possibly be causing this? Also, I've tested this on one specific Wikia wiki, but could you try editing a random .css subpage of your userpage? For example, edit
- Ok here is the full error
- API error: Bad title "User:Chi%E1%BA%BFn%20Th%E1%BA%A7n%20V%C6%B0%C6%A1ng/AWB-settings.css"
- And here's my test wiki
- http://chien.wikia.com/wiki/Chien_Wiki:AutoWikiBrowser/Script
- My username is Chiến Thần Vương
- 123.18.32.102 (talk) 03:38, 19 November 2016 (UTC)
- @123.26.221.80: It helped to know that. There was a problem in the code with url-encoded characters such as those in your username. I've fixed it now, so you should be able to save your settings now.Joeytje50 (talk) 22:57, 19 November 2016 (UTC)
- Thank you very much. About the downloading setting function, I hope you can fix it as soon as possible :) 123.18.32.102 (talk) 07:48, 20 November 2016 (UTC)
Append/Prepend text
Can you make a function to append/prepend text just like AWB software?123.18.32.102 (talk) 07:50, 20 November 2016 (UTC)
- @123.18.32.102: That functionality already exists, although it does not have a separate box for it. You can accomplish this by simply replacing
^
or$
with your text (with regular expressions checked) to prepend or append respectively. For example, this edit was made by replacing$
with\nappend text test
, with regular expressions checked. I hope this helps.Joeytje50 (talk) 16:05, 20 November 2016 (UTC)
Generate list of pages from combined and intersection categories
Can you make an iption for JWB script to generate list of pages from combined and intersection categories?
- Combined option: get all the pages have Category A or B
- Intersection option: only get pages have both of category A and B
Thank you 123.26.223.81 (talk) 16:01, 26 November 2016 (UTC)
Minor hiccup at end of list
After At the end of a list, when previewing the last page, I clicked "Skip" and the JWB page went empty -- OK. But: the link that says "You are editing page [[xyz]]" was kept (the link above the edit box). (and thanks for starting the name-change process). -DePiep (talk) 18:18, 27 November 2016 (UTC)
- @DePiep: That seemed like a really quick fix, so I've made it work as it should now. Thanks for reporting it. Joeytje50 (talk) 00:03, 28 November 2016 (UTC)
A barnstar for you!
The Brilliant Idea Barnstar | |
I hereby award you this barnstar for your briliant and elegant rewrite of AWB in JavaScript! I thank you on behalf of all the users who will ever find it helpful! Keep up the good work! Ivi104 (talk) 11:23, 1 December 2016 (UTC) |
- Thank you very much. I really appreciate that so many people like it. Joeytje50 (talk) 00:57, 5 December 2016 (UTC)
JWB Generate limits
Hi! First let me say THANK YOU so much for creating this; as a former Windows AWB now Linux user, I wish I'd discovered it ages ago! I do have a question regarding the Generate function though... many (but not all?) of the methods seem to be limited to generating the first 500 of whatever method is used. Would there be a simple way to allow users to then get the next 500, and so on, or if not, is there a way to alter this fixed number, on a user-by-user basis (perhaps as a parameter or somesuch in Special:MyPage/common.js?). I haven't taken a look at the code yet, and happy to try copy, paste, and tinker about with a custom version, but any pointers in the right direction would be much appreciated! Cheers! ‑‑YodinT 02:13, 14 December 2016 (UTC)
- I want to +1 this praise, and also note that I would love to be able to generate lists from more sets. For example, I would love to be able to either do a string search via the search results, and/or pull lists from Special:LinkSearch. One of the main uses for AWB, in my application, is fixing urls where websites haven't provided a stable URL or redirects to old urls. Sadads (talk) 14:04, 15 December 2016 (UTC)
- +
- "The next 500" option could be implemented like, when listing a category: "Next 500 from Bluebeard" (1st next pagename to be entered manually). -DePiep (talk) 09:59, 1 January 2017 (UTC)
- Thank you guys for the praise and the feedback. I really appreciate hearing back from people using my script, even though it might take a while before I fix/implement more difficult to make issues.
- @Yodin: This was caused by an update to the API, explained here, which caused my code to stop working. This should be fixed now though.
- @Sadads: I might start working on that some time later, but I might not have enough time free to start working on that for some time now. Thanks for the suggestion though, I've added it to my to-do list for me to do later when I've got some free time to spend working on this.
- @DePiep: I implemented it the way I had it implemented before the fire nation attacked. Right now, it automatically finds the page to continue with and then gets the list from there. This still limits to at most 100 consecutive requests. If you're running into this limit regularly, I could create a button to let you "rerun same query" to fetch more pages, but it should also help to switch to an account with bot rights if you're generating long lists, since bots (and admins) can access 10 times the amount of results in a single query.
- I hope this addresses this issue. If not, just keep poking me until I start doing stuff ;) Joeytje50 (talk) 22:08, 1 January 2017 (UTC)
- This is perfect, thanks very much! ‑‑YodinT 14:17, 2 January 2017 (UTC)
JWB delete bug
First this bug is on a wiki running mediaiwki V1.26.4, and I'm an admin on the wiki. When I run the script and attempt to "delete" a page, I get an error in JWB.api.delete
saying JWB.page.deletedrevs[0]
is undefined. I got it working locally by checking JWB.page.deletedrevs && JWB.page.deletedrevs[0]
on line 402. Not sure if that's "safe" or not though. Thanks for your time! ~Fewfre ✍ 05:35, 31 December 2016 (UTC)
- @Fewfre: Thanks very much for reporting this issue and finding out what the solution was to fixing it. I think the suggested fix is absolutely safe to implement, because if there are no deleted revisions, this part does nothing, and that's exactly where this is causing problems. I've implemented your suggested change, so everything should be working correctly now. If it doesn't, I'd be more than happy to find out what the problem is.Joeytje50 (talk) 19:24, 1 January 2017 (UTC)
- Thanks for taking care of it so quickly! I really appetite this script and the time you've put into it. Especially since it has no download requirements, which lets me use it at work (plus JavaScript tools are always cool). ~Fewfre ✍ 23:01, 4 January 2017 (UTC)
Installation on other wikis
Dear Joey, I just read about your script today (on the voting on making a web based AWB) I tried it, and its good. Id like to try it out on Wikispecies, and wonder what do I need to do to install it? So far I put the short script at my user subpage at my common.js (AND on meta global.js, risk for problems?) but what is more needed, I guess the large Javascript must be moved to a page there? So, my question is exactly what, from where and to where? We are also using AWB on species and the typo, and I guess its important to see to that all those different things correspond? Dan Koehl (talk) 00:08, 21 February 2017 (UTC)
- @Dan Koehl: I tested it just now, and it should work if you click the button that says "JS Wiki Browser" in the tools section on the portlet to the left (below the wiki's logo). That should redirect you to the page that starts JWB. If this doesn't work, or you're not seeing the link, you could try going directly to species:Project:AutoWikiBrowser/Script, or if that still doesn't work, just reply to this and I'll try to look into it. Joeytje50 (talk) 03:27, 21 February 2017 (UTC)
- No it didn't work. Is it possible that the global.js is disturbing? Dan Koehl (talk) 06:27, 21 February 2017 (UTC)
- The path https://species.wikimedia.org/wiki/Project:AutoWikiBrowser/Script gets redirected to https://species.wikimedia.org/wiki/Wikispecies:AutoWikiBrowser/Script, that may be the problem? Dan Koehl (talk) 06:33, 21 February 2017 (UTC)
- @Dan Koehl: I think I know what the problem is: You're importing both the old and the new
load.js
for the script on your common.js file. If you remove the first line of your common.js, it should work. I've moved my script from AWB to JWB to avoid confusion between my Javascript Wiki Browser with the original AutoWikiBrowser program, but importing both the old import location and the new one causes the loading of the script to fail.Joeytje50 (talk) 13:58, 21 February 2017 (UTC)
- @Dan Koehl: I think I know what the problem is: You're importing both the old and the new
- The path https://species.wikimedia.org/wiki/Project:AutoWikiBrowser/Script gets redirected to https://species.wikimedia.org/wiki/Wikispecies:AutoWikiBrowser/Script, that may be the problem? Dan Koehl (talk) 06:33, 21 February 2017 (UTC)
Yes, perfect, now its working! Dan Koehl (talk) 14:22, 21 February 2017 (UTC)
JWB multi-line edits
I came here mainly to say a massive THANK YOU for JWB! I once got AWB running on a Mac using a temporary trial of CrossOver, but JWB is much easier for me. (And, thanks to you, free.)
Is there a way to insert line breaks within the replacement text, e.g. when replacing one category with multiple categories? I just did this on several pages, clicking in the edited text and typing the line breaks manually, which didn't take too long, but obviously it would be easier if the inserted text included line breaks. – Fayenatic London 22:26, 19 March 2017 (UTC)
- @Fayenatic london: Yes, that should be possible by putting
\n
wherever you would like a newline. Thanks for asking; you asking pointed out to me that I hadn't documented this yet, so I've added that to the documentation page now. Joeytje50 (talk) 23:12, 20 March 2017 (UTC)- Excellent! I've also noticed that "JS Wiki browser" has appeared under Tools in the main navigation menu at the left of the screen, so it's only one click away – brilliant. – Fayenatic London 08:47, 21 March 2017 (UTC)
- Here's a related question: is it possible to remove multiple lines? I tried including \n in the "Replace" field, between the text of multiple lines, but it did not work for me. – Fayenatic London 21:18, 12 August 2017 (UTC)
- @Fayenatic london: Thanks for the suggestion. I had indeed implemented support for \n in the "With" field, but not in the "Replace" field. I've fixed that now, so
\n
should work even outside regex-mode.Joeytje50 (talk) 11:29, 14 August 2017 (UTC)
- @Fayenatic london: Thanks for the suggestion. I had indeed implemented support for \n in the "With" field, but not in the "Replace" field. I've fixed that now, so
Typo fixing
Hello, and thank you very much for the excellent JWB. I use Ubuntu, so it saves me installing AWB under Wine. I did get one suggestion to replace good text with gibberish but the error was in Wikipedia:AutoWikiBrowser/Typos#Typo list rather than JWB, so here's a link for the benefit of anyone wanting to fix a similar problem. Thanks again, Certes (talk) 13:42, 21 March 2017 (UTC)
JWB Translations
Hi Juey,
Someone copied your script over on Dev at Wikia, but as far as I can tell the only 'improvements' have been to add i18n and then break it in various places. As far as I know JWB should work on Wikia as is, so are you able to integrate the new translations? Once you've done that I'll delete the copies and get people to import from here/liaise with you directly to add more translations thus benefitting users here as well.
If you could reply to me over on wikia:dev:Message Wall:Cqm I'd appreciate it, as I don't think I have an account here.
Thanks, Cam/86.31.136.35 (talk) 20:42, 21 March 2017 (UTC)
Handling content with variable parameters
Hi, I was wondering whether it is possible to handle content with variable parameters in the search and replace fields. I ask this, because I want to remove flagicons from a couple of articles. The code has a fixed part and a variable part to denote the country (e.g. {{flagicon|AUS}}). So I wonder whether I can handle all the instance the flagicon code is used with different country codes in an article in one go?Tvx1 14:52, 4 October 2017 (UTC)
- Anyone here?Tvx1 17:52, 9 October 2017 (UTC)
- @Tvx1: I'm not entirely sure what you are looking to do. Do you want to search for all occurrences of
{{flagicon|XXX}}
on the page (with XXX being the country abbreviation)? If so, have you tried looking into regular expressions? With the regular expression{{[Ff]lagicon\|[A-Z]{3}}}
you can match just that. See https://regex101.com/r/Eqg9xr/1 for a site that explains what this regular expression does (see the explanation on the panel to the right) - I hope this answers your question.Joeytje50 (talk) 09:03, 6 November 2017 (UTC)
- By the way, if you want to find each country's abbreviation in that list, and then do something with it, you can get the parameter of the template like so: replace the regular expression
{{[Ff]lagicon\|([A-Z]{3})}}
with$1
, which will replace any flagicon with just its parameter. See https://regex101.com/r/Eqg9xr/2 for a demonstration of this.Joeytje50 (talk) 09:06, 6 November 2017 (UTC)- It's indeed the first action I want to achieve (search for all occurrences of
{{flagicon|XXX}}
}}. However at the moment I can't get the script to work at all. I just get stuck at the Wikipedia:AutoWikiBrowser/Script page.Tvx1 20:12, 6 November 2017 (UTC)- @Tvx1: Apologies; in the changes I made to the script yesterday I accidentally snuck in a giant bug. I've fixed it now, so the script should work again.Joeytje50 (talk) 07:56, 7 November 2017 (UTC)
- It's indeed the first action I want to achieve (search for all occurrences of
- By the way, if you want to find each country's abbreviation in that list, and then do something with it, you can get the parameter of the template like so: replace the regular expression
JWB
In the edit summaries, could you make JWB link to WP:JWB? Headbomb {t · c · p · b} 14:26, 31 October 2017 (UTC)
- @Headbomb: I've implemented this in the browser. The default suffix is now "( via WP:JWB)" on enwiki, while it's still the same on every other wiki (to prevent filling up the entire summary bar with just the suffix)Joeytje50 (talk) 09:07, 6 November 2017 (UTC)
Jwb mrwp
Hi I used to use JWB on MrWp by installing script on global.js from few months I've been noticing that it's not working at all on that wiki. In the interface it shows that the edit is done but on wiki its not showing any edit. Please check and let me know --✝iѵɛɳ२२४०†ลℓк †๏ мэ 06:36, 26 May 2018 (UTC)
- @Tiven2240: Could you please link me to the wiki where this is being an issue? That will help me find out what's going wrong.Joeytje50 (talk) 13:00, 3 October 2018 (UTC)
- It seems working fine now. Thank you. --✝iѵɛɳ२२४०†ลℓк †๏ мэ 13:30, 3 October 2018 (UTC)
Wikia Issues
Good morning, Joey. Thank you for your awesome script, I used it mostly in WIkia sites and it wwrks greatly. Howwerver, Recently WWIkia have retired their monobook skin, make your script can't be loaded anymore. Can you fix this problem? Thank you 14.189.62.200 (talk) 03:37, 27 May 2018 (UTC)
- @14.189.62.200: if you load your script through the skin.js subpage (Special:MyPage/wikia.js on Wikia I believe) it will load on Oasis / Wikia skin as well. If it doesn't, please contact me again and mention the wiki and your username so I can see what's going wrong.Joeytje50 (talk) 12:59, 3 October 2018 (UTC)
JWB in Galician wiki
Hi, first, I wanted to thanks you for that awesome tool, it's a great tool to use bots at small wikis like Galician wiki. Second, we need some help with the script to make it more useful for our users. We have translated the help page at gl:Wikipedia:JavascriptWikiBrowser, and some users had configured the tool because at our tiny community nobody knows how install and use a bot, that's because your tool is so useful for us. But, we have a problem, the tool is a bit slow and we don't know how configure it to work more fast, could you help us to tweak it? At Galician wiki I have other user, User:Corribot, that user is a bot account, and I'm trying to use JWB with it. I loaded a list of pages of 112000 articles, and I set the rules to find&replace, but the problem is that the script delays near 10 seconds to review an article, and that's a lot of time to work with it. I reviewed the help User:Joeytje50/JWB, and I had readed about the field "every [] sec", should we enter a number to increase the speed of the script? The problem is that field don't appears at our version at gl:Wikipedia:AutoWikiBrowser/Script...
I would be great if you could help us to tweak your tool at Galician wiki, because we have a lot of work for bots, but actually no users there have the skills to use a real bot to help. Thanks in advance, and bye, Elisardojm (talk) 00:39, 23 June 2018 (UTC)
- @Elisardojm: I've tested on your wiki, and as far as I could see, if you are editing on an account with the
bot
usergroup, listed as a bot on the AWB checkpage, it should work. Could you please do the following for me, to see what is causing the problem: press Ctrl+⇧ Shift+J and type the following: console.log(JWB.bot, JWB.debug)
- then could you please paste the result of that code here? That will help me to find out why it isn't working.Joeytje50 (talk) 12:54, 3 October 2018 (UTC)
- Joeytje50, sorry for bother you, finally, I don't know how, the field "every [] sec" appeared. Thanks! Bye, --Elisardojm (talk) 08:18, 6 October 2018 (UTC)
JWB dependency error
It looks like mediawiki.action.history.diff was renamed to mediawiki.diff.styles. So the browser console shows an error when User:Joeytje50/JWB.js is loaded. Can you edit the script ? Thanks :) --Framawiki (please notify) (talk) 13:12, 26 August 2018 (UTC)
JWB check list
Sir, how can I add my name in JWB checklist.--PATH SLOPU (Talk) 16:01, 14 September 2018 (UTC)
- (talk page stalker) @Path slopu: The same as requesting to use AWB. ‑‑YodinT 22:48, 14 September 2018 (UTC)
- @Yodin:Thank you for your advice. --PATH SLOPU (Talk) 09:14, 15 September 2018 (UTC)
- I would like to use JWB for my bot. What should I do. Please help.--PATH SLOPU (Talk) 09:17, 15 September 2018 (UTC)
- Following the message on your talk page, as you haven't made many edits yet, it would be useful to know what you were planning to use JWB to do. ‑‑YodinT 18:01, 15 September 2018 (UTC)
- @Path slopu: It's also good to note that I do not maintain the checkpage for AWB. Project:AutoWikiBrowser/CheckPage#Guide might be useful to read before requesting access on the requests page. Joeytje50 (talk) 12:25, 3 October 2018 (UTC)
- Yodin and Joeytje50: Hi greetings, I would like to use JWB for adding wikiproject banners in talk page articles.PATH SLOPU (Talk) 12:07, 12 October 2018 (UTC)
- @Path slopu: It's also good to note that I do not maintain the checkpage for AWB. Project:AutoWikiBrowser/CheckPage#Guide might be useful to read before requesting access on the requests page. Joeytje50 (talk) 12:25, 3 October 2018 (UTC)
- Following the message on your talk page, as you haven't made many edits yet, it would be useful to know what you were planning to use JWB to do. ‑‑YodinT 18:01, 15 September 2018 (UTC)
- I would like to use JWB for my bot. What should I do. Please help.--PATH SLOPU (Talk) 09:17, 15 September 2018 (UTC)
- @Yodin:Thank you for your advice. --PATH SLOPU (Talk) 09:14, 15 September 2018 (UTC)
JBW not in working order?
Hello Joey, what has happened, the page https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Script was deleted 14 september, with comment "(no reason to keep it here, it can be moved back when in working order", whats going on? Can I use the script with any other method, or is ist temporarily not available?Dan Koehl (talk) 07:12, 23 September 2018 (UTC)
- @Dan Koehl: The page doesn't need to exist for JWB to work. As long as the script is installed, there should be a link in the tools panel that will direct you to that (nonexistent) page, where JWB will detect the page name and load the interface. — AfroThundr (u · t · c) 06:55, 24 September 2018 (UTC)
- Still, I think it gets confused for users if they follow the link from the sentence : "After installing the script, simply go to this page to run the script.", and then they end up on a deleted page? Dan Koehl (talk) 06:32, 29 September 2018 (UTC)
- @Joeytje50 and AfroThundr3007730:, after once again inserting the link on my common.js page, (as well as my global.js on meta) I still dont get the link, can not start the script. I wonder what is wrong...? Dan Koehl (talk) 06:43, 29 September 2018 (UTC)
- @Dan Koehl: Have you already tried purging your browser cache? If it's still not loading, try checking your browser console (F12, then "console" tab) and see if you have any errors. — AfroThundr (u · t · c) 13:11, 29 September 2018 (UTC)
- @Joeytje50 and AfroThundr3007730:, after once again inserting the link on my common.js page, (as well as my global.js on meta) I still dont get the link, can not start the script. I wonder what is wrong...? Dan Koehl (talk) 06:43, 29 September 2018 (UTC)
Fix for unstyled diff previews
I'm not sure if this is intentional, but the diff view shows up as plain text when I use JWB. I figured the diff view would inherit the styles from MediaWiki, but that's apparently not happening. I fixed it by basically duplicating the existing diff styles and having it load when JWB launches. The stylesheet can be found here: User:AfroThundr3007730/JWB-diff.css. The selectors will ensure that it will only affect JWB elements. To have it load only when JWB does (as opposed to simply using importStylesheet()
to load it unconditionally) I used the following in my common.js:
if(mw.config.get('wgCanonicalNamespace')+':'+mw.config.get('wgTitle')=='Project:AutoWikiBrowser/Script'){
mw.loader.load('/w/index.php?title=User:AfroThundr3007730/JWB-diff.css&action=raw&ctype=text/css','text/css')};
Perhaps it would be beneficial to add the styles directly to User:Joeytje50/JWB.css to save others the trouble in the future? — AfroThundr (u · t · c) 07:09, 24 September 2018 (UTC)
- @AfroThundr3007730: Thanks for the heads-up. I've copied the css to a subpage of JWB.css (User:Joeytje50/JWB.css/diff.css). It should all work now. It used to be that the diff styles were loaded by default, but apparently (perhaps in a newer version of MW) those styles don't load anymore. Possibly to save data or something, not loading diff styles when the
?action=
isn't diff. Joeytje50 (talk) 12:14, 3 October 2018 (UTC)
Script broken due to "view" restriction
Hello! I'd like to let you know that the latest revisions to load.js from October 3 have broken the script due to not allowing it to load when viewing the page, which reading the edit summary I believe it's the opposite behavior of what was intended. I guess you meant to put a non equal here?
mw.config.get('wgAction') == 'view'
Manuel de la Fuente (talk) 14:59, 5 October 2018 (UTC)
- @Manuel de la Fuente: I've temporarily removed the restriction, but it should work as intended now. As long as you're not editing the page or anything, it should load as normal. The default action for a page is view, so whenever you load the page, it should all work as normal. On which wiki is this breaking anything for you?Joeytje50 (talk) 15:21, 10 October 2018 (UTC)
- @Joeytje50: Hmm, that seems to be the case; however, the script is fixed now, so if it wasn't this edit which broke it then I assume it was something with JWB.js? I'm using it on a bot account on Wikia if that helps.--Manuel de la Fuente (talk) 20:35, 10 October 2018 (UTC)
Confusion - help needed
Hello Joeytje50, I'd like to run the JavaScript Wiki Browser script on a(n external) wiki, because it looks like a very useful tool for semi-automating some minor edits. For technical reasons related to login, which goes via cookie instead of real login on that wiki, I cannot use AWB there. I don't however understand the instruction at the JWB page:
"After installing the script, simply go to this page to run the script. For users using the script on another wiki, simply go to the page Project:AutoWikiBrowser/Script on the wiki you'd like to start the script on, and have installed the above code on."
The page Wikipedia:AutoWikiBrowser/Script doesn't exist. Thanks!
Danapit (talk) 07:46, 26 October 2018 (UTC)
- Danapit Apologies For not responding for a year. I've not checked my account regularly, but I hope you've figured it out now. If not, there is no issue in that page not existing. Simply go to the url of the page (https://en.wikipedia.org/wiki/Project:AutoWikiBrowser/Script) and it will run the script. I've made this the way to start the script so that you can have a hotlink to the JWB script. So, even if you install the script on another wiki, simply going to the Project:AutoWikiBrowser/Script page on that wiki will work to start the script. I hope this helps. Joeytje50 (talk) 22:11, 9 October 2019 (UTC)
- Joeytje50, thank you for your answer :) I found another solution back then. Danapit (talk) 13:31, 22 October 2019 (UTC)
User scripts Newsletter - Invitation
Hi. Recently, I discovered a passion for created and understanding user scripts on wikipedia, and am planning to create a monthly newsletter about new scripts and related projects (created by anyone, not for simply promoting my own), as well as currently pending user script requests, Wikipedia-related JavaScript tips/tricks, and other related information. This message was sent to you because you are listed as a member of the user script developers category. If you would like to subscribe to this upcoming newsletter, please go to User:DannyS712/subscribe to scripts and add yourself. If you have any questions, please reach out and talk to me。 --DannyS712 (talk) 05:22, 23 December 2018 (UTC)
Some baklava for you!
JWB really helped me clear up a little mess I had made at our local wiki. Enjoy some baklava. Klein Muçi (talk) 07:46, 10 March 2019 (UTC) |
Enabling RegEx Typo Fixing Javascript Wiki Browser in Galician Wikipedia
Hi Joeytje50, I was testing Javascript Wiki Browser at Galician Wikipedia and it works very fine, but I have a problem. I checked "Enabling RegEx Typo Fixing" option but it seems that doesn't works. It could be because the RegEx page linked is the english page, this, but at Galician wiki we have another typos page, that. Could you review that and fix it? Thanks in advance, Elisardojm (talk) 12:18, 30 May 2019 (UTC)
- Hi Elisardojm, and apologies for the late reply. I have tried testing the RETF on another wiki, where the list on Project:AutoWikiBrowser/Typos does seem to load just fine. I have made a modification to the code that may be a solution to make the typo fixing work on your wiki now. Please let me know if this did not work. Joeytje50 (talk) 23:01, 9 October 2019 (UTC)
- Thanks you very much! It works now! Only a little fix, if it's possible: the tool shows a link to the list of RegEx Typos, the problem at gl.wiki is that it's linking to en.wiki list. Could be linked to gl.wiki list at https://gl.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Typos? It's the same page than en.wiki, but it's in gl.wiki... :) Bye, --Elisardojm (talk) 09:34, 10 October 2019 (UTC)
- @Elisardojm: Thanks for mentioning that; I've fixed that now, so it should now link to the right place.Joeytje50 (talk) 20:48, 11 October 2019 (UTC)
- Thank you very much! :) Bye, --Elisardojm (talk) 23:16, 11 October 2019 (UTC)
- @Elisardojm: Thanks for mentioning that; I've fixed that now, so it should now link to the right place.Joeytje50 (talk) 20:48, 11 October 2019 (UTC)
- Thanks you very much! It works now! Only a little fix, if it's possible: the tool shows a link to the list of RegEx Typos, the problem at gl.wiki is that it's linking to en.wiki list. Could be linked to gl.wiki list at https://gl.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Typos? It's the same page than en.wiki, but it's in gl.wiki... :) Bye, --Elisardojm (talk) 09:34, 10 October 2019 (UTC)
Quotation marks
There is currently a discussion at Wikipedia:Administrators' noticeboard/Incidents regarding an issue with which you may have been involved. — Maile (talk) 11:11, 21 June 2019 (UTC)
- Hi Maile66, I'm not currently a very active editor here, and I rarely take the time to check my talk page due to other factors. I just now read the messages at the noticeboard, to which I'd like to reply that this is in no way caused by my script. The script simply did what the controlling user told it to do. I've tried running my script on replacing
‘|’
, ie. the opening or closing single-quote mark, which did not get a single match on the page ʻOkina. In other words, the controlling user must have created a find&replace rule that would replace the ʻOkina to a single quote mark'
, and then the script simply obliged (as programs typically do). - I can't change my script to prevent this from happening in the future when people would attempt to do a similar thing, since the script is just a simple 'frame' around a RegEx Find&Replace box. Just like WP:AutoWikiBrowser has the exact same capabilities. I have written my script in such a way that only users on the AWB CheckPage are able to use it, which means those users must have undergone the procedure to have the right to use AWB first. So, the user that performed this erroneous replacement action must have been granted rights to perform this by people far more informed about enwiki than me.
- I am now only replying to this because of the suggestion to shut off my script until it is 'fixed' by me. I hope you understand that there is no way for me to fix this. I'm not sure if the archival of this issue on the noticeboard means that this is already the conclusion you guys have made, or if it means it's on some to-do list somewhere, but if it's the latter I hope I convinced you that's not necessary. If you do have some more questions about the script I'd be happy to answer them though. I'll try to reply to them a bit more quickly this time ;) Joeytje50 (talk) 22:44, 9 October 2019 (UTC)
You've got mail
It may take a few minutes from the time the email is sent for it to show up in your inbox. You can {{You've got mail}} or {{ygm}} template. at any time by removing the
Thanks! Joe Sutherland (WMF) (talk) 00:46, 20 November 2019 (UTC)
Contributing
Hi. How can I contribute to JWB.js? Its an amazing script, but I have a few suggestions (based on Special:Permalink/927131247):
- Using
mw.Api()
in some places would simplify things - Avoid using keywords like
JWB.api.delete
,JWB.setup.delete
- Line 874 can be combined into 877, since the variable isn't needed
- Line 964 is redundant to the existing value of
''
- Line 1089 can be replaced with a default parameter in the function definition
- Lines 1294 and 1542: the maximum edit summary is now 500, not 250
- Lines 1370-1379: non-admins (either normal users or just page movers) should be able to move pages
- Lines 1380-1397: extended-confirmed and template-protection should be options
Just some thoughts. Let me know if I can contribute. Thanks, --DannyS712 (talk) 13:54, 1 December 2019 (UTC)
- @DannyS712: Thanks very much for the feedback! I've implemented the feedback except for the first and last two points:
- The mw.Api() function has been a consideration, I believe, but I'm not really sure off the top of my head why I didn't change from ajax to that yet.
- Regarding the ability to move, I decided to implement the same as WP:AWB has, and that (at least at the time of making this script initially) did not allow regular users to use AWB to move pages. If this has changed, I'd gladly enable this in my script as well. Otherwise, I'm a bit reluctant to ease this up, because page moves are able to do much more damage than simple edits. I'm not sure if there is any reference (such as a WMF bot guideline or something) I can use to verify whether easing this restriction up is a good idea, but if you know of any, I'd love to hear.
- Regarding the protection options: I can't really find a clear list of protection options. If I simply add '
extended-confirmed
' and 'template-protection
' to the protection-level dropdown, would that work? And is that something that only works on enwp, or any Wikipedia site, or any MediaWiki in general? - Again, thanks very much for the suggestions! I'm not sure what the best way would be to contribute to the script. I could perhaps host the code on Github, where people could then pull request? There probably isn't any automated way to integrate a git repo to wiki pages or anything, but at least I could then manually update that git repo anytime I make any new edits to the script, and update the script whenever someone makes a useful contribution. If that sounds like a good idea, or if you have any other suggestions, please let me know. Joeytje50 (talk) 21:26, 5 May 2020 (UTC)
- @Joeytje50: makes sense re moving, not sure for protection. I completely understand the difficulties with contributions - see also phab:T71445. Maybe I should fork the script, apply the mw.Api changes, test that it works, and then you copy my version? Also, you may want to clean up after the google analytics was removed in Special:Diff/951504191 by Reedy DannyS712 (talk) 21:33, 5 May 2020 (UTC)
- @DannyS712: Forking and then sending me your modified code also sounds like a good idea, but I think that also works better with a git repo underneath it. If you want, you can make a fork from the repo I've made at Github, and make a pull request there as well. That way, I can refer to a merge commit on Github whenever I apply your changes, and include the full attribution to you.
- That phabricator link looks interesting. If there are ever any updates about a possibility to link git repos with Wikipedia files, please do let me know! Also, thanks for mentioning the Analytics thing; the i18n contained a few unnecessary messages which I cleaned up.Joeytje50 (talk) 16:20, 6 May 2020 (UTC)
- Hi, you could consider hosting the git repo as part of wikimedia-gadgets organisation to possibly get more contributors (and maybe so that development can continue even if you become inactive). I will send you an invitation if you wish; let me know.
If there are ever any updates about a possibility to link git repos with Wikipedia files
there do exist deploy scripts such as the one used in XFDcloser. You can also write a github action to automatically trigger such a script to run every time you push or merge commits to master branch. – SD0001 (talk) 15:49, 18 February 2021 (UTC)- @SD0001: I'd love to have JWB included under the wikimedia-gadgets organization, so you're more than welcome to send me that invitation! Regarding the deploy scripts/actions, I'll be looking into those some time later, thanks for mentioning them! Right now my workflow is to make edits on the wiki first (in a dev version of JWB on a separate userpage) and then copying them over to github after that, but I guess it shouldn't be too hard to write a deploy script similar to XFDcloser's, which does the deploy the other way around then. Joeytje50 (talk) 21:52, 18 February 2021 (UTC)
- Invitation sent. You can transfer the repo from the settings. Yeah pushing to github first has been the general approach for some reason – it's especially more convenient for multi-file scripts, and if you're using localhost import for development. – SD0001 (talk) 19:46, 21 February 2021 (UTC)
- Interesting new development: see Wikipedia:Bots/Requests for approval/DeltaQuadBot 9. – SD0001 (talk) 14:44, 25 February 2021 (UTC)
- @SD0001: I'd love to have JWB included under the wikimedia-gadgets organization, so you're more than welcome to send me that invitation! Regarding the deploy scripts/actions, I'll be looking into those some time later, thanks for mentioning them! Right now my workflow is to make edits on the wiki first (in a dev version of JWB on a separate userpage) and then copying them over to github after that, but I guess it shouldn't be too hard to write a deploy script similar to XFDcloser's, which does the deploy the other way around then. Joeytje50 (talk) 21:52, 18 February 2021 (UTC)
- Hi, you could consider hosting the git repo as part of wikimedia-gadgets organisation to possibly get more contributors (and maybe so that development can continue even if you become inactive). I will send you an invitation if you wish; let me know.
- @Joeytje50: makes sense re moving, not sure for protection. I completely understand the difficulties with contributions - see also phab:T71445. Maybe I should fork the script, apply the mw.Api changes, test that it works, and then you copy my version? Also, you may want to clean up after the google analytics was removed in Special:Diff/951504191 by Reedy DannyS712 (talk) 21:33, 5 May 2020 (UTC)
Analytics
Hi, I imported your tool to he:WP:JWB but I get errors on console around google analytics. The tool itself works great (had to add some lines to deal with the RTL orientation). This is the error I get: Refused to load the script 'https://www.googletagmanager.com/gtag/js?id=UA-149754182-1&_=1582129646150' because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self' meta.wikimedia.org *.wikimedia.org *.wikipedia.org *.wikinews.org *.wiktionary.org *.wikibooks.org *.wikiversity.org *.wikisource.org wikisource.org *.wikiquote.org *.wikidata.org *.wikivoyage.org *.mediawiki.org 'unsafe-inline'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
. Thanks Uziel302 (talk) 16:32, 19 February 2020 (UTC)
A barnstar for you!
The Technical Barnstar | |
JWB is a great piece of software and has allowed me to make a bot on my mac without needing to know anything more than Regex. Thank you for this tool! DemonDays64 (talk) 04:49, 21 March 2020 (UTC) |
Question reg. Wp:JWB
Hello!
I have a question. If you have a parenthesis in the box after Replace:
you can use whatever is inside by writing /$1/
in the With:
box. If you open up more replace fields, can you then use the same paranthesis somehow?Jonteemil (talk) 16:19, 14 August 2020 (UTC)
- Hi @Jonteemil:, thanks for your message. I'm assuming the question you're asking about replacing text with regular expressions. If you don't check the checkbox next to "Regular Expression", such parentheses will not work (or at least: parentheses won't have the same functionality). So, to answer your question, to have the same functionality of accessing things in parentheses with $1, you need to check the checkbox next to "Regular Expression" when using more replace fields. I hope this helps you along! Joeytje50 (talk) 12:44, 16 September 2020 (UTC)
Recent JWB changes
Hi. Would you be willing to add a description of the recent changes to JWB to Wikipedia:Scripts++/Next so that they can be included in the next issue? I can try to figure it out based on the code changes, but it would probably be easier if you wrote the explanation yourself if you have time. Thanks, --DannyS712 (talk) 16:49, 17 February 2021 (UTC)
- Also, I went to try the newest version and found my settings moved automatically, but the content model is still javascript even though the title is .json, which is confusing - I would suggest not moving stuff automatically DannyS712 (talk) 16:53, 17 February 2021 (UTC)
- Hi, is it okay if I just give you a list of changes made to the script, so you can convert that list to the proper format? I'm not familiar with the writing style of this newsletter, so I think that would probably be the best way to keep the style yours, but still include all relevant information.
- Regarding the automatic move, I decided to do that because at this point due to the earlier versions (both 2.x to 3.x and this 3.x to 4.x change) all having a different settings page being used, as well as a fallback for wikia/fandom existing because of their restrictions to editing javascript subpages (making those sites use .css pages instead). With the change to .json pages, all of these 'competing' subpages can be moved into a standardized place. Preserving backwards compatibility required me supporting five different possible pages (AWB-settings.js, AWB-settings.css, JWB-settings.js, JWB-settings.css, and finally JWB-settings.json), and that makes it much harder for me to keep track of which pages are being used. To resolve that, simply enforcing consistency among all different settings pages makes by far the most sense to me. I was not aware of the content model needing a change, but I'll implement a fix for that so the content model gets changed to json automatically along with the move for future instances of a first startup, as well as fixing the content model for settings pages that have already been moved. Joeytje50 (talk) 20:30, 18 February 2021 (UTC)
- @DannyS712: Ah, I get what the issue with that is... it being an admin-only action, and I don't think performing an admin-only action automatically (without the user's input) is a good idea at all. The only reason I do think the pagemove is appropriate is because the only page that's edited automatically is the settings page that is literally only relevant to the tool that's being used. In this very specific case I think it's justified to perform this action automatically.
- I'm not sure what would be the best strategy then; asking users nicely to have them move the settings page seems like a bad idea, since 95% of people don't change the default settings. So that way I'd be supporting the deprecated settings pages for the rest of eternity. However, I do believe page histories are a beautiful thing, so simply 'copy/paste moving' the settings pages also seems like a bad idea, even though that would 'fix' the content model issue. I guess for now I'll change the popup message informing users about this, and asking them to request the content-model update by an admin. Joeytje50 (talk) 20:47, 18 February 2021 (UTC)
- Thanks for the explanation, and just a list of changes made (either here or dumping them in the draft of the next Scripts++ issue) is fine. Please ping me with the list DannyS712 (talk) 21:37, 18 February 2021 (UTC)
- @DannyS712: I've created a changelog page with a list of changes. I'll be maintaining this list from now on, whenever there are significant enough changes (typically, at least a minor version bump) to the script. If there's something you'd need other than that list, please do let me know! Joeytje50 (talk) 21:43, 18 February 2021 (UTC)
- Thanks. Would you mind adding what those "minor bug fixes" are? Anything user-facing? DannyS712 (talk) 21:46, 18 February 2021 (UTC)
- @DannyS712: The minor bug fixes are all fairly inconsequential changes, even though they were bugs in the tool before getting fixed with these changes. Examples of this are not all intervals getting properly cleared, or a message not getting displayed properly, or a change to storing pagelists which made it possible for saving to the wiki to fail in some circumstances ever since 1.24's token system change. These are not bigs that would have occurred all too commonly, so there's a good chance people haven't been aware of this. I don't think it's really necessary to elaborate on such minor changes in a newsletter (although I'll leave that up to you). Joeytje50 (talk) 16:38, 20 February 2021 (UTC)
- Thanks. Would you mind adding what those "minor bug fixes" are? Anything user-facing? DannyS712 (talk) 21:46, 18 February 2021 (UTC)
- @DannyS712: I've created a changelog page with a list of changes. I'll be maintaining this list from now on, whenever there are significant enough changes (typically, at least a minor version bump) to the script. If there's something you'd need other than that list, please do let me know! Joeytje50 (talk) 21:43, 18 February 2021 (UTC)
- Thanks for the explanation, and just a list of changes made (either here or dumping them in the draft of the next Scripts++ issue) is fine. Please ping me with the list DannyS712 (talk) 21:37, 18 February 2021 (UTC)
Removing
Hello. Thank you for JWB, it's been a great help for me as a Mac user. I've been trying to figure this out for some time, but how can I remove text? I've tried keeping the Replace With box empty, but that just adds a space. Is this even a feature? Cheers. — CuriousGolden (T·C) 19:22, 26 March 2021 (UTC)
- @CuriousGolden: I'm not sure what exactly is going wrong, but you should be able to remove text by entering the text you want to remove in the
Replace:
field, and making sure theWith:
field is empty. If you are using regular expressions, have the respective checkbox checked, and otherwise keep it off. That should work just fine. If you want, I can have a look at what is going wrong. Just make sure to set up JWB in a way that does not work properly, and press 'Save to wiki' in the 'Setup' tab. Then link me to the userpage (on the relevant wiki) of the account this is going wrong for. That way I can have a look at the JWB settings and what might be the issue. Let me know if you need any help with this! Joeytje50 (talk) 08:04, 28 March 2021 (UTC)- Basically, I'm trying to remove parameters from an infobox, but JWB instead replaces the things I want to remove with a space, thus creating something like this:
- |name = Example
|country= Germany
|website= - You can find the setup here. Cheers. — CuriousGolden (T·C) 08:22, 28 March 2021 (UTC)
- Ah, then you need to also include the 'newline' character to not only remove the text on that line, but also the 'enter' at the end. You can do that by including
\n
either at the start or at the end of the line you would like to remove. The\n
character can be inserted anywhere in your 'Replace' box. For more info about replacing, check out User:Joeytje50/JWB#Replacements. Joeytje50 (talk) 08:40, 28 March 2021 (UTC)- I have tried \n character before but all it does is create more empty lines (creates 2 empty lines instead of one). I've taken a screenshot of it here. — CuriousGolden (T·C) 08:45, 28 March 2021 (UTC)
- @CuriousGolden: My guess is that you're putting the
\n
in the wrong place. If you put it at the end of the Replace box, it should work. From this result, it looks like you're putting it in the With box. If you want to remove something, the Replace box should match the text you want to remove, including any newline characters and the like, and With should be completely empty (or it should contain what you want to replace it with). If this is not the issue, please save your settings like you did before and let me see what rules are generating this issue you show in your screenshot. A picture may be worth a thousand words, but updated JWB settings are worth a hundred pictures ;) Joeytje50 (talk) 11:51, 28 March 2021 (UTC)
- @CuriousGolden: My guess is that you're putting the
- I have tried \n character before but all it does is create more empty lines (creates 2 empty lines instead of one). I've taken a screenshot of it here. — CuriousGolden (T·C) 08:45, 28 March 2021 (UTC)
- Ah, then you need to also include the 'newline' character to not only remove the text on that line, but also the 'enter' at the end. You can do that by including
- Basically, I'm trying to remove parameters from an infobox, but JWB instead replaces the things I want to remove with a space, thus creating something like this:
New message from Qwerfjkl
Message added 19:57, 14 July 2021 (UTC). You can remove this notice at any time by removing the {{Talkback}} or {{Tb}} template.
―Qwerfjkltalk 19:57, 14 July 2021 (UTC)
JWB update is requested
Hello Joeytje50, please see User talk:Joeytje50/JWB for a request. Thank you, — xaosflux Talk 18:03, 24 July 2021 (UTC)
A barnstar for you!
The Brilliant Idea Barnstar | |
Thanks for the bot creation thingy. Really appreciate it. Peartree42 (talk) 01:36, 1 January 2022 (UTC) |
RETF in Santali Wikipedia
Hi @Joeytje50 , I was testing this tool in Santali Wikipedia. But this tool is not working as expected, this is the typo list . I have used Regex of AutoWikiBrowser and it fixed this page AWB revision. But the same page was not fixed using RETF. Can you guide me how to fix this. Thanks Rocky 734 (talk) 03:58, 7 May 2022 (UTC)
JWB GitHub repo
Hey Joey. Thanks for creating and maintaining JWB. I think Andrybak has some questions when you get a chance. The thread is at User talk:Joeytje50/JWB#Contributing: PRs on GitHub or edit requests on Wikipedia?. Thank you. –Novem Linguae (talk) 21:14, 10 October 2023 (UTC)
Question about JWB RegEx
Hello! I hope you are having a great day! I have a small question for you. I often add IPA link
templates to IPA phonological tables (something like [8] or [9]). These edits are horribly tedious, and one of the reasons that I requested AWB (and got it) was to make this tedious process faster. (BTW, I use JWB simply because I don't have a Windows computer, but it is awesome! Keep up the great work!)
However, when trying to replace any {{IPA|
with {{IPA link|
, IPA
templates outside the phonological tables also get converted into IPA link
templates. Since I am not at all good at regular expressions or coding, I'd like your help (if you can give it of course) to make a regular expression, that I could put in JWB's RegEx section, that only affects IPA
templates in tables.
Thanks for any help you can give. PharyngealImplosive7 (talk) 17:37, 6 January 2024 (UTC)
- Unfortunately, there are only a few ways for regular expressions to affect text within a given context, and most of them require either JavaScript, or a lot of repeated regular expressions. This is because it is a regular language, which has its limitations. The way ignoring certain unparsed contexts is handled is by using JavaScript to apply the regex only within the given context. As far as I can figure out, the only way to make this work is by using some 'dirty trickery'.
- The simplest way to solve this is to assume a certain format for the tables. Based on the two links you've provided, the IPA tables all seem to have a fairly consistent format of a line starting with exactly
| {{IPA|
. If it is safe to assume all IPA tables always start with the IPA template on a new line, simply changing your regex replace to: Replace\|\s*{{IPA\|
With| {{IPA link|
. (I've included\s*
in the replace rule, to allow for an arbitrary amount of whitespace at the start of a table cell's contents). - If this is not restrictive enough, or too restrictive, you will need some 'dirtier' trickery. For example, this may be needed if there are situations where some multi-line template contains the IPA template, which should remain untouched; or if there are situations where an IPA template uses a format of
| {{IPA|x}} || {{IPA|y}} || {{IPA|z}}
. In that case, I would do the following: - First, I will assume that any table that contains the template
{{IPA|
is automatically an IPA table. I could not find a very clear distinction between normal tables and IPA tables otherwise (such as some class{| class="wikitable IPAtable"
or something like that, to distinguish IPA tables). Then, you would need to simply have a LOT of duplicate regular expressions that basically ensures all occurrences of the template have been replaced. This can be done by including about 100 of the rule Replace{\|([\w\W]*?){{IPA\|([\w\W]*?)\|}
With{|$1{{IPA link|$2|}
(demo), or rather more cleanly (using lookaheads), Replace{\|((?!\|})([\w\W]{2})*?){{IPA\|
With{|$1{{IPA link|
(demo). Performing this find/replace rule 100 times will replace 100 occurrences. However, this can be made a bit more efficient, by making your first rule replace 15 occurrences, the second rule replace 14 occurrences, etc etc... Do note that you can't have all of your replacement rules replace 15 occurrences each, because then it would not replace all occurrences if there aren't a multiple of 15 templates on the page. - I've tested this in the sandbox, and it seems to work correctly. If you want to copy this setup, you can go to Special:MyPage/JWB-settings.json and make the exact same addition as I did in this edit. That would allow you to import those same replacement rules. If you want to change this strategy to the cleaner lookahead-based strategy, you could modify the replacement rules to work in the same way as my single-replacement demo. Keep in mind that the lookahead introduces a second capturing group per replacement, so the With should then insert
$3
where it had$2
,$5
where it had$3
, etc etc. (skipping every even number). If you need any further help, let me know. Joeytje50 (talk) 11:11, 29 January 2024 (UTC)- Thank you so much for the detailed answer! I won't have to do so much work manually anymore! – PharyngealImplosive7 (talk) 14:38, 29 January 2024 (UTC)