MediaWiki talk:Gadget-citations.js
|
Where to get help
[edit]Tool documentation describes this widget and how to use it.
To report bugs or ask questions about the citation bot that does the work, see its talk page
To report bugs or ask questions about this widget, discuss it on this very page below.
The gadget source code is available.
Because of WP:EDITSUMMARY, when creating new sections, the gadget edit description is added to the subject heading. Please clean up by hand.
Enabling wikEd breaks Wikipedia:Citation expander
[edit]If I have both wikEd and Wikipedia:Citation expander enabled, the Citation expander gadget doesn't work. Disabling wikEd solves this, but then I lose wikEd. Cross-reported at wikEd. Headbomb {t · c · p · b} 05:36, 28 February 2019 (UTC)
- According to The DJ at wikEd, it's because "citation expand doesn't support jQuery.textSelection". Headbomb {t · c · p · b} 05:52, 5 April 2019 (UTC)
Add keyboard shortcut
[edit]In User:Headbomb/citations.js (diff), I have a keyboard shortcut setup for activating citation bot. This functionality should be built in this script, I feel. [Ctrl+Alt+A] will not clash with any other Wikipedia functions or standard shortcuts on Windows/Mac Os/Linux.
Headbomb {t · c · p · b} 18:47, 16 October 2020 (UTC)
![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Replace
mw.util.addPortletLink("p-tb", "//citations.toolforge.org/process_page.php?edit=toolbar&slow=1&page="+escPageName, 'Expand citations', 't-citationbot', "Expand citations and fix common formatting errors");
with
mw.util.addPortletLink("p-tb", "//citations.toolforge.org/process_page.php?edit=toolbar&slow=1&page="+escPageName, 'Expand citations', 't-citationbot', "Expand citations and fix common formatting errors", 'a');
On line #26. This will add the shortcut "Alt+Shift+A" (or something equivalent) to trigger Citation bot. This does not clash with anything else on Wikipedia. Headbomb {t · c · p · b} 05:27, 1 June 2022 (UTC)
- Saying this in my own personal capacity (as in, I'm not acting either way) but I'm unconvinced that this is unlikely to clash with anything. Maybe nothing official, but who knows what else folks have done or used in other scripts? It's not clear to me that folks are clamoring for it this? ~ Amory (u • t • c) 22:53, 4 June 2022 (UTC)
- Not sure I like this - while 'a' doesn't appear to be used right now, it seems like a good candidate for a future mass feature, so I don't think putting it on an opt-in gadget is a good idea. — xaosflux Talk 17:48, 6 June 2022 (UTC)
- How about a placeholder key that can be customized on a per-user basis then? Headbomb {t · c · p · b} 18:40, 6 June 2022 (UTC)
- Based on the addPortletLink source, I think a variable set to null in the gadget source (i.e. simply named) could be added here and then you could define the variable in local js. Amorymeltzer? Izno (talk) 08:37, 10 June 2022 (UTC)
- Sure? But that's generically applicable for anything that adds a link. Likewise, it can also just be added locally anyway, no?
$(document.getElementById('t-citation')).attr('accesskey', 'a').updateTooltipAccessKeys();
~ Amory (u • t • c) 00:13, 11 June 2022 (UTC)- Works for me. Probably works for Headbomb too. Izno (talk) 17:25, 12 June 2022 (UTC)
- Sure? But that's generically applicable for anything that adds a link. Likewise, it can also just be added locally anyway, no?
- Based on the addPortletLink source, I think a variable set to null in the gadget source (i.e. simply named) could be added here and then you could define the variable in local js. Amorymeltzer? Izno (talk) 08:37, 10 June 2022 (UTC)
- How about a placeholder key that can be customized on a per-user basis then? Headbomb {t · c · p · b} 18:40, 6 June 2022 (UTC)
- @Headbomb: not sure if it is coming from some other gadget or script I have, but it seems like my 'a' is already mapped (I don't actually use these, so no clue).
$( '[accesskey=a]' )
<menuitem id="context-copylink" data-l10n-id="main-context-menu-copy-link" oncommand="gContextMenu.copyLink();" accesskey="a" label="Copy Link Location">
- Do you have a different specific code to suggest? — xaosflux Talk 19:05, 6 June 2022 (UTC)
- Looks like that is possibly from the Mozilla enginge. — xaosflux Talk 19:07, 6 June 2022 (UTC)
Not done (need more info) @Headbomb: see above, you mentioned a placeholder code, but need to see your proposed code (that should have already been tested elsewhere). Please provide then reactivate the edit request when ready. — xaosflux Talk 12:39, 10 June 2022 (UTC)
Does it work with Vector (2022) skin?
[edit]I ask because I cannot see it in my sidebar although it is enabled in my preferences Chidgk1 (talk) 06:53, 3 August 2022 (UTC)
![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
- Nope. Something seems to be missing for Vector 2022... But it should be an easy fix. An admin will need to update the gadget first. Specifically, change
if ( $.inArray( mw.config.get( 'skin' ), ['monobook', 'modern', 'vector', 'timeless'] ) !== -1 ) {
to
if ( $.inArray( mw.config.get( 'skin' ), ['monobook', 'modern', 'vector', 'vector-2022', 'timeless'] ) !== -1 ) {
Headbomb {t · c · p · b} 10:30, 3 August 2022 (UTC)
Done, thanks. Writ Keeper ⚇♔ 14:50, 4 August 2022 (UTC)
@Chidgk1: Try it now? Headbomb {t · c · p · b} 16:09, 4 August 2022 (UTC)
When adding Kalki refs via WP:VE, I will use {{cite journal}}, {{cite web}}, {{cite book}} or {{cite news}} since {{cite magazine}} cannot be normally added via VE. Once the edit is saved, the citation should be changed from whatever it is to cite magazine. Kailash29792 (talk) 15:55, 3 February 2023 (UTC)
how add gadget on kannada wiki
[edit]There are too many "date format errors in template". Mostly due to use of kannada numerals or arbitary use of date format in cite & infobox templates. If this can fix issues? I assume this requires some kind of admin rights. If not, how do i activate? రుద్రుడు (talk) 09:42, 15 March 2023 (UTC)
- ✓ added gadget to kannada wiki, date format error is separate issue.~aanzx ✉ © 15:37, 15 March 2023 (UTC)
- The inner-working of the bot are discussed at http://en.wiki.x.io/wiki/User_talk:Citation_bot AManWithNoPlan (talk) 15:47, 15 March 2023 (UTC)
- http://kn.wiki.x.io/w/index.php?title=%E0%B2%AC%E0%B3%86%E0%B2%82%E0%B2%97%E0%B2%B3%E0%B3%82%E0%B2%B0%E0%B3%81&diff=1159684&oldid=1158493 done by copying text to english wikipedia and then copying back. So, the templates seem okay. AManWithNoPlan (talk) 15:51, 15 March 2023 (UTC)
- @AManWithNoPlan @~aanzx just tried on kn:ಇಂದ್ರಪ್ರಸ್ಥ ಮಾಹಿತಿ ತಂತ್ರಜ್ಞಾನ ಇನ್ಸ್ಟಿಟ್ಯೂಟ್ - ದೆಹಲಿ. when i click sidebar: shows "!Could not even get the page. Perhaps non-existent?". citation button [near publush changes] [1] works. i an using vector legacy skin. రుద్రుడు (talk) 16:16, 15 March 2023 (UTC)
- "Could not even get the page" the URL needs to specify the wiki_base=simple parameter in the URL (similar to simple wiki). https://citations.toolforge.org/process_page.php?edit=toolbar&wiki_base=kn&page=%E0%B2%87%E0%B2%82%E0%B2%A6%E0%B3%8D%E0%B2%B0%E0%B2%AA%E0%B3%8D%E0%B2%B0%E0%B2%B8%E0%B3%8D%E0%B2%A5_%E0%B2%AE%E0%B2%BE%E0%B2%B9%E0%B2%BF%E0%B2%A4%E0%B2%BF_%E0%B2%A4%E0%B2%82%E0%B2%A4%E0%B3%8D%E0%B2%B0%E0%B2%9C%E0%B3%8D%E0%B2%9E%E0%B2%BE%E0%B2%A8_%E0%B2%87%E0%B2%A8%E0%B3%8D%E0%B2%B8%E0%B3%8D%E0%B2%9F%E0%B2%BF%E0%B2%9F%E0%B3%8D%E0%B2%AF%E0%B3%82%E0%B2%9F%E0%B3%8D_-_%E0%B2%A6%E0%B3%86%E0%B2%B9%E0%B2%B2%E0%B2%BF AManWithNoPlan (talk) 16:25, 15 March 2023 (UTC)
- Also, the bot does not have an account on KN wiki, so it cannot edit that wiki. AManWithNoPlan (talk) 16:25, 15 March 2023 (UTC)
- "Could not even get the page" the URL needs to specify the wiki_base=simple parameter in the URL (similar to simple wiki). https://citations.toolforge.org/process_page.php?edit=toolbar&wiki_base=kn&page=%E0%B2%87%E0%B2%82%E0%B2%A6%E0%B3%8D%E0%B2%B0%E0%B2%AA%E0%B3%8D%E0%B2%B0%E0%B2%B8%E0%B3%8D%E0%B2%A5_%E0%B2%AE%E0%B2%BE%E0%B2%B9%E0%B2%BF%E0%B2%A4%E0%B2%BF_%E0%B2%A4%E0%B2%82%E0%B2%A4%E0%B3%8D%E0%B2%B0%E0%B2%9C%E0%B3%8D%E0%B2%9E%E0%B2%BE%E0%B2%A8_%E0%B2%87%E0%B2%A8%E0%B3%8D%E0%B2%B8%E0%B3%8D%E0%B2%9F%E0%B2%BF%E0%B2%9F%E0%B3%8D%E0%B2%AF%E0%B3%82%E0%B2%9F%E0%B3%8D_-_%E0%B2%A6%E0%B3%86%E0%B2%B9%E0%B2%B2%E0%B2%BF AManWithNoPlan (talk) 16:25, 15 March 2023 (UTC)
- @AManWithNoPlan @~aanzx just tried on kn:ಇಂದ್ರಪ್ರಸ್ಥ ಮಾಹಿತಿ ತಂತ್ರಜ್ಞಾನ ಇನ್ಸ್ಟಿಟ್ಯೂಟ್ - ದೆಹಲಿ. when i click sidebar: shows "!Could not even get the page. Perhaps non-existent?". citation button [near publush changes] [1] works. i an using vector legacy skin. రుద్రుడు (talk) 16:16, 15 March 2023 (UTC)
- http://kn.wiki.x.io/w/index.php?title=%E0%B2%AC%E0%B3%86%E0%B2%82%E0%B2%97%E0%B2%B3%E0%B3%82%E0%B2%B0%E0%B3%81&diff=1159684&oldid=1158493 done by copying text to english wikipedia and then copying back. So, the templates seem okay. AManWithNoPlan (talk) 15:51, 15 March 2023 (UTC)
replace templates or values if they contain non english numerals
[edit]If possible can you find a way to replace parameters [particularly numbers] which are not in english. Please see my recent discussion. రుద్రుడు (talk) 16:49, 15 March 2023 (UTC)
- This is the wrong page for such discussions. This page is ONLY for the *.js file. All tool/bot related questions should be at http://en.wiki.x.io/wiki/User_talk:Citation_bot AManWithNoPlan (talk) 17:11, 15 March 2023 (UTC)
Not working
[edit]This tool is not working from the edit window for the last few days. Please see. Thanks. - Fylindfotberserk (talk) 10:01, 26 January 2024 (UTC)
Error: citations request failed" box shows up=
[edit]- Status
- new bug
- Reported by
- Alon Alush
- What should happen
- Page shows the bot's changes after it finishes analyzing
- Relevant diffs/links
- "Error: citations request failed" box shows up
- Replication instructions
- . Enable the citations expander gadget in Wikipedia. Press ✔ Citations button on pages. After waiting for a bit, this error box will show up around 85% of the time. See image
=== Alon Alush (talk) ===, March 24
- We can't proceed until
- Feedback from maintainers