You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by db...@apache.org on 2015/09/10 21:03:52 UTC

[2/3] docs commit: Added warning for HTTPS search results

Added warning for HTTPS search results


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/88ab49a1
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/88ab49a1
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/88ab49a1

Branch: refs/heads/cordova-website
Commit: 88ab49a17e9d17e80eed68f41c4299579e5dd1fe
Parents: 538f3e3
Author: riknoll <ri...@microsoft.com>
Authored: Thu Sep 10 09:54:08 2015 -0700
Committer: riknoll <ri...@microsoft.com>
Committed: Thu Sep 10 10:10:01 2015 -0700

----------------------------------------------------------------------
 www/static/plugins/app.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/88ab49a1/www/static/plugins/app.js
----------------------------------------------------------------------
diff --git a/www/static/plugins/app.js b/www/static/plugins/app.js
index 2707d13..065ddd2 100755
--- a/www/static/plugins/app.js
+++ b/www/static/plugins/app.js
@@ -421,6 +421,13 @@ var App = React.createClass({
                 <PlatformButton platform={platform} keyword={keyword} initiallyActive={active}/>
             );
         }
+        var listContent = null;
+        if(window.location.protocol !== "https:") {
+            listContent = <PluginList plugins={this.state.searchResults} />;
+        } else {
+            var httpUrl = window.location.href.replace("https://", "http://");
+            listContent = <div className="alert alert-warning" role="alert">Search results are not currently supported over HTTPS. Please visit this page <a href={httpUrl}>using HTTP</a></div>;
+        }
         return (
             <div>
                 <div className="container">
@@ -473,7 +480,7 @@ var App = React.createClass({
                         </div>
                     </div>
                 </div>
-                <PluginList plugins={this.state.searchResults} />
+                {listContent}
                 <div className="row plugin-search-credit">
                     Search results powered by <a href="http://npmsearch.com/">npmsearch.com</a>
                 </div>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org