Permalink
Browse files

Support HTTPS

Use a protocol-less URL to call service which determines accept language. Thus we avoid any security warnings when this plugin is used on a page served using HTTPS.
  • Loading branch information...
kasperg committed May 22, 2013
1 parent 63f6978 commit 48e0812289702134c4795d88e6e00da8782dce2b
Showing with 2 additions and 2 deletions.
  1. +2 −2 jquery.browserLanguage.js
@@ -23,7 +23,7 @@
$.browserLanguage = function(callback){
var language;
$.ajax({
url: "http://ajaxhttpheaders.appspot.com",
url: "//ajaxhttpheaders.appspot.com",
dataType: 'jsonp',
success: function(headers) {
language = headers['Accept-Language'].substring(0,2);
@@ -135,4 +135,4 @@
"zh": "Chinese"
}
})(jQuery);
})(jQuery);

0 comments on commit 48e0812

Please sign in to comment.