From 310bfec6a1c9ffd9080a9e4dea84816e42908df4 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 8 Dec 2023 12:06:34 -0500 Subject: [PATCH] Remove obsolete web accessible resources --- src/js/redirect-resources.js | 11 ---- .../addthis_widget.js | 39 -------------- .../ligatus_angular-tag.js | 29 ----------- src/web_accessible_resources/monkeybroker.js | 43 ---------------- .../mxpnl_mixpanel.js | 51 ------------------- 5 files changed, 173 deletions(-) delete mode 100644 src/web_accessible_resources/addthis_widget.js delete mode 100644 src/web_accessible_resources/ligatus_angular-tag.js delete mode 100644 src/web_accessible_resources/monkeybroker.js delete mode 100644 src/web_accessible_resources/mxpnl_mixpanel.js diff --git a/src/js/redirect-resources.js b/src/js/redirect-resources.js index e2856f61e2644..b8577e3701fcf 100644 --- a/src/js/redirect-resources.js +++ b/src/js/redirect-resources.js @@ -48,9 +48,6 @@ export default new Map([ alias: '32x32-transparent.png', data: 'blob', } ], - [ 'addthis_widget.js', { - alias: 'addthis.com/addthis_widget.js', - } ], [ 'amazon_ads.js', { alias: 'amazon-adsystem.com/aax2/amzn_ads.js', data: 'text', @@ -116,14 +113,6 @@ export default new Map([ } ], [ 'hd-main.js', { } ], - [ 'ligatus_angular-tag.js', { - alias: 'ligatus.com/*/angular-tag.js', - } ], - [ 'mxpnl_mixpanel.js', { - } ], - [ 'monkeybroker.js', { - alias: 'd3pkae9owd2lcf.cloudfront.net/mb105.js', - } ], [ 'nobab.js', { alias: [ 'bab-defuser.js', 'prevent-bab.js' ], data: 'text', diff --git a/src/web_accessible_resources/addthis_widget.js b/src/web_accessible_resources/addthis_widget.js deleted file mode 100644 index 8212ab5c3b39a..0000000000000 --- a/src/web_accessible_resources/addthis_widget.js +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - - uBlock Origin - a browser extension to block requests. - Copyright (C) 2019-present Raymond Hill - - 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 {http://www.gnu.org/licenses/}. - - Home: https://github.com/gorhill/uBlock -*/ - -(function() { - 'use strict'; - const noopfn = function() { - }; - window.addthis = { - addEventListener: noopfn, - button: noopfn, - counter: noopfn, - init: noopfn, - layers: noopfn, - ready: noopfn, - sharecounters: { - getShareCounts: noopfn - }, - toolbox: noopfn, - update: noopfn - }; -})(); diff --git a/src/web_accessible_resources/ligatus_angular-tag.js b/src/web_accessible_resources/ligatus_angular-tag.js deleted file mode 100644 index 5f4ab65f3a0f6..0000000000000 --- a/src/web_accessible_resources/ligatus_angular-tag.js +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - - uBlock Origin - a browser extension to block requests. - Copyright (C) 2019-present Raymond Hill - - 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 {http://www.gnu.org/licenses/}. - - Home: https://github.com/gorhill/uBlock -*/ - -(function() { - 'use strict'; - self.adProtect = true; - Object.defineProperties(window, { - uabpdl: { value: true }, - uabDetect: { value: true } - }); -})(); diff --git a/src/web_accessible_resources/monkeybroker.js b/src/web_accessible_resources/monkeybroker.js deleted file mode 100644 index c121d52935d25..0000000000000 --- a/src/web_accessible_resources/monkeybroker.js +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - - uBlock Origin - a browser extension to block requests. - Copyright (C) 2019-present Raymond Hill - - 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 {http://www.gnu.org/licenses/}. - - Home: https://github.com/gorhill/uBlock -*/ - -(function() { - 'use strict'; - const noopfn = function() { - }; - window.pbjs = { libLoaded: true }; - const mb = window.MonkeyBroker || { - addAttribute: noopfn, - addSlot: function(a) { - this.slots[a.slot] = {}; - }, - defineSlot: noopfn, - fillSlot: noopfn, - go: noopfn, - inventoryConditionalPlacement: noopfn, - registerSizeCallback: noopfn, - registerSlotCallback: noopfn, - slots: {}, - version: '' - }; - mb.regSlotsMap = mb.slots; - window.MonkeyBroker = mb; -})(); diff --git a/src/web_accessible_resources/mxpnl_mixpanel.js b/src/web_accessible_resources/mxpnl_mixpanel.js deleted file mode 100644 index 1eb8045014219..0000000000000 --- a/src/web_accessible_resources/mxpnl_mixpanel.js +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - - uBlock Origin - a browser extension to block requests. - Copyright (C) 2021-present Raymond Hill - - 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 {http://www.gnu.org/licenses/}. - - Home: https://github.com/gorhill/uBlock -*/ - -(function() { - 'use strict'; - // https://developer.mixpanel.com/docs/javascript-full-api-reference - const mixpanel = { - get_distinct_id() { - return ''; - }, - init(t, cfg) { - if ( cfg instanceof Object === false ) { return; } - if ( 'loaded' in cfg === false ) { return; } - if ( cfg.loaded instanceof Function === false ) { return; } - cfg.loaded(); - }, - register() { - }, - register_once() { - }, - track() { - const cb = Array.from(arguments).pop(); - if ( cb instanceof Function === false ) { return; } - cb(); - }, - }; - const q = self.mixpanel && self.mixpanel._i || []; - self.mixpanel = mixpanel; - for ( const i of q ) { - if ( Array.isArray(i) === false ) { continue; } - mixpanel.init(...i); - } -})();