Jdlrobson has submitted this change and it was merged.

Change subject: Document mf-stop-mobile-redirect.js
......................................................................


Document mf-stop-mobile-redirect.js

Change-Id: Iaecfea38df3eeb8a8d042cbb0a5db0ce94410ad3
---
M javascripts/modules/mf-stop-mobile-redirect.js
1 file changed, 13 insertions(+), 3 deletions(-)

Approvals:
  Jdlrobson: Verified; Looks good to me, approved



diff --git a/javascripts/modules/mf-stop-mobile-redirect.js 
b/javascripts/modules/mf-stop-mobile-redirect.js
index 7591c9b..9d7b03a 100644
--- a/javascripts/modules/mf-stop-mobile-redirect.js
+++ b/javascripts/modules/mf-stop-mobile-redirect.js
@@ -1,6 +1,16 @@
-/*
-FIXME: please document purpose of this
-*/
+/**
+ * Handle cookies for switching from mobile -> desktop mode
+ *
+ * Sets stopMobileRedirect cookie and, if present, unsets the mf_mobileFormat
+ * cookie (which is used on sites that do not have a separate mobile domain
+ * to keep users on the mobile version of the site).
+ *
+ * We have backend code to handle this too, however if a user is sent to a
+ * cached page, the PHP code that handles this will not get executed. Hence
+ * this JS. The altnernative would be to send users to a SpecialPage (which
+ * is not cached) to handle updating the cookeis prior to redirecting them
+ * to the desktop site.
+ */
 
 ( function( M, $ ) {
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaecfea38df3eeb8a8d042cbb0a5db0ce94410ad3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: awjrichards <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>

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

Reply via email to