Skip to content
This repository was archived by the owner on Apr 10, 2020. It is now read-only.

Commit cdcc30c

Browse files
committed
Fixed https http problems (#18)
1 parent 2bea368 commit cdcc30c

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

src/jquery.svgmagic.js

+19-10
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
1010
* Mark van Eijk [[email protected]] Improvements to PHP converter script
1111
12-
Version 2.4.4
12+
Version 2.4.5
1313
1414
---
1515
@@ -194,16 +194,17 @@
194194
dumpcache: false,
195195

196196
// Replacements for deprecated options
197-
temporaryHoldingImage: null,
198-
forceReplacements: false,
199-
handleBackgroundImages: false,
200-
additionalRequestData: {},
201-
postReplacementCallback:null,
197+
temporaryHoldingImage: null,
198+
forceReplacements: false,
199+
handleBackgroundImages: false,
200+
additionalRequestData: {},
201+
postReplacementCallback:null,
202202

203-
// New options
204-
remoteServerUri: 'http://svgmagic.bitlabs.nl/converter.php',
205-
remoteRequestType: 'POST',
206-
remoteDataType: 'jsonp',
203+
// New options
204+
remoteServerUri: 'http://bitlabs.nl/svgmagic/converter.php',
205+
remoteRequestType: 'POST',
206+
remoteDataType: 'jsonp',
207+
207208
// TODO: Implement this option
208209
replacementUriCreator: null
209210
},
@@ -220,6 +221,14 @@
220221
svgDataUri = /^data:image\/svg\+xml/,
221222
holdingImageTimeoutDuration = 500;
222223

224+
/**
225+
* Check if the remoteServerUri has to be replaced with https
226+
*/
227+
if(window.location.protocol == "https:" || options.additionalRequestData.secure)
228+
{
229+
options.remoteServerUri = options.remoteServerUri.replace("http://", "https://");
230+
}
231+
223232
/**
224233
* The place where all magic starts
225234
*/

0 commit comments

Comments
 (0)