mirror of
https://github.com/webxoss/webxoss-client.git
synced 2025-02-07 05:53:38 +01:00
fix no redirect on firefox
This commit is contained in:
parent
114df895aa
commit
47ea4fc3fc
2 changed files with 3 additions and 3 deletions
|
@ -54,7 +54,7 @@
|
||||||
function handleSender() {
|
function handleSender() {
|
||||||
if (localStorage.getItem('migrated')) {
|
if (localStorage.getItem('migrated')) {
|
||||||
// already migrated, redirect to https
|
// already migrated, redirect to https
|
||||||
return location.protocol = 'https:'
|
return location.href = location.href.replace(/^http:/, 'https:')
|
||||||
}
|
}
|
||||||
window.addEventListener('message', function (event) {
|
window.addEventListener('message', function (event) {
|
||||||
var origin = event.origin || event.originalEvent.origin;
|
var origin = event.origin || event.originalEvent.origin;
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
// get stored signal, done
|
// get stored signal, done
|
||||||
if (event.data === 'stored') {
|
if (event.data === 'stored') {
|
||||||
localStorage.setItem('migrated', true)
|
localStorage.setItem('migrated', true)
|
||||||
return location.protocol = 'https:'
|
return location.href = location.href.replace(/^http:/, 'https:')
|
||||||
}
|
}
|
||||||
}, false)
|
}, false)
|
||||||
iframe.src = 'https://' + location.host + '/migrate.html'
|
iframe.src = 'https://' + location.host + '/migrate.html'
|
||||||
|
|
|
@ -45,4 +45,4 @@ background/loading.gif
|
||||||
NETWORK:
|
NETWORK:
|
||||||
*
|
*
|
||||||
|
|
||||||
# 2016/03/05 18:03
|
# 2016/03/05 22:37
|
||||||
|
|
Loading…
Reference in a new issue