QuickLogs replaces links to log pages on Special:Contributions with pseudo-links that display the logs in a container on the page itself. The links are:
- block log
- uploads by the user
- move log
- chatban log, if chat is present
- abuse log
- userrights log
- all logs
Additionally, if the user has the needed rights, these links will be included as well:
Links that lead to a specific page (for instance, user rights management) will be striked through for differentiating from pseudo-links.
Installation
A demo of this script can be seen at Special:Contributions/Wikia.
Developers
QuickLogs also provides bindings you can use to add your own buttons to the toolbar. It fires MediaWiki hooks on state changes (QuickLogs.loaded
and QuickLogs.render
) for calling code if and when QuickLogs is available or has rendered. Here is an example of how to add a link to the end of the list:
mw.hook('QuickLogs.loaded').add(function(ql) {
// Remove any buttons that were previously added by the script
ql.addLink('yourScript', {
message: 'Hello, world!',
click: handler, // (optional) you can also set an href field
check: checkerFunction, // (optional) function that decides whether the link should appear, should return a boolean
attr: { // (optional) attributes for your link element
id: 'yourScript-link'
}
});
});
You can also add custom regular logs by setting the script name as the log type and either the by
and title
parameters. The third argument to the function can specify the index at which the link will be added:
mw.hook('QuickLogs.loaded').add(function(ql) {
ql.addLink('useravatar', {
message: 'avatar log',
by: ql.user
}, 4);
});
Updates
- August 03, 2018
- I18n and script integration.
- September 17, 2015
- Initial release.