Sha256: f112a3b9d6c9d5fcc4d1d0a55742918cf59c37fce065fb8580496b30227d4bf6
Contents?: true
Size: 782 Bytes
Versions: 13
Compression:
Stored size: 782 Bytes
Contents
//= require ./app_bridge_redirect.js (function () { function redirect() { var redirectTargetElement = document.getElementById("redirection-target"); if (!redirectTargetElement) { return; } var targetInfo = JSON.parse(redirectTargetElement.dataset.target); var appBridgeUtils = window['app-bridge']['utilities']; if (appBridgeUtils.isShopifyEmbedded()) { window.appBridgeRedirect(targetInfo.url); } else { window.top.location.href = targetInfo.url; } } document.addEventListener("DOMContentLoaded", redirect); // In the turbolinks context, neither DOMContentLoaded nor turbolinks:load // consistently fires. This ensures that we at least attempt to fire in the // turbolinks situation as well. redirect(); })();
Version data entries
13 entries across 13 versions & 2 rubygems