Skip to content

Commit

Permalink
speedy: move db-talk to top of list for talk pages (except user talk …
Browse files Browse the repository at this point in the history
…pages)

G8 db-talk is the most common criterion for talk pages. So it can go at the top of the list, for quicker access.
  • Loading branch information
atlight committed Aug 20, 2011
1 parent 81b4c70 commit 14958b2
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions modules/twinklespeedy.js
Expand Up @@ -170,7 +170,13 @@ Twinkle.speedy.initDialog = function twinklespeedyInitDialog(callbackfunc, first
} );
}

switch (mw.config.get('wgNamespaceNumber')) {
var namespace = mw.config.get('wgNamespaceNumber');
if (namespace % 2 === 1 && namespace !== 3) { // talk pages, but not user talk pages
form.append( { type: 'header', label: 'Talk pages' } );
form.append( { type: 'radio', name: 'csd', list: Twinkle.speedy.talkList } );
}

switch (namespace) {
case 0: // article
case 1: // talk
form.append( { type: 'header', label: 'Articles' } );
Expand Down Expand Up @@ -233,6 +239,14 @@ Twinkle.speedy.initDialog = function twinklespeedyInitDialog(callbackfunc, first
}
};

Twinkle.speedy.talkList = [
{
label: 'G8: Talk pages with no corresponding subject page',
value: 'talk',
tooltip: 'This excludes any page that is useful to the project - in particular, user talk pages, talk page archives, and talk pages for files that exist on Wikimedia Commons.'
}
];

// this is a function to allow for db-multiple filtering
Twinkle.speedy.getFileList = function twinklespeedyGetFileList(multiple) {
var result = [];
Expand Down Expand Up @@ -547,11 +561,6 @@ Twinkle.speedy.getGeneralList = function twinklespeedyGetGeneralList(multiple) {
tooltip: 'such as talk pages with no corresponding subject page; subpages with no parent page; file pages without a corresponding file; redirects to invalid targets, such as nonexistent targets, redirect loops, and bad titles; or categories populated by deleted or retargeted templates. This excludes any page that is useful to the project, and in particular: deletion discussions that are not logged elsewhere, user and user talk pages, talk page archives, plausible redirects that can be changed to valid targets, and file pages or talk pages for files that exist on Wikimedia Commons.'
});
if (!multiple) {
result.push({
label: 'G8: Talk pages with no corresponding subject page',
value: 'talk',
tooltip: 'This excludes any page that is useful to the project, and in particular: deletion discussions that are not logged elsewhere, user and user talk pages, talk page archives, plausible redirects that can be changed to valid targets, and file pages or talk pages for files that exist on Wikimedia Commons.'
});
result.push({
label: 'G8: Subpages with no parent page',
value: 'subpage',
Expand Down Expand Up @@ -971,7 +980,6 @@ Twinkle.speedy.callbacks = {
var notifytext;

// specialcase "db" and "db-multiple"
// XXX modify the "db-csd-notice-custom" template to cater for these special cases
switch (params.normalized)
{
case 'db':
Expand Down

0 comments on commit 14958b2

Please sign in to comment.