Publica versión definitiva de Seguimiento de Impuestos GLM
This commit is contained in:
+43
@@ -10,6 +10,49 @@
|
||||
/>
|
||||
<meta name="author" content="GomezLee Marketing" />
|
||||
<meta name="theme-color" content="#4F758B" />
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<script>
|
||||
(() => {
|
||||
const navigationKey = "glm-tax-oauth-navigation-v3";
|
||||
const refreshKey = "__glm_auth_fresh";
|
||||
|
||||
const hasOAuthResult = () => {
|
||||
const hash = new URLSearchParams(window.location.hash.replace(/^#/, ""));
|
||||
return (
|
||||
hash.has("access_token") ||
|
||||
hash.has("refresh_token") ||
|
||||
hash.has("error") ||
|
||||
hash.has("error_description")
|
||||
);
|
||||
};
|
||||
|
||||
const forceFreshDocument = () => {
|
||||
let pending = false;
|
||||
try {
|
||||
pending = Boolean(sessionStorage.getItem(navigationKey));
|
||||
} catch {
|
||||
pending = false;
|
||||
}
|
||||
|
||||
if (!pending || !hasOAuthResult()) return;
|
||||
|
||||
const url = new URL(window.location.href);
|
||||
if (url.searchParams.has(refreshKey)) return;
|
||||
|
||||
// Este parámetro se agrega DESPUÉS de volver de Supabase. Por eso no
|
||||
// forma parte de redirect_to ni requiere una URL nueva en EasyPanel.
|
||||
url.searchParams.set(refreshKey, String(Date.now()));
|
||||
window.location.replace(url.toString());
|
||||
};
|
||||
|
||||
forceFreshDocument();
|
||||
window.addEventListener("pageshow", (event) => {
|
||||
if (event.persisted) forceFreshDocument();
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
<meta property="og:title" content="Seguimiento de Impuestos GLM" />
|
||||
<meta
|
||||
property="og:description"
|
||||
|
||||
Reference in New Issue
Block a user