diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-04-01 06:11:44 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-04-01 06:11:44 +0200 |
commit | 14f74d141ab5580688bfd46d2f74c026e43ed967 (patch) | |
tree | 081b7cbfc4d246ecc42831978d080331267cf57c /extensions/ConfirmEdit/resources | |
parent | 4a953b6bfda28604979feb9cfbb58974d13b84bb (diff) |
Update to MediaWiki 1.24.2
Diffstat (limited to 'extensions/ConfirmEdit/resources')
-rw-r--r-- | extensions/ConfirmEdit/resources/ext.confirmEdit.asirra.js | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/extensions/ConfirmEdit/resources/ext.confirmEdit.asirra.js b/extensions/ConfirmEdit/resources/ext.confirmEdit.asirra.js deleted file mode 100644 index 34296d03..00000000 --- a/extensions/ConfirmEdit/resources/ext.confirmEdit.asirra.js +++ /dev/null @@ -1,54 +0,0 @@ -/*======================================================================*\ -|| #################################################################### || -|| # Asirra module for ConfirmEdit by Bachsau # || -|| # ---------------------------------------------------------------- # || -|| # This code is released into public domain, in the hope that it # || -|| # will be useful, but without any warranty. # || -|| # ------------ YOU CAN DO WITH IT WHATEVER YOU LIKE! ------------- # || -|| #################################################################### || -\*======================================================================*/ - -jQuery( function( $ ) { - // Selectors for create account, login, and page edit forms. - var asirraform = $( 'form#userlogin2, #userloginForm form, form#editform' ); - var submitButtonClicked = document.createElement("input"); - var passThroughFormSubmit = false; - - function PrepareSubmit() { - submitButtonClicked.type = "hidden"; - var inputFields = asirraform.find( "input" ); - for (var i=0; i<inputFields.length; i++) { - if (inputFields[i].type === "submit") { - inputFields[i].onclick = function(event) { - submitButtonClicked.name = this.name; - submitButtonClicked.value = this.value; - } - } - } - - asirraform.submit( function() { - return MySubmitForm(); - } ); - } - - function MySubmitForm() { - if (passThroughFormSubmit) { - return true; - } - Asirra_CheckIfHuman(HumanCheckComplete); - return false; - } - - function HumanCheckComplete(isHuman) { - if (!isHuman) { - window.alert( mediaWiki.msg( 'asirra-failed' ) ); - } else { - asirraform.append(submitButtonClicked); - passThroughFormSubmit = true; - asirraform.submit(); - } - } - - PrepareSubmit(); - -} ); |