Skip to content

Commit

Permalink
Merge pull request #28 from joncrangle/ft.com
Browse files Browse the repository at this point in the history
Add Ft.com
  • Loading branch information
mms-gianni authored Nov 12, 2023
2 parents 84a173a + 190de6d commit 4d5c25c
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion ruleset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,24 @@
x-forwarded-for: none
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
content-security-policy: script-src 'self';
cookie:
cookie:
- domain: www.ft.com
headers:
referer: https://t.co/x?amp=1
injections:
- position: head
append: |
<script>
document.addEventListener("DOMContentLoaded", () => {
const styleTags = document.querySelectorAll('link[rel="stylesheet"]');
styleTags.forEach(el => {
const href = el.getAttribute('href').substring(1);
const updatedHref = href.replace(/(https?:\/\/.+?)\/{2,}/, '$1/');
el.setAttribute('href', updatedHref);
});
setTimeout(() => {
const cookie = document.querySelectorAll('.o-cookie-message, .js-article-ribbon, .o-ads, .o-banner, .o-message, .article__content-sign-up');
cookie.forEach(el => { el.remove(); });
}, 1000);
})
</script>

0 comments on commit 4d5c25c

Please sign in to comment.