Commit 6478b74b by Muhammad Usman

js fix

parent 5fc0d451
Pipeline #577 failed with stage
in 0 seconds
...@@ -543,8 +543,11 @@ function vq_lms_settings_field_courselist_cb($args) ...@@ -543,8 +543,11 @@ function vq_lms_settings_field_courselist_cb($args)
mediaUploader.on('select', function () { mediaUploader.on('select', function () {
attachment = mediaUploader.state().get('selection').first().toJSON(); attachment = mediaUploader.state().get('selection').first().toJSON();
var str = attachment.url; var url = attachment.url;
var url = str.replace("http://", "https://"); if (document.location.hostname.indexOf('https://') !== -1) {
url = url.replace("http://", "https://");
}
jQuery("#vq_lms_courselist_hidden").val(url); jQuery("#vq_lms_courselist_hidden").val(url);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment