Ajustes visuais no comportamento da função de mostrar/ocultar a sidebar
This commit is contained in:
@@ -57,6 +57,10 @@
|
||||
function getAllowedTopMessageOrigin() {
|
||||
const candidates = [];
|
||||
|
||||
if (window.top === window) {
|
||||
return getSafeTargetOrigin();
|
||||
}
|
||||
|
||||
try {
|
||||
const referrerOrigin = document.referrer
|
||||
? new URL(document.referrer).origin
|
||||
@@ -76,10 +80,6 @@
|
||||
// ancestorOrigins is browser-specific and may be unavailable.
|
||||
}
|
||||
|
||||
if (window.top === window) {
|
||||
candidates.push(getSafeTargetOrigin());
|
||||
}
|
||||
|
||||
for (const origin of candidates) {
|
||||
if (ALLOWED_TOP_MESSAGE_ORIGINS.has(origin)) {
|
||||
return origin;
|
||||
|
||||
Reference in New Issue
Block a user