MediaWiki talk:Group-sysop.js

message: This MediaWiki page was designed for us to be able to do sysop-only javascript (such as things for deletion/protection pages). Common.js includes this iff you're a member of the sysop group. ^demon[omg plz] 12:45, 8 August 2007 (UTC)
replies: text: I can't believe we have had this all along and have not been using it. I like the first tool, and I hope there is consensus for more such tools in the future. 1 != 2 17:47, 14 October 2007 (UTC)
thread_title:  Note 

message: Very practical this. Minor detail, could the order of boxes be changed? It makes more sense have the order be restore, invert selection, reset. I am not that good at code so I don't want to mess with it.Garion96 (talk) 16:20, 14 October 2007 (UTC)
thread_title: Order

message: It needs to be made very clear to all admins that they can disable the effect of sysop.js - my browser has been crashing for the past week when I delete or undelete pages, and I think the change to this page is the reason why. Neil ☎ 10:04, 19 October 2007 (UTC)
thread_title:  window.disableSysopJS = true 

message: For the past few days I've been receiving javascript errors on the undelete page. Someone pointed me the way of this page. I wrapped the code in a try{} catch(e){} thing and that seems to have stopped the javascript error, at least. But it doesn't fix whatever problem there is in the code itself. Please next time when making changes to js pages, test them in all major browsers (Internet Explorer, Opera, Firefox, Colloquy...) or ask people who have the browsers to do it for you. - Mark 13:54, 25 October 2007 (UTC)
replies: text: Change addEventListener() back to onclick as it was in the first version of the script. addHandler() from http://en.wikipedia.org/skins-1.5/common/wikibits.js  could also be used ∴ AlexSm 14:38, 25 October 2007 (UTC)
thread_title:  Javascript error 

message: While we're debating the inclusion of ^demon's CSD AutoReason script, how about including User:Ilmari Karonen/cleandelsummary.js?  It replaces autogenerated deletion summaries for articles tagged as attack pages with a generic summary that avoids inadvertently recording any of the libelous or offensive content in the deletion log.  —Ilmari Karonen (talk) 02:08, 8 November 2007 (UTC)
replies: text: Since no-one seems to have any objection, I've included the code.  Please let me know if it causes any problems.  (Or just revert if I'm not immediately available to fix it.)  —Ilmari Karonen (talk) 02:02, 25 November 2007 (UTC)

text: Ps. You can test the effect of the script by clearing your cache, going to User:Ilmari Karonen/cleandelsummary-test and clicking the delete tab.  (Please don't actually delete that page, or at least undelete it if you do.)  —Ilmari Karonen (talk) 02:07, 25 November 2007 (UTC)
replies: text: Ooh... I wish it would do that for all db-categories!  — Edokter • Talk •  14:58, 25 November 2007 (UTC)
thread_title:  Avoiding libel in deletion summaries 

message: Please see the above link, as I have requested greater input from the wider community input into discussion on which version of the automated deletion reason tool to use. Ryan Postlethwaite 00:56, 7 January 2008 (UTC)
thread_title:  [[MediaWiki talk:Sysop.js/Admin opinion]] 

message: I get the image reasons on every other type of page, however the list doesn't appear on image pages. Is this a quirk of my set up, or are other admins experiencing this? Addhoc (talk) 01:24, 7 January 2008 (UTC)
replies: text: It's all admin, I think it's a bug - it would be great if there was a code available for images (note - this is the same for both scripts). Ryan Postlethwaite 01:27, 7 January 2008 (UTC)
replies: text: mediazilla:12214, as I pointed above. Easy to fix with some JS code ∴ AlexSm 01:39, 7 January 2008 (UTC)
replies: text: Thanks for explaining. Addhoc (talk) 02:08, 7 January 2008 (UTC)
thread_title:  Image deletion reasons 

message: I made this change (now self-reverted) to the interface to highlight that user pages, and not just talk pages, in CAT:TEMP are deleted, but when I went into the delete screen, my edit didn't do anything to the drop-down reasons. Is there something I missed? Acalamari 23:16, 6 February 2008 (UTC)
replies: text: Did you purge your cache? Ryan Postlethwaite 23:24, 6 February 2008 (UTC)
replies: text: I've readded you edit - purge your cache and try again. Ryan Postlethwaite 23:25, 6 February 2008 (UTC)
replies: text: It works, and it'll help when clearing CAT:TEMP. Thanks Ryan! Acalamari 23:49, 6 February 2008 (UTC)
thread_title:  A small change 

message: There is currently a discussion going on at WT:CSD which will probably result in the CSD templates being rewritten, with one side-effect being the removal of the horrible  template (for an explanation of why it's so horrible, take a look at this version of ).  I'm doing my best to keep the  tags in place, but I'm kind of groping in the dark as to what this script or the other deletion-reason-preload scripts are actually looking for.  Any pearls of wisdom from someone who knows what those spans need to say, if anything, would be greatly appreciated, either here or on my talk.  Happy‑melon 15:40, 1 March 2008 (UTC)
thread_title: CSD template rewrite

message: Suggestion: the code currently in testwiki:MediaWiki:Sysop.js avoids automatic "move=autoconfirmed" addition (which makes no sense) when semi-protecting pages. Then Special:Log/protect would look better and easier to understand: it would say [edit=autoconfirmed] instead of [edit=autoconfirmed:move=autoconfirmed] —AlexSm 22:40, 20 June 2008 (UTC)
replies: text: I think it's very convenient to see both protection statuses in one line. Otherwise I would still have to go to the page's log to see if it is move-protected.  — Edokter • Talk •  23:05, 20 June 2008 (UTC)
replies: text: As far as I know, this is not an issue: when you set edit protection, you also have to set some move protection level (0, 1 or 2), there is no option to "silently leave move protection as-is". In other words, [edit=autoconfirmed] in logs always means "no move protection". —AlexSm 01:02, 21 June 2008 (UTC)
replies: text: More to the point, you can't move a page if you can't edit it.  So the only situation where it makes sense to explicitly set or show the move protection level is when it's higher than the edit protection level.  However, while the JS trick on testwiki is indeed clever, I think this would be best implemented directly in MediaWiki.  —Ilmari Karonen (talk) 11:32, 21 June 2008 (UTC)
thread_title:  Avoiding [move=autoconfirmed] in logs 

message: Does anyone know where this page is documented?  What calls it, how is it activated?  I checked the banner at the top of this page which says to go to mw:Manual:Interface/Sysop.js, but there's nothing there. --Elonka 15:51, 18 December 2008 (UTC)
replies: text: The script is included from MediaWiki:Common.js (a few lines near the top) if you're a sysop. It checks if the javascript variable 'wgUserGroups' (see the html source) contains 'sysop', or if any other javascript contains 'disableSysopJS = true'. -- zzuuzz (talk) 16:23, 18 December 2008 (UTC)
replies: text:  Thanks.  So this javascript is automatically activated by default for anyone with a sysop bit, and they don't need to do anything specific to their own monobook.js pages, correct? --Elonka 16:51, 18 December 2008 (UTC)
replies: text: Yes, you only need to add something to you monobook.js if you want to disable it. -- zzuuzz (talk) 16:57, 18 December 2008 (UTC)
thread_title: Where is the documentation?

message: The Toolserver has been permanently soft-blocked for some time now (see Special:BlockList/91.198.174.192/27), since both our policy and Toolserver policy require that bots must be logged in to edit. I don't know if anyone cares enough to remove it from the list here, but since I noticed I thought I'd mention it. Anomie⚔ 23:14, 2 February 2011 (UTC)
thread_title:  Sensitive IP checker is out of date 

message: Would anyone mind me adding a small script to enforce summaries for the CheckUser interface:
/** For checkusers *****************************************
 *
 *  Description: Force checkusers to fill in the reason.
 *  Note :bugzilla:27078, :bugzilla:18613
 */
if (mw.config.get("wgCanonicalNamespace")==="Special" && mw.config.get("wgCanonicalSpecialPageName")==="CheckUser") jQuery(function($){
	$("#checkusersubmit").click(function(event){
		if ($.trim($("#checkreason").val()).length > 0) return;
		alert("Please enter a reason");
		event.preventDefault();
	});
});
Intended as a quick and unobtrusive fix to make sure filling in a reason is not forgotten. While there is an option in the extension to make sure of that, and it was turned on with :bugzilla:27078, it's not working yet due to some bug. The script should be removed again once :bugzilla:18613 is resolved and live, and can be moved to MediaWiki:Group-checkuser.js if  & follow-ups go live before that.Any objections? Amalthea 07:50, 20 June 2011 (UTC)
replies: text: . Amalthea 10:12, 21 June 2011 (UTC)
replies: text: Is this required now that 1.18 is here? –xenotalk 19:01, 12 October 2011 (UTC)
replies: text:  I've already removed it . :) Amalthea 19:26, 12 October 2011 (UTC)
replies: text: Sneaky ;p –xenotalk 19:32, 12 October 2011 (UTC)
thread_title:  Minor addition for Checkuser 

message: Hi!
I just wanted to notice that since rev:90359/rev:90587 MediaWiki has a script which "creates a button to invert checkboxes on Special:Undelete", so this part of MediaWiki:Sysop.js will be obsolete when the code is deployed to Wikipedia. Helder 12:27, 30 June 2011 (UTC)
replies: text: Y Done The new code is in core and our old copy was removed by Edokter. Helder 17:41, 5 October 2011 (UTC)
replies: text: Is this working as intended? Now there is no invert button at all? See Wikipedia:Village pump (technical)#Invert selection button missing.  –xenotalk 18:59, 12 October 2011 (UTC)
replies: text:  Resolved, see there. Amalthea 19:30, 12 October 2011 (UTC)
thread_title:  Special:Undelete was fixed on MW code 

message: MW 1.18 changed special page name to "Block" so "Sensitive IP checker" supposedly doesn't work at the moment. P.S. Could also remove absolute URLs and use jQuery. — AlexSm 17:25, 13 October 2011 (UTC)
replies: text: Fixed the script. Didn't do anything about the URLs or jQuery. Anomie⚔ 18:15, 13 October 2011 (UTC)
thread_title:  Blockip → Block 

message: MediaWiki 1.18 introduced the concept of group-specific scripts, like MediaWiki:Group-sysop.css. It would seem logical to move this script to MediaWiki:Group-sysop.js. That saves having to load it from Common.js. But there is a better way.
Gadgets have the ability to be enabled based on user rights. This has more advantages; beside not having to load it from Common.js, functionality can be split up into multiple gadgets. That way, each admin can decide which one to enable or disable, and do so without have to put kludges like disableSysopJS = true into their personal JS. All gadgets would be enabled by default.  — Edokter (talk) —  13:51, 19 January 2012 (UTC)
replies: text: Looks like an excellent idea to me. One reason I don't want to be an admin is that I don't want my editing interface cluttered. Being able to turn specific parts on and off effortlessly would completely change this. Maybe it  could also reduce the number of requests to bureaucrats to temporarily reduce rights if all it takes to go on a sort of admin break is a few clicks under preferences. Hans Adler 14:03, 19 January 2012 (UTC)

text: As long as they are enabled by default, this looks like a good idea. -- Luk  14:04, 19 January 2012 (UTC)
replies: text: I'm not necessarily against it becoming a gadget, but this doesn't control the sysop interface at all really. The scripts here handles the highlighting of sensitive IPs (only if you're already on the blocking page, and I don't know why we'd want this turned off) and pre-filling of the delete reason for CSD (where you already need to be on the delete page). I'm genuinely trying to this why someone would want these specific features disabled while retaining everything else, and I can't. Is it a good idea to make it easier to turn off sensitive IP highlighting? Ale_Jrbtalk 17:33, 19 January 2012 (UTC)

text: I support the idea of moving this into a gadget. I think it is good to have the option to disable any site script while testing and looking for the cause of eventual bugs. Besides, maybe this script is useful for other wikis as well, and could be loaded by gadget manager from a central wiki in the future Helder 20:30, 19 January 2012 (UTC)

text: Support. ~ ⇒TomTomN00 @ 23:45, 17 March 2012 (UTC)

text: Moved MediaWiki:Sysop.js → MediaWiki:Group-sysop.js and removed hack in MediaWiki:Common.js. I've kept the ability to disable with disableSysopJS for now. Krinkle (talk) 20:21, 27 May 2012 (UTC)
thread_title:  Conversion to gadgets 

message: Hello! Could someone update the code of this page to not use deprecated things?
Helder.wiki 00:02, 12 July 2014 (UTC)
replies: text: — Martin (MSGJ · talk) 11:51, 24 July 2014 (UTC)
thread_title:  Protected edit request on 11 July 2014