32 lines
725 B
JavaScript
Vendored
32 lines
725 B
JavaScript
Vendored
function marhunPhotoCapturerReloadHttpsFactory() {
|
|
|
|
return {
|
|
|
|
reload: function reload() {
|
|
|
|
const params = new Proxy(new URLSearchParams(window.location.search), {
|
|
get: (searchParams, prop) => searchParams.get(prop),
|
|
});
|
|
|
|
const isCameraActivate = params.isCameraActivate;
|
|
const locationProtocol = location.protocol;
|
|
|
|
if (isCameraActivate == 'true' && locationProtocol == 'https:') {
|
|
return;
|
|
}
|
|
|
|
if (locationProtocol == 'https:') {
|
|
return;
|
|
}
|
|
|
|
new_location = new URL(location);
|
|
new_location.protocol = "https:";
|
|
new_location.searchParams.append('isCameraActivate', 'true')
|
|
window.location.replace(new_location);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|