Sha256: e73797509e59bd78ac30ef3b51b29829428152a227f7ec1118b3d1079a499cbf
Contents?: true
Size: 815 Bytes
Versions: 16
Compression:
Stored size: 815 Bytes
Contents
//= require ./app_bridge_redirect.js //= require ./app_bridge_utils_3.1.1.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-utils']; 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
16 entries across 16 versions & 1 rubygems