Author: buildbot
Date: Sat Jan 10 15:22:12 2015
New Revision: 935713

Log:
Staging update by buildbot for ooo-site

Modified:
    websites/staging/ooo-site/trunk/cgi-bin/   (props changed)
    websites/staging/ooo-site/trunk/content/   (props changed)
    websites/staging/ooo-site/trunk/content/scripts/ooo.js

Propchange: websites/staging/ooo-site/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Jan 10 15:22:12 2015
@@ -1 +1 @@
-1650750
+1650751

Propchange: websites/staging/ooo-site/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Jan 10 15:22:12 2015
@@ -1 +1 @@
-1650750
+1650751

Modified: websites/staging/ooo-site/trunk/content/scripts/ooo.js
==============================================================================
--- websites/staging/ooo-site/trunk/content/scripts/ooo.js (original)
+++ websites/staging/ooo-site/trunk/content/scripts/ooo.js Sat Jan 10 15:22:12 
2015
@@ -1,6 +1,7 @@
 /*
  * Overview of all methods (functions) of the global object "INDEX"
  * ----------------------------------------------------------------
+ * function INDEX.checkReferrer ()
  * function INDEX.createIndexOf        ()
  * function INDEX.getURLQuery  ()
  * function INDEX.follow       ( platform )
@@ -111,6 +112,42 @@ INDEX.follow = function( platform ) {
        }
 
        return;
+}
+
+/*
+ * Show a dialog box helping text and set the document referrer to another 
webpage to do a redirect.
+ * @param:  None
+ * @return: None
+ */
+INDEX.checkReferrer = function() {
+       // Check the origin of the website visit (document referrer) and decide 
if there is a need to notify the user and
+       // do a website redirect.
+
+       // Example from 2014-12-03:
+       // Send the support link of the "Quickoffice - Pro" app to a special 
webpage with explaination.
+       // 
http://mail-archives.apache.org/mod_mbox/openoffice-dev/201412.mbox/%3C547E3D52.5070309%40apache.org%3E
+
+       // TODO: Finished the work and test if it is working.
+       
+       // Backup the original document referrer.
+       var ref_backup = document.referrer;
+
+       // Check if the user comes from a problematic webpage (document 
referrer).
+       if ( document.referrer.indexOf( 
"itunes.apple.com/gb/app/quickoffice-pro/id889011512" ) != -1 ) {
+               // Set a new website to do the redirect.
+//             location.href = 
"http://www.openoffice.org/new-special-page.html";;
+
+               // Notify the user about the reason for the redirect.
+               alert( ""
+                       + "Dear Quickoffice - Pro user"
+                       + "\n\n That app claims to come from Apache OpenOffice, 
but this is not true. "
+                       + "It is totally unrelated to the Apache OpenOffice 
project \"http://www.openoffice.org\"; and "
+                       + "therefore we cannot help you in any way. Please 
report the app back to the App Store. "
+                       + "\n\n Thank you very much for your understanding."
+               + "");
+       }
+
+       return;
 }
 
 /*


Reply via email to