1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-22 06:57:53 +00:00
Files
matomo/plugins/Morpheus/templates/_iframeBuster.twig
Michal Kleiner e97295791f Allow to optionally defer JS from custom layout templates (#20809)
* Allow to optionally defer JS from custom layout templates

* Use DOMContentLoaded event in iframeBuster

* Use DOMContentLoaded event in piwikHelper

* Remove posting of Matomo.afterInitialVueEntryProcess event

* Tweak mechanism to wait for jQuery to be available

* Remove superfluous anonymous function

* Remove waiting for jQuery as it should be ready when DOMContentLoaded is triggered

* Remove jQuery dependency from iframe buster

* Use `var` instead of `const` in iframe buster

* Add replace pattern to keep defer attribute while supporting cache busting param

* Move less specific defer line after more specific chunked files defer line

* Remove defer option when assets are not merged as not relevant there

Using the defer attribute when assets are not merged can cause order-related issues.

* Correctly handle URLs with query params using defer

Co-authored-by: Stefan Giehl <stefan@matomo.org>

---------

Co-authored-by: Stefan Giehl <stefan@matomo.org>
2023-06-22 16:15:43 +02:00

11 خطوط
316 B
Twig

{% if (enableFrames is defined and enableFrames == false) %}
<script type="text/javascript">
if (self !== top) {
var theBody = document.getElementsByTagName('body')[0];
theBody.style.display = 'none';
top.location = self.location;
}
</script>
{% endif %}