Skip to content

Commit

Permalink
Merge pull request #68 from mgax/fix-safari-window-external
Browse files Browse the repository at this point in the history
Fix Safari JS error accessing `window.external`
  • Loading branch information
Stormheg authored Dec 14, 2023
2 parents 62b2ba2 + 844947c commit ced8a81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wagtail_ab_testing/static/wagtail_ab_testing/js/tracker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function() {
// Check if Do Not Track is enabled
if (window.doNotTrack || navigator.doNotTrack || navigator.msDoNotTrack || 'msTrackingProtectionEnabled' in window.external) {
if (window.doNotTrack || navigator.doNotTrack || navigator.msDoNotTrack) {
if (window.doNotTrack == '1' || navigator.doNotTrack == 'yes' || navigator.doNotTrack == '1' || navigator.msDoNotTrack == '1' || 'msTrackingProtectionEnabled' in window.external && window.external.msTrackingProtectionEnabled()) {
// Don't track this browser
return;
Expand Down

0 comments on commit ced8a81

Please sign in to comment.