I just tested this and this does indeed work to convert the values to https:// with the url.
However, I haven’t tested it with the slider. If you upload your code here I can take a look and find a way to make it work (if the above approach doesn’t work).