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/10/10 02:38:06 UTC

docs commit: Enabled plugin search over HTTPS. This closes #380.

Repository: cordova-docs
Updated Branches:
  refs/heads/cordova-website 84c3b094f -> 28c36a027


Enabled plugin search over HTTPS. This closes #380.


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

Branch: refs/heads/cordova-website
Commit: 28c36a027d97940a9a152bcace71c9cd55b8faff
Parents: 84c3b09
Author: riknoll <ri...@microsoft.com>
Authored: Fri Oct 9 14:42:14 2015 -0700
Committer: Dmitry Blotsky <dm...@gmail.com>
Committed: Fri Oct 9 17:37:34 2015 -0700

----------------------------------------------------------------------
 www/static/plugins/app.js | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/28c36a02/www/static/plugins/app.js
----------------------------------------------------------------------
diff --git a/www/static/plugins/app.js b/www/static/plugins/app.js
index c7fa7b2..dfbe711 100755
--- a/www/static/plugins/app.js
+++ b/www/static/plugins/app.js
@@ -309,7 +309,8 @@ var App = React.createClass({
             blacklistedPlugins = require('./blacklisted-plugins.json').plugins,
             pluginCount = 0,
             self = this,
-            queryHost = "http://npmsearch.com/query",
+            queryProtocol = window.location.protocol === "https:" ? "https:" : "http:",
+            queryHost = queryProtocol + "//npmsearch.com/query",
             queryFields = "fields=name,keywords,license,description,author,modified,homepage,version,rating",
             queryKeywords = "q=keywords:%22ecosystem:cordova%22",
             queryInitialSize = Constants.NpmSearchInitialSize,
@@ -429,13 +430,9 @@ 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} flashEnabled={this.state.flashEnabled}/>;
-        } 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>;
-        }
+
+        var listContent = <PluginList plugins={this.state.searchResults} flashEnabled={this.state.flashEnabled}/>;
+
         return (
             <div>
                 <div className="container">
@@ -490,7 +487,7 @@ var App = React.createClass({
                 </div>
                 {listContent}
                 <div className="row plugin-search-credit">
-                    Search results powered by <a target="_blank" href="http://npmsearch.com/">npmsearch.com</a>
+                    Search results powered by <a target="_blank" href="https://npmsearch.com/">npmsearch.com</a>
                 </div>
             </div>
         );


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