Permalink
Browse files

Release new stable build; merge branch 'beta' into 'master'

AFCH, now with 110% more Files for upload reviewing using a new inline
reviewing interface! Plus, there are two new buttons available when
reviewing article submissions: "submit" and "mark as draft," which do
exactly what they sound like (and also have options to automatically
pre-fill the submitter field with the page creator or last non-bot
editor). The decline rationales are sorted into sections, and if you
try to move an accepted article to the mainspace but it is blocked by a
redirect, the redirect will automatically be tagged for deletion. G13
tagging! You'll see a button to tag eligible pages for G13 speedy
deletion. Finally, the buttons are now context-aware, so, for example,
you only see "Accept" if you're on a submission that can actually be
accepted.
  • Loading branch information...
2 parents 6acb64f + e65f2b0 commit 7377ae109743caad582fb32d60ea05096d3db280 @theopolisme theopolisme committed Aug 18, 2013
Showing with 716 additions and 525 deletions.
  1. +15 −1 README.md
  2. 0 src/{afch.js → MediaWiki:Gadget-afchelper.js}
  3. +17 −20 src/core.js
  4. +360 −344 src/ffu.js
  5. +6 −7 src/redirects.js
  6. +318 −153 src/submissions.js
View
@@ -5,5 +5,19 @@ This is a script created to make reviewing Wikipedia article and redirect submis
## Contributing
If you wish to contribute, that's great! Just fork the repository, make your changes in the `develop` branch, and then create a pull request. Frequent contributors can request to be added to the WPAFC organization on GitHub for the ability to commit directly to the repository, sans pull request.
+### Testing
+Developers are highly encouraged to test their modifications before committing. Rather than test on the live wiki, you can use [test.wikipedia.org](http://test.wikipedia.org/wiki/Main_Page) and not be afraid of blowing anything up.
+
+On the English Wikipedia, several different scripts mirror different branches.
+* MediaWiki:Gadget-afchelper.js – mirrors the `master` branch
+* MediaWiki:Gadget-afchelper-beta.js – mirrors the `beta` branch
+* **your page here** – if you'd like for a feature branch to be copied to a specific page on-wiki, just create a new issue
+
+To import a script, add it to [your common.js page](http://en.wikipedia.org/wiki/Special:MyPage/common.js) (example is for the beta script):
+
+ importScript('MediaWiki:Gadget-afchelper-beta.js'); // AFCH beta script [[MediaWiki:Gadget-afchelper-beta.js]]
+
+The only exception to this is for the `master` script, for which you just need to check the box next to "Yet Another AFC Helper Script" in [your preferences](http://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-gadgets).
+
## License
-The script is licensed under the [Creative Commons Attribution-ShareAlike 3.0 Unported License](http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License) and the [GNU Free Documentation License](http://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License).
+The script is licensed under the [Creative Commons Attribution-ShareAlike 3.0 Unported License](http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License) and the [GNU Free Documentation License](http://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License).
File renamed without changes.
View
@@ -1,27 +1,23 @@
//<nowiki>
// Script should be located at [[MediaWiki:Gadget-afchelper.js/core.js]]
-if ((wgPageName.indexOf('Wikipedia:Articles_for_creation') !== -1) || (wgPageName.indexOf('Wikipedia_talk:Articles_for_creation') !== -1) || (wgPageName.indexOf('Wikipedia:Files_for_upload') !== -1) || (wgPageName.indexOf('User:*') !== -1)) {
- importScript('User:Timotheus Canens/displaymessage.js');
- var afchelper_baseurl = mw.config.get('wgServer') + '/w/index.php?action=raw&ctype=text/javascript&title=MediaWiki:Gadget-afchelper.js';
+importScript('User:Timotheus Canens/displaymessage.js');
+var afchelper_baseurl = mw.config.get('wgServer') + '/w/index.php?action=raw&ctype=text/javascript&title=MediaWiki:Gadget-afchelper.js';
- var afcHelper_advert = ' ([[WP:AFCH|AFCH]])';
- var pagetext = '';
- var usertalkpage = '';
+var afcHelper_advert = ' ([[WP:AFCH|AFCH]])';
+var pagetext = '';
+var usertalkpage = '';
- if (wgPageName.indexOf('Wikipedia:Articles_for_creation/Redirects') !== -1) {
- importScriptURI(afchelper_baseurl + '/redirects.js');
- } else if (wgPageName.indexOf('Wikipedia:Files_for_upload') !== -1) {
- importScriptURI(afchelper_baseurl + '/ffu.js');
- } else if ((wgPageName.indexOf('Wikipedia:Articles_for_creation/') !== -1)
- || (wgPageName.indexOf('Wikipedia_talk:Articles_for_creation/') !== -1)
- || (wgPageName.indexOf('User:') !== -1)
- || (wgPageName.indexOf('User_talk:') !== -1)
- ){
- importScriptURI(afchelper_baseurl + '/submissions.js');
- }
-} else {
- throw "Stopped AFCH from loading on a non-AFC page."; // stop the rest of the script from loading
+if (wgPageName.indexOf('Wikipedia:Articles_for_creation/Redirects') !== -1) {
+ importScriptURI(afchelper_baseurl + '/redirects.js');
+} else if (wgPageName.indexOf('Wikipedia:Files_for_upload') !== -1) {
+ importScriptURI(afchelper_baseurl + '/ffu.js');
+} else if ((wgPageName.indexOf('Wikipedia:Articles_for_creation/') !== -1)
+ || (wgPageName.indexOf('Wikipedia_talk:Articles_for_creation/') !== -1)
+ || (wgPageName.indexOf('User:') !== -1)
+ || (wgPageName.indexOf('User_talk:') !== -1)
+ ){
+ importScriptURI(afchelper_baseurl + '/submissions.js');
}
function afcHelper_generateSelect(title, options, onchange) {
@@ -81,7 +77,8 @@ function afcHelper_getPageText(title, show, redirectcheck) {
return newtext;
}
-function afcHelper_editPage(title, newtext, token, summary, createonly) {
+function afcHelper_editPage(title, newtext, summary, createonly) {
+ var token = mw.user.tokens.get('editToken');
summary += afcHelper_advert;
$("#afcHelper_finished_wrapper").html('<span id="afcHelper_AJAX_finished_' + afcHelper_AJAXnumber + '" style="display:none">' + $("#afcHelper_finished_wrapper").html() + '</span>');
var func_id = afcHelper_AJAXnumber;
Oops, something went wrong.

0 comments on commit 7377ae1

Please sign in to comment.