MediaWiki talk:Gadgets-definition
From Wikipedia, the free encyclopedia
- For informations about gadgets, see Wikipedia:Gadget; for the addition of user scripts as gadgets, see Wikipedia:Gadget proposals.
Contents |
[edit] How the links work
Example:
* Navigation_popups|popups.js
Loads the DEFINITION/identifier in preferences from MediaWiki:Gadget-Navigation_popups and then loads the SCRIPT from MediaWiki:Gadget-popups.js
- Full Documentation at mw:Extension:Gadgets
- Helpful multi-page edit links in Special:Gadgets
[edit] Customization
I noticed popups were added as a test. If scripts like this are added, how does somebody customize the script's configuration? For example, I've configured popups in my monobook to add the disambiguation and admin features. Would the scripts added here be customizable somehow or are you stuck with the basic configuration if you enable it through preferences? - auburnpilot talk 02:45, 4 December 2007 (UTC)
- It is possible to write the script in such a way that it's customisable via monobook.js. I'm not sure if the version of popups added to the gadgets list is customisable like this or not. You might want to keep your popups configuration in your monobook.js, but comment out the inclusion of popups itself, installing through preferences instead, and seeing if it worked; it would be useful to know if popups-via-preferences is customisable in its current form or whether it needs changing. --ais523 08:36, 4 December 2007 (UTC)
- I removed popups from my monobook.js, leaving the customizations, and enabled them via preferences. I was still able to use the disambiguation and admin settings, so I assume you can in fact customize these gadgets through the monobook.js. Thanks for the idea, Ais523; worked well. - auburnpilot talk 13:03, 4 December 2007 (UTC)
- Should there be a matching MediaWiki:Navigation_popups page for this?
- Where is the control that is making it link to Wikipedia:Tools/Navigation popups
-
-
-
- — xaosflux Talk 04:46, 6 December 2007 (UTC)
- Semi answered myself, see MediaWiki:Gadget-Navigation popups. — xaosflux Talk 04:50, 6 December 2007 (UTC)
- — xaosflux Talk 04:46, 6 December 2007 (UTC)
-
-
- Got the rest, just really not used to the prefix naming scheme. — xaosflux Talk 04:53, 6 December 2007 (UTC)
- (restore question self removed as the answer edit conflicted my removal)Standards questions, should we pipe Gadgets in to user: space, or bring them in to MediaWiki somewhere? — xaosflux Talk 04:46, 6 December 2007 (UTC)
- My advice would be to establish a "stable" version in MediaWikispace and use that one as the gadget. The one in userspace should be for development purposes only, and the MediaWiki version should only be updated once changes to the userspace version have been tested and validated. As far as security goes, however, there's likely not much harm in leaving them in (an administrator's) userspace; it's more an issue of semantics. AmiDaniel (talk) 04:54, 6 December 2007 (UTC)
- Does anyone have the expertise to move the css portion of popups over? Prodego talk 12:07, 6 December 2007 (UTC)
- Looking on Wikipedia:Tools/Navigation_popups#Changing_the_appearance_of_your_popups .css is not required, but is used to set per-user options to change the appearance, am I missing something else? — xaosflux Talk 13:04, 6 December 2007 (UTC)
- Look at the very top of popups.js. It calls a css page there, if I remember correctly. Prodego talk 13:06, 6 December 2007 (UTC)
- Yes, it does call a CSS page there, User:Lupin/navpop.css. I will go make a request for MediaWiki:Gadget-navpop.css to be created (and then the needed changes for the other relevant pages). FunPika 02:20, 9 December 2007 (UTC)
- Look at the very top of popups.js. It calls a css page there, if I remember correctly. Prodego talk 13:06, 6 December 2007 (UTC)
- Looking on Wikipedia:Tools/Navigation_popups#Changing_the_appearance_of_your_popups .css is not required, but is used to set per-user options to change the appearance, am I missing something else? — xaosflux Talk 13:04, 6 December 2007 (UTC)
- Does anyone have the expertise to move the css portion of popups over? Prodego talk 12:07, 6 December 2007 (UTC)
- My advice would be to establish a "stable" version in MediaWikispace and use that one as the gadget. The one in userspace should be for development purposes only, and the MediaWiki version should only be updated once changes to the userspace version have been tested and validated. As far as security goes, however, there's likely not much harm in leaving them in (an administrator's) userspace; it's more an issue of semantics. AmiDaniel (talk) 04:54, 6 December 2007 (UTC)
[edit] To Do's
- Get some better definition and description pages for the headers (could very well be sections using Page#Section markup.
- Create Help:Gadgets or Wikipedia Gadgets for general information and documentation
- Have a centralized location for requesting additions (here?) — xaosflux Talk 13:06, 6 December 2007 (UTC)
- I think it should be Wikipedia:Gadgets since it's project-specific, and I also suggest that we organize gadjets descriptions, for example as Wikipedia:Gadgets subpages. At least this should be better than current e.g. Wikipedia:Tools/Disable access keys. As for #3, maybe «Wikipedia:Gadgets proposals», or another subpage «Wikipedia:Gadgets/Proposals» ? I could suggest some gadgets but I'm still waiting for a stable "Proposals" page ∴ AlexSm 18:22, 14 December 2007 (UTC)
- Ok, if nobody minds I think I'll create WP:Gadgets Proposals ∴ AlexSm
- I have just created Wikipedia:Gadgets and Wikipedia:Gadget proposals. Сасусlе 03:40, 17 January 2008 (UTC)
- Thank you ∴ AlexSm 22:11, 17 January 2008 (UTC)
- I have just created Wikipedia:Gadgets and Wikipedia:Gadget proposals. Сасусlе 03:40, 17 January 2008 (UTC)
- Ok, if nobody minds I think I'll create WP:Gadgets Proposals ∴ AlexSm
[edit] Admin Gadgets
- Thread moved to Wikipedia_talk:WikiProject_User_scripts/Gadgets#Admin_Gadgets to centralize the discussion. — xaosflux Talk 04:51, 7 December 2007 (UTC)
[edit] Normal Gadgets to consider
These should all be multibrowser compatible (Opera, FF, Safari and IE). I have used all of them at times, and none of them are admin scripts.
- a ported HotCat.js from Commons
- Wikipedia:WikiProject_User_scripts/Scripts/Formatter the format tab
- User:Rparle/monobook.js/purgebutton a purge tab
- User:Alex_Smotrov/qpreview.js Quick preview
- User:Cacycle/wikEdDiff.js wikiEdDiff (an additional diff mode that sometimes makes it easier to spot small diffs in my experience
Also, I was wondering. is it possible to set the default value of these gadgets ? I imagine some people might like to deactivate wikiminiatlas for instance ? just an idea. --TheDJ (talk • contribs) 19:40, 7 December 2007 (UTC)
- I'm not familiar with HotCat, someone needs to port it to en.wp first. I'm against other scripts for various reasons, and I suggest we develop some kind of procedure and then discuss the scripts one by one, not a bunch at the same time. Note that similar discussions also takes place at Wikipedia_talk:WikiProject_User_scripts/Gadgets ∴ AlexSm 20:33, 7 December 2007 (UTC)
[edit] Suggested addition: external links
Opening external links in a new tab/window:
addOnloadHook(function() { var alinks = document.getElementById('content').getElementsByTagName("a"); var tablink, sitename; for (var i = 0, leng = alinks.length; i < leng; i++) { tablink = alinks[i]; if (tablink.className.indexOf("external") != -1 && tablink.href.indexOf(wgServer) != 0) tablink.target = "_blank"; } });
This has been proposed twice: 1, 2. If anyone wants to improve the script for performance/style/general usefulness, please do so. GracenotesT § 21:03, 8 December 2007 (UTC)
- Added {{editprotected}} – any objections to including this? GracenotesT § 21:41, 9 December 2007 (UTC)
- Is it firefox only, and, if not, what happens in a browser that does not support tabbed browsing? Prodego talk 21:47, 9 December 2007 (UTC)
- It works in Firefox, IE, and Opera (I don't have Safari). If a browser does not support tabbed browsing, the link will open in a new window. If the browser does support tabs, the link will open either in a new window or a new tab, depending on the user's browser preferences. GracenotesT § 22:38, 9 December 2007 (UTC)
- Is it firefox only, and, if not, what happens in a browser that does not support tabbed browsing? Prodego talk 21:47, 9 December 2007 (UTC)
I feel like only very few people would use this script. You could count my opinion as weak oppose, because at some point the list of gadgets is going to be way too long. As for suggestions, you could use document.getElementById('content').getElementsByTagName('a')
to exclude all the portlet links and speed the script up a little ∴ AlexSm 00:28, 10 December 2007 (UTC)
- Well, I'll let you decide that, we can always remove it. Done. Prodego talk 00:30, 10 December 2007 (UTC)
- Well, we do need to get to that point, no? I thought that the option being proposed on two different instances and supported by several people would be merit enough to include it. I only proposed it here because someone prompted me to. GracenotesT § 00:46, 10 December 2007 (UTC)
[edit] Change to popups line
{{editprotected}}
Please change * Navigation_popups|popups.js to * Navigation_popups|popups.js|navpop.css. FunPika 03:17, 9 December 2007 (UTC)
[edit] Browser specific?
How do we handle browser specific tools? My tools would be very useful here, but I have no desire to waste time on making them IE compatible, especially since we don't use any real cross-browser libraries. Zocky | picture popups 13:09, 12 December 2007 (UTC)
- Which scripts do you think would be useful? I wouldn't mind making them IE compatable, if such is possible. GracenotesT § 16:00, 12 December 2007 (UTC)
- The 4 that are listed at the top of my userpage. Zocky | picture popups 17:57, 12 December 2007 (UTC)
[edit] cookie-based Preferences?
Per discussion on #mediawiki-scripts@freenode, I've been pondering a cookie-based preference system that could work with gadgets, and in fact all user scripts. Of course, some people have cookies disabled or use multiple browsers or machines, so a good fallback would be some sort of global variables in their user/skin.js.
So, I've written up a mostly-working proof of concept of both of these combined, which may prove to be useful after some heavy testing/cleanup. See Wikipedia:WikiProject User scripts/preferences and the associated talk page for details. --Splarka (rant) 04:59, 29 December 2007 (UTC)
[edit] UTCLiveClock
Can we please have gadgets that work for everyone, and not just for users who happen to have QueryString already installed in their monobook.js? ∴ AlexSm 00:06, 12 January 2008 (UTC)
→AzaToth 00:17, 12 January 2008 (UTC)
[edit] Special:Log/rights
The rights log is pretty spammy now due to rollback. Per request, I've created a pretty useable interactive filter script for the user rights log at User:Splarka/lifilter.js (Note: Now expanded to work in all logs li-lists). The features include:
- Creates the button to generate the form on Special:Log/rights or type=rights (the form can also be auto-generated on page load via var AutoLoadLogsFilter=true; in your user scripts).
- Choose to match only (for log=rights only):
- Log entries that added this right, eg "sysop" in "(none) to sysop"
- Log entries that removed this right, eg "rollbacker" in "rollbacker to (none)"
- Log entries that added or removed this right
- Log entries that mention this right, eg "sysop" in "sysop, rollbacker to sysop"
- Regex string search for the match chosen above, eg "sysop" or "(sysop|checkuser)". In the rights log, the string regexly searched is a space-delimited list of the rights (not comma separated). In all other logs, it will search the entire string's plain text representation (minus XML markup, but leaving in invisible unicode).
- [hilight] will hilight the log entries that match the above critera.
- [filter] will hide the log entries that do not match the above critera.
- Invert will reverse the match behavior of [filter] and [hilight]
So for example, if you do not care about "rollbacker" changes, you can choose "Added or Removed", put in "rollbacker", select "[x] invert", and click "[filter]". It will then hide any entries where the "rollbacker" right was added or removed (but will show lines where it was not changed, eg "rollbacker to rollbacker, sysop"). Can I get some tests in IE6/7 and Opera, and if it behaves, can it be added to the available gadgets? Streamlining/fixes/comments cheerfully tolerated (heh heh). --Splarka (rant) 01:33, 12 January 2008 (UTC)
- Opera 9.2 is fine, I'll be able to check it in IE6 when you remove semicolon from
style.display = 'none;'
. Also I think the script could apply regex filter to other types of log as well ∴ AlexSm 02:42, 12 January 2008 (UTC)- Damn IE. Done. And yes, it probably could be adapted to a general log filter, but right now it is somewhat custom-made for user rights (in english) due to the sloppy way in which the log displays them (that is, it specifically only searches for the rights). Also: The API could possibly be utilized to display them much cleaner. --Splarka (rant) 02:52, 12 January 2008 (UTC)
[edit] New gadget pages
As suggested above, I have created Wikipedia:Gadget for general informations about gadgets and Wikipedia:Gadget proposals for discussing the addition of user scripts as gadgets. Сасусlе 04:03, 17 January 2008 (UTC)