-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
195 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# System files | ||
# ------------ | ||
|
||
.DS_Store | ||
|
||
# CSS files | ||
# --------------- | ||
|
||
*.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.wm-boycott, | ||
section[data-ct-context="dossier-fussball-wm"] | ||
{ | ||
display: none !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.wm-boycott, | ||
section[data-area="block>widget>WM 2022 Widget"], | ||
div[data-area="block>topic:fußball-wm_in_katar"], | ||
section[data-area="block>topic:fußball-wm_in_katar"], | ||
section[data-area="block>topic:weltmeisterschaft_in_katar"], | ||
div[data-area="block>sportdaten"] | ||
{ | ||
display: none !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.wm-boycott{display:none !important} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.wm-boycott, | ||
div[data-pym-src^="https://embed.dpa-sportslive.com"] | ||
{ | ||
display: none !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.wm-boycott, | ||
section[data-ct-context="dossier-fussball-wm"], | ||
.wm-ticker, | ||
{ | ||
display: none !important; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const selectors = [ | ||
'article', | ||
'.o-ModuleWrapper', | ||
'.lay-MegaMenu_SubsectionItem' | ||
] | ||
|
||
searchAndHide(selectors, regex); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const keywords = [ | ||
'WM', | ||
'WM-Auftakt', | ||
'WM-Premiere', | ||
'Weltmeisterschaft', | ||
'Fußball-WM', | ||
'Fußball-Weltmeisterschaft', | ||
'FIFA', | ||
'Katar', | ||
'Qatar', | ||
'Katars', | ||
'Qatars', | ||
'Katarer', | ||
'Qatarer', | ||
'Infantino', | ||
'Nationalmannschaft', | ||
'DFB-Elf' | ||
]; | ||
|
||
const regexPattern = '(^|\\W)(' + keywords.join('|') + ')($|\\W)'; | ||
const regex = new RegExp(regexPattern); | ||
|
||
function searchAndHide(selectors, regex) { | ||
|
||
const nodes = document.querySelectorAll(selectors.join(',')); | ||
nodes.forEach(node => { | ||
const found = node.innerText.match(regex); | ||
|
||
if(found) { | ||
node.classList.add('wm-boycott'); | ||
} | ||
}); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const selectors = [ | ||
'article', | ||
'div[data-component="SwiperBar"] .swiper-slide', | ||
'.swiper-wrapper .swiper-slide', | ||
'div[data-area^="block>podlove"]', | ||
'div[data-component="AudioPlayerPlaceholderOmny"]', | ||
'div[data-area="block>margin_column_top"] li', | ||
'div[data-area="block>shortnews:nachrichten_in_kürze"] li' | ||
]; | ||
|
||
searchAndHide(selectors, regex); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const selectors = [ | ||
'nav li', | ||
'#sz-newspilot .newsscannermodule__item', | ||
'.sz-pilot li', | ||
'.sz-teaserlist-element', | ||
'.mediabanderole__swiper-wrapper .teaser-item', | ||
'.related-links__container .related-links__item' | ||
]; | ||
|
||
searchAndHide(selectors, regex); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const selectors = [ | ||
'article', | ||
'section', | ||
'#mainMenuPanel li', | ||
'footer ul li' | ||
] | ||
|
||
searchAndHide(selectors, regex); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const selectors = [ | ||
'.zon-teaser-lead__kicker', | ||
'.zon-teaser-standard', | ||
'.zon-teaser-wide', | ||
'section[data-ct-context="headed-sport"] li', | ||
'section[data-ct-context="newsticker"] .newsteaser', | ||
'.nav__tags a', | ||
'.sticky-nav__list li', | ||
'.newsletter-signup', | ||
'.zon-teaser-kpi-table', | ||
] | ||
|
||
searchAndHide(selectors, regex); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"manifest_version": 3, | ||
"name": "WM-Boykott", | ||
"version": "1.0", | ||
"description": "Verbirgt News-Artikel über die Fußballweltmeisterschaft 2022 in Katar auf deutschen News-Websites.", | ||
|
||
"content_scripts": [ | ||
{ | ||
"js": [ | ||
"js/main.js", | ||
"js/faz.js" | ||
], | ||
"css": [ | ||
"css/faz.css" | ||
], | ||
"matches": [ | ||
"https://*.faz.net/*" | ||
] | ||
}, | ||
{ | ||
"js": [ | ||
"js/main.js", | ||
"js/spiegel.js" | ||
], | ||
"css": [ | ||
"css/spiegel.css" | ||
], | ||
"matches": [ | ||
"https://*.spiegel.de/*" | ||
] | ||
}, | ||
{ | ||
"js": [ | ||
"js/main.js", | ||
"js/sz.js" | ||
], | ||
"css": [ | ||
"css/sz.css" | ||
], | ||
"matches": [ | ||
"https://*.sueddeutsche.de/*" | ||
] | ||
}, | ||
{ | ||
"js": [ | ||
"js/main.js", | ||
"js/tagesspiegel.js" | ||
], | ||
"css": [ | ||
"css/tagesspiegel.css" | ||
], | ||
"matches": [ | ||
"https://*.tagesspiegel.de/*" | ||
] | ||
}, | ||
{ | ||
"js": [ | ||
"js/main.js", | ||
"js/zeit.js" | ||
], | ||
"css": [ | ||
"css/zeit.css" | ||
], | ||
"matches": [ | ||
"https://*.zeit.de/*" | ||
] | ||
} | ||
], | ||
|
||
"icons": { | ||
"16": "images/icon-16.png", | ||
"32": "images/icon-32.png", | ||
"48": "images/icon-48.png", | ||
"64": "images/icon-64.png", | ||
"128": "images/icon-128.png" | ||
} | ||
} |