From 626f081b70175c2d57d1efd4dfc15cb8eab3297a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Fr=C3=BChsch=C3=BCtz?= Date: Wed, 17 Aug 2022 10:41:22 +0200 Subject: [PATCH] remove syntax artifacts --- blue-infinity-blocker.php | 85 ++++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 41 deletions(-) diff --git a/blue-infinity-blocker.php b/blue-infinity-blocker.php index f3225f9..b721194 100644 --- a/blue-infinity-blocker.php +++ b/blue-infinity-blocker.php @@ -1,57 +1,60 @@ . -*/ + * Blue Infinity Blocker — A plugin that acts as a measure against Metas newest habit of injecting custom tracking JS into in-app browser sessions. + * Copyright (C) 2022 Maximilian Frühschütz + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // Source for implementation: https://krausefx.com/blog/ios-privacy-instagram-and-facebook-can-track-anything-you-do-on-any-website-in-their-in-app-browser add_action('wp_head', 'blb_fake_tracker_available'); -function blb_fake_tracker_available() { +function blb_fake_tracker_available() +{ // Let Meta think that their tracker is already installed - ?> - +?> + - -'; - - + const originalEventListener = document.addEventListener + document.addEventListener = function(a, b) { + if (b.toString().indexOf("messageHandlers.fb_getSelection") > -1) { + return null; + } + return originalEventListener.apply(this, arguments); + } + + +