We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f0d3532 commit 8a40131Copy full SHA for 8a40131
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