Commit graph

23 commits

Author SHA1 Message Date
Bartosz Dziewoński 6e4fd9cff7 Keep sending CAPTCHA info if an unrelated save error happens
Bug: T371041
Change-Id: Id18095d830f6b78770a4f9167268d9717352e7e4
2024-08-27 23:53:43 +02:00
libraryupgrader a8c5016096 build: Updating npm dependencies
* eslint-config-wikimedia: 0.27.0 → 0.28.0
  The following rules are failing and were disabled:
  * ReCaptchaNoCaptcha/resources/ve-confirmedit-reCaptchaNoCaptcha:
    * no-jquery/no-extend
  * Turnstile/resources/ve-confirmedit-turnstile:
    * no-jquery/no-extend
  * hCaptcha/resources/ve-confirmedit-hCaptcha:
    * no-jquery/no-extend

* grunt-stylelint: 0.19.0 → 0.20.0
* stylelint-config-wikimedia: 0.16.1 → 0.17.1

Change-Id: I8045a843b3e9b6a67e07d580ce07dc6afeaeab2d
2024-06-07 15:07:52 +00:00
Amir Sarabadani 40fb527c59 Remove MathCaptcha
It relies on PNG mode of Math extension which has been removed since
I595926027433182cc03

Bug: T360978
Change-Id: I650d096dfd83c725e30242eb5795236c59fe7883
2024-04-01 18:24:00 +02:00
James D. Forrester 2f9beac0fa build: Switch eslint to ES6 mode, and make pass
Change-Id: Ic29ad198519a7455909b8ee32fa891c7881e4bb5
2023-09-20 09:27:51 +01:00
Bartosz Dziewoński e7fc8fd290 Fix field placeholder for QuestyCaptcha and others
The message 'fancycaptcha-imgcaptcha-ph' ("Enter the text you see on the image")
should only be used as placeholder for FancyCaptcha.

This affected editors using CaptchaInputWidget in JS, such as VisualEditor
and DiscussionTools.

Change-Id: Ica53b2f3149e9039c95e733e0e89ba62356844e4
2021-01-26 00:15:33 +01:00
Ed Sanders 45d8579f26 VE: Add explicit dependency on targetLoader
Change-Id: Iaf47ec5a86797243cfadae032e80c92361382b05
2020-07-01 14:44:53 +00:00
Bartosz Dziewoński f786536715 Extract CaptchaInputWidget from VE code for use in other extensions
* ext.confirmEdit.CaptchaInputWidget.js:
  Based on code from ve.init.mw.CaptchaSaveErrorHandler.js

* ext.confirmEdit.CaptchaInputWidget.less:
  Based on code from mw/ext/VE repo in ve.ui.MWSaveDialog.css

* ConfirmEditHooks.php:
  Based on code from mw/ext/VE repo in VisualEditorHooks.php

Change-Id: I6605017fd31a4f96c529dd0beb69e9f4433cebc1
2020-04-15 16:06:58 +02:00
Bartosz Dziewoński 601b1fff84 VE integration: Fix the "Refresh" button
Previously, clicking it would change the image, but the widget would
still expect the user to fill in the original CAPTCHA.

Change-Id: I24a963e760951427f6d233302429c1baf1fb299f
2020-03-24 00:24:18 +00:00
Bartosz Dziewoński da4c75e387 VE integration: Remove "Warning:" label before CAPTCHA
It doesn't add anything and looks silly.
https://phabricator.wikimedia.org/F31677965

Change-Id: I94641a227d26622846ea8b300e8a3e9eb300b651
2020-03-23 23:06:33 +01:00
Ed Sanders 29f8ba1162 build: Update linters
Change-Id: I7cdedec41a9960f8dce2bac3251d3d24e7999024
2019-11-15 16:46:40 +00:00
Ed Sanders 28cb4a71da build: Update eslint-config-wikimedia to 0.10.1
Change-Id: I78b2a1c233c97af39e1c8f8fd9d839d0ffc4936e
2019-02-10 15:44:37 +00:00
Bartosz Dziewoński 5e5d33f219 ve.init.mw.CaptchaSaveErrorHandler: Update to receive entire response
Change-Id: I48c47c7063ebfa635ecc9e91b5b4018e427df5d3
Depends-On: I818d916275b8451af6910ddaa7cd4d7c653085ee
2018-12-07 14:18:03 -05:00
Ed Sanders 057db3d77a VE: Convert to SaveErrorHandler
Change-Id: I18386a72146e1179c8656e3c9c01a256ec2096d6
Depends-On: I036ee32847cc3b25a1cc478247cfe54599781098
2018-11-29 16:52:41 +00:00
Ed Sanders 15eba91749 Use ve.targetLinksToNewWindow where possible
Also, avoid parsing HTML manually.

Change-Id: I5dd2ff41784b1096e98c370448fa17472950ca42
2018-11-29 00:30:05 +00:00
Ed Sanders 1f0d203065 Move VE's ConfirmEdit support to this extension
This can be merged before the code is dropped from VE, as
it will just overwrite the registry entry.

Bug: T141676
Depends-On: I2c35b9443208928db43bcfd515864641b10cc602
Change-Id: I2fa7ca7203e0a82f5ce9b79e2642dba2baba6c5a
2018-11-23 17:24:56 +00:00
Ed Sanders ae85f2ac6b Replace jshint/jscs with eslint and add stylelint
Change-Id: I9c33c65c913d891739b913d5363abba66c2cd0dd
2017-01-18 16:53:09 -08:00
Florian 1163b6f100 Replace the edit preview with a validation of whitelisted IP addresses
The user now can press the preview button to bring up an interpreted list
of the lines of the interface message MediaWiki:Captcha-ip-whitelist to check
if the added/remained data is (still) a valid list of (whitelisted) IP addresses.

Bug: T129757
Change-Id: Ic61f00e7f88c9290ae6e11f7258c11a730ac98c8
2016-08-21 18:54:41 +02:00
Florian cad5bc9200 Move FancyCaptcha to its own location
3. step in preparation of ExtensionRegistration.

Bug: T88047
Change-Id: I31d8e0c01b16aafb39b4ead7acc88f2e91d33e6a
2015-05-21 16:19:38 +00:00
Reedy bb139148bf Remove Asirra integration
Bug: 71712
Change-Id: Ieb3b0386f10d241e8d9b711ebf1ae2520e74c111
2014-10-07 16:18:09 +01:00
S Page f0f65ba361 Get Asirra captcha working on more forms
The jQuery selector to find the form only worked for create account;
it now works for the captchas on login password failures and on page
editing.

Remove two debugging console.log() lines and fix some JSHint errors.

Rename the message for login captchas from the unused asirra-badpass to
the correct asirra-badlogin.

Bug: 39536
Change-Id: I92c3cb93337d4a704221d5a0e50ed56ae3b6b1cf
2013-06-11 12:59:13 -07:00
S Page dbe64ca161 Position the "Refresh" link over the image
This changes the CSS of the .fancycaptcha-image-container to allow
positioning within it, and repositions .fancycaptcha-reload at its
lower-right.  The container is taller than nearly all images, but
there's a chance the ↻Refresh link might obscure part of a captcha
image.

This is compatible with the new Create account form's repositioning of
the FancyCaptcha inside a gray frame using JS, though gerrit I003c5f1b75
improves Create account once this is deployed.

Bug: 47699
Change-Id: I57be0bc8aa80b9ea6148db979ad28397d2107b86
2013-05-06 18:44:31 -07:00
S Page 8837bd469a Move reload image into the _Refresh_ background
This makes the icon and text a single item, so they don't split across
lines, and reduces code and messages.

Bug: 47398
Change-Id: If81313b9fe03693dcdc06d5d682f0ef9a9994f76
2013-04-26 19:52:04 -07:00
lalei 12361c5f31 Add a button to request a new fancy captcha
This adds HTML, CSS, and JS to FancyCaptcha output to refresh the image,
which requests it via a new fancycaptchareload API.
It also cleans up the Asirra class a little.

Bug: 14230
Change-Id: I4e476f32de199534c9798fc78e8490b3ef91dd45
2013-04-17 20:10:33 -04:00