Krinkle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/292498

Change subject: Try to avoid auto-submit for bots or spiders on GET
......................................................................

Try to avoid auto-submit for bots or spiders on GET

Change-Id: I862f12e88a39658ad0f96d05b6e28602c2234cbc
---
M resources/frontend.js
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/guc 
refs/changes/98/292498/1

diff --git a/resources/frontend.js b/resources/frontend.js
index 810b0e9..eea8776 100644
--- a/resources/frontend.js
+++ b/resources/frontend.js
@@ -7,7 +7,8 @@
 (function () {
     if (!(
         document.getElementById &&
-        'addEventListener' in window
+        'addEventListener' in window &&
+        !/bot|spider/i.test( navigator.userAgent )
     )) {
         // Unsupported browser
         return;

-- 
To view, visit https://gerrit.wikimedia.org/r/292498
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I862f12e88a39658ad0f96d05b6e28602c2234cbc
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/guc
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to