Welcome to the Technical Assistance reading room. Get assistance on questions related to MediaWiki markup, CSS, JavaScript, and such as they relate to Wikibooks. This is not a general-purpose technical support room.
To submit a bug notice or feature request for the MediaWiki software, visit Phabricator.
To get more information about the MediaWiki software, or to download your own copy, visit MediaWiki
Hi @SillySarah321! It looks like someone else queried it, which does not necessarily mean it's flagged for deletion. I took a look at it, and it seems like you have an outline you're working on, which makes it a book under construction. If you don't end up building it out, it may be considered abandoned and then deleted, but it's fine for now. If you would like it to be moved to your sandbox so you can take your time fleshing it out, we can do that as well. Cheers! —Kittycataclysm (discuss • contribs) 13:17, 22 November 2024 (UTC)Reply
This fixes two bugs: (a) a bug where whenever the DOM was reloaded (e.g. when you press the "Reload" button in the live preview), the link would be duplicated, and (b) the link appears on nonexistent pages, causing an error. JJPMaster (she/they) 21:45, 20 December 2024 (UTC)Reply
@Leaderboard: While trying to use the updated version, I noticed another problem (an outdated CSS class name was being used), so I made a series of changes here to resolve it (and I also partially reversed the above change due to a problem involving what happens if the content of the page changes). I would like to request that that be made the content of MediaWiki:Gadget-collectionparser.js. JJPMaster (she/they) 04:35, 21 December 2024 (UTC)Reply
@Leaderboard: Also, please change the collectionParserPortletLink declaration to var collectionParserPortletLink = mw.config.get('wgArticleId') > 0 ? mw.util.addPortletLink ('p-personal', '#', 'Get collection', 'pediapress') : null;to avoid the creation of a nonfunctional link on nonexistent pages. JJPMaster (she/they) 00:49, 22 December 2024 (UTC)Reply
There is currently a gadget that is supposed to provide a link on user talk pages to instantly welcome any user, or warn them with {{Test1}}. However, this gadget does not work. So, I made a replacement: OneClickWelcomer. This allows you to welcome any user with one click (hence the name), and also warn anyone, and it differs from the gadget because you can warn them with {{Test1}}, {{Test2}}, or{{Test3}}, and because the links also appear on user pages, user contribution pages, Special:RecentChanges, Special:NewPages, and page histories. I propose that the nonfunctional gadget be removed and replaced with my replacement. JJPMaster (she/they) 18:22, 8 December 2024 (UTC)Reply
@Leaderboard: Thank you! Although, I would like to make three requests already. Firstly, on MediaWiki:Gadgets-definition, please move it from "broken-gadgets" to "edit-gadgets". Secondly, change the description to this:
@Leaderboard: Oh, sorry about that, I thought that I had already created a documentation page for that script. I will redirect it to the JavaScript file until I am done with having done that. JJPMaster (she/they) 06:32, 14 December 2024 (UTC)Reply
@Leaderboard: I suggested to add it to the TB because it seems like that's why that title isn't allowed on enwiki. However, a filter may be better if you want to allow certain groups of users to create pages with those kinds of titles anyway. JJPMaster (she/they) 15:13, 10 December 2024 (UTC)Reply
@Leaderboard The link [[Basic Multilingual Plane]] is a red link, because there isn't a page on Wikibooks with that title. There is a page on Wikipedia with that title, which explains what the Basic Multilingual Plane is, so let's replace that link with [[w:Basic Multilingual Plane]]. TTWIDEE (discuss • contribs) 18:54, 17 December 2024 (UTC)Reply
Also, the text "Expand me!" in the example above has CSS class "title", which makes the text appear in dark gray on a dark background due to the rule .collapsible.title{color:#4D4D4D;} in MediaWiki:Common.css/Nav.css. This rule should probably be replaced by something like .collapsible.title{color:var(--color-subtle,#4D4D4D);} (inspired by this recommendation). Dexxor (discuss • contribs) 15:53, 11 December 2024 (UTC)Reply
@Leaderboard: I think there are three possible alternatives here:
Store the data on an external site - I believe this would be very inefficient, and probably also insecure
Store the data in another non-MediaWiki namespace - There would need to be some measure taken to prevent anyone other than my bot from editing the page, otherwise it would be insecure
Store the data alongside the gadget in the MediaWiki namespace - This would probably be the most secure, but would require my bot, and thus me, to have interface admin privileges, unless you or JackPotte maintained it instead.
@Leaderboard: This gadget just strikes through the usernames of blocked users. It does not actually block anybody. I have extensively used this gadget despite not being an administrator on enwiki. JJPMaster (she/they) 02:33, 18 December 2024 (UTC)Reply
I would like to propose the following changes on recent changes in dark mode:
Tag has too low contrast in dark mode, so a change of background to rgba(255,51,51,0.25) would improve contrast.
Revision size colors (+0-500 bytes, -0-500 bytes, lower than -500 bytes) are too dark in DM. Remove CSS that causes this problem, to revert to default CSS.
The current mechanism that {{Script doc auto}} uses is (a) needlessly complicated, (b) out of date, and (c) doesn't account for common.js files, since it says that "Documentation for this script can be added at User:JJPMaster/common." Please replace its contents with those of {{Script doc auto/sandbox}}, which uses a more updated Lua implementation, and works with common.js. JJPMaster (she/they) 23:33, 21 December 2024 (UTC)Reply
@JJPMaster I tried to make the fix, but that results in errors with the documentation page. As a result, I've temporarily reduced the protection level of this page so that you can fix it yourself - once that's done, let me know and I'll put it back. Leaderboard (discuss • contribs) 12:10, 22 December 2024 (UTC)Reply
Latest comment: 1 month ago2 comments2 people in discussion
This gadget appears to use an unusual and out-of-date importation of MediaWiki:Gadget-langcode2name.js to get the names of the languages, when a more simple means, used by Wiktionary (after they stopped using the old method), just gets the "title" property from the interwiki link itself, requiring no updating. Either import the Wiktionary gadget directly in MediaWiki:Gadget-sidebartranslate.js, or replace its content with the following:
// Copied from Wiktionary, see [[wikt:MediaWiki:Gadget-WiktSidebarTranslation.js]]$(function(){$("#p-lang .interlanguage-link a").each(function(){varlangnameMatch=$(this).attr("title").match(/(.*) – (.*)/);varlangname=$(this).attr("title");// Some Wikibooks have '' as their main pageif(langnameMatch&&langnameMatch.length>=3)langname=langnameMatch[2];$(this).text(langname).attr("lang","en");// This line breaks compact languages});$("#p-lang .interlanguage-link").sort(function(lia,lib){return$(lia).children().first().text()<$(lib).children().first().text()?-1:1;}).appendTo("#p-lang>div>ul");});
Latest comment: 1 month ago1 comment1 person in discussion
(Note: This is not a request for assistance (although there is a related request on WB:RR/AA), it is simply something that people who are interested in the technical side of Wikibooks should be aware of)
WikiProject Little Star has begun a new project called Luna. The aim of this project is to develop alternatives to the new page reviewing modules that Twinkle provides on Wikipedia. So far, three modules have been re-implemented: Tag, CSD (both of those are part of User:JJPMaster/CurateThisPage.js), and XfD (as User:JJPMaster/rfd.js). As new modules are implemented, they will be added to User:JJPMaster/luna.js, which is the "one-stop shop" for every script that will be a part of Luna. If you want, you can test it out by adding it to your common.js file (importScript("User:JJPMaster/luna.js");), and let me know if there are any problems. Thank you! JJPMaster (she/they) 05:14, 23 December 2024 (UTC)Reply
Latest comment: 1 month ago5 comments2 people in discussion
I would like to ask that MediaWiki:Sp-contributions-footer to be replaced with User:JJPMaster/MediaWiki:Sp-contributions-footer. This updates several dead links to use XTools instead of older, deprecated Toolforge tools, switches the list format from using dot Unicode characters to the {{hlist}} template, and adds an edit summary usage tab. However, it does also remove the "Files uploaded" tab, which used to link to an external tool (before it was deleted) showing one's uploads to Commons, not Wikibooks. If you think this tab is still needed for some reason, I could add an updated version before re-requesting. JJPMaster (she/they) 05:23, 23 December 2024 (UTC)Reply
Latest comment: 1 month ago1 comment1 person in discussion
My Christmas gift to the English Wikibooks is Luna, which I explained here. I am pleased to say that the tool has officially reached beta, and I would like to ask for anyone who is able and willing to test it out, following the instructions here. Feel free to post any bug reports and/or feature requests either on the talk page of WB:LUNA, or my user talk page (User talk:JJPMaster). Thank you! JJPMaster (she/they) 04:33, 26 December 2024 (UTC)Reply
Latest comment: 1 month ago2 comments2 people in discussion
Please change bookCatAJAX === undefined on line 44 to typeof bookCatAJAX == "undefined", since it currently throws a ReferenceError. Additionally, please remove the "(does not work as a gadget" from BookCat, since it appears that it does work now. Courtesy ping: Leaderboard. JJPMaster (she/they) 20:33, 27 December 2024 (UTC)Reply
Latest comment: 1 month ago6 comments2 people in discussion
The current markblocked gadget's code is not great, so I gave it the TNT treatment. This test found that partial blocks display exactly the same as regular blocks, and when I decided to go into the source code to attempt a fix, I noticed that nearly every line has a warning. The gadget was originally imported from Meta before partial blocks were a thing, so I took the code from a more updated Meta version and modified the style a bit. Thus, please replace MediaWiki:Gadget-markblocked.js with User:JJPMaster/markblocked.js. Courtesy ping: Leaderboard. JJPMaster (she/they) 04:21, 28 December 2024 (UTC)Reply
constshowLink=mw.config.get("wgArticleId")>0&&!mw.config.get("wgIsMainPage")&&(mw.config.get('wgNamespaceNumber')==0||mw.config.get('wgNamespaceNumber')==102||mw.config.get('wgNamespaceNumber')==110);varcollectionParserPortletLink=showLink?mw.util.addPortletLink('p-personal','#','Get collection','pediapress'):null;// add a link at the right upper cornerfunctionaddPediapressLinks($content){if(showLink){$(collectionParserPortletLink).click(function(){getCollection($content);});}}
Latest comment: 1 month ago7 comments2 people in discussion
The box that allows you to leave a comment while accepting or rejecting a revision with FlaggedRevs is hidden using a "hack" at MediaWiki:Common.css#L-78. Either there should be a good reason for this, in which case the "Comment:" label (label[for="mw-fr-commentbox"]) should also be removed (with display: none; if we don't want screen readers to recognize its existence, or visibility: hidden; otherwise), or it should be unhidden again. JJPMaster (she/they) 23:21, 30 December 2024 (UTC)Reply
@Leaderboard: Currently, the label for the "Comment:" box appears, but the box doesn't (See right). This is not ideal, since the label doesn't actually have a corresponding element in the DOM. JJPMaster (she/they) 03:01, 31 December 2024 (UTC)Reply
@Leaderboard: The fact that WhatLinksHere is technically a special page means that the namespace check doesn't work. Please replace {{#ifeq:{{NAMESPACE}}|Template| with {{#ifeq:{{padleft:|9|$1}}|Template:| accordingly. JJPMaster (she/they) 04:17, 5 January 2025 (UTC)Reply
What links here is one of my wikimedia interests recently, so this thread got my attention. However, as happens to me quite frequently I bumped into something new when I checked template: Infobox.
On the fourth line of the page on the right hand side I see this:
ReadLatest draftEdit sourceView history
instead of the usual
ReadEditEdit source View history
I was under the impression that the second line is the standard for content pages on wikimedia . I was obviously wrong, but as a periodic member of this community, I am curious who at wikibooks can implement such changes, and where can the community see announcement of these types of changes Ottawahitech (discuss • contribs) 16:48, 6 January 2025 (UTC)Reply
Latest comment: 21 days ago6 comments2 people in discussion
Currently, the "Statistics" link in page histories links to the stats of the interface page itself, rather than of the page whose history you are viewing. Thus, in MediaWiki:Histlegend, please change index.php?article=MediaWiki:Histlegend with index.php?article={{FULLPAGENAME}}. JJPMaster (she/they) 16:18, 11 January 2025 (UTC)Reply
Latest comment: 5 days ago1 comment1 person in discussion
The first full month of WikiProject Little Star has come to a close, and we have got a lot of work done! Here's all of the main projects we've worked so far:
JJPMaster (bot) has been summoned to keep a list of everyone's user rights across the English Wikibooks, which allows the markAdmins gadget to run with up-to-date data for the first time in about two years.
This is perhaps the biggest project that WikiProject Little Star has developed. Luna is a collection of user scripts that attempt to help users review new pages and patrol recent changes, similarly to what Twinkle used to do. It includes functionalities such as nominating pages for speedy deletion, making requests at RfD, tagging files for copyright problems, adding maintenance templates to books, removing all links to a particular page, and, most recently, a rollback-like feature. It can be used by all autoconfirmed users, but some features are limited to reviewers or administrators.
That's it for WikiProject Little Star's first newsletter! You can subscribe here if you haven't already. Thank you!