We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f0d3532 + 8a40131 commit 56d5fa3Copy full SHA for 56d5fa3
1 file changed
jquery.ziptastic.js
@@ -18,7 +18,13 @@
18
requests[country] = {};
19
}
20
if(!requests[country][zip]) {
21
- requests[country][zip] = $.getJSON(location.protocol + '//zip.getziptastic.com/v2/' + country + '/' + zip);
+ var protocol = '';
22
+ if (location.protocol == 'file:') {
23
+ protocol = 'https://';
24
+ } else {
25
+ protocol = location.protocol;
26
+ }
27
+ requests[country][zip] = $.getJSON(protocol + '//zip.getziptastic.com/v2/' + country + '/' + zip);
28
29
30
// Bind to the finished request
0 commit comments