Content deleted Content added
Enterprisey (talk | contribs) m Updating AFCH: master @ 5f977b |
Enterprisey (talk | contribs) Updating AFCH: shortdesc @ fff341 |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1:
/* Uploaded from https://github.com/WPAFC/afch-rewrite, commit:
//<nowiki>
( function (
// Check that we're in the right namespace and on the right page
case 4: // Wikipedia
case 5: // Wikipedia talk
var pageName = mw.config.get( 'wgTitle' );
// return nothing for now, all drafts are now under Draft namespace
// currently only the article submission script is running here.
// to be used when script(s) for other modules such as category and
// redirect requests are reintergrated into here.
▲ 'Wikipedia talk:Articles for creation/',
]▼
▲ return false;
}
case 2: // User
case 118: // Draft
break;
default:
return;
}▼
} );▼
▲ // Initialize the AFCH object
▲ window.AFCH = {};
▲ // Set up constants
▲ AFCH.consts = {};
// These next two statements (setting beta and baseurl) may be modified
// by the uploading script! If you change them, check that the uploading
AFCH.consts.version = '0.9';▼
// script at scripts/upload.py doesn't break.
$.when(
$.getScript( AFCH.consts.
$.getScript( 'https://tools-static.wmflabs.org/cdnjs/ajax/libs/hogan.js/3.0.2/hogan.min.js' )
).done( function () {
▲ AFCH.consts.scriptpath = mw.config.get( 'wgServer' ) + mw.config.get( 'wgScript' );
var loaded = AFCH.load( 'submissions' ); // perhaps eventually there will be more modules besides just 'submissions'
▲ AFCH.consts.baseurl = AFCH.consts.scriptpath +
▲ '?action=raw&ctype=text/javascript&title=User:Enterprisey/afch-dev.js';
▲ } );
▲ if ( !loaded ) {
▲ mw.notify( 'AFCH could not be loaded: ' + ( AFCH.error || 'unknown error' ),
▲ { title: 'AFCH error' } );
▲ } );
▲ }
//</nowiki>
|