File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ export function removeCloudflareEmailProtection ( document , possibleEmail ) {
2+ const placeholder = 'EMAIL_PLACEHOLDER' ;
3+ const replaceWith = `(email protected, possibly ${ placeholder } )` ;
4+
5+ const emails = document . querySelectorAll ( '.__cf_email__' ) ;
6+
7+ emails . forEach ( email => {
8+ email . outerHTML = replaceWith ;
9+ } ) ;
10+
11+ // These make the fetching stable, sometimes it displays the email and sometimes
12+ // it doesn't. In both cases we want to show the "email protected" text.
13+ document . body . innerHTML = document . body . innerHTML . replaceAll ( '[\\[email protected\\]](https://about.gitlab.com/cdn-cgi/l/email-protection)' , replaceWith ) ;
14+ document . body . innerHTML = document . body . innerHTML . replaceAll ( possibleEmail , replaceWith ) ;
15+ document . body . innerHTML = document . body . innerHTML . replaceAll ( placeholder , possibleEmail . toLowerCase ( ) ) ;
16+ }
Original file line number Diff line number Diff line change 44 "terms" : {
55 "Privacy Policy" : {
66 "fetch" : " https://about.gitlab.com/privacy/" ,
7- "select" : [
8- " .privacy"
9- ],
7+ "select" : " main .content" ,
108 "remove" : [
119 " #collapsible-sidebar" ,
1210 " .header-anchor"
11+ ],
12+ "filter" : [
13+ {
14+ "removeCloudflareEmailProtection" : " DPO@gitlab.com"
15+ }
1316 ]
1417 },
1518 "Vulnerability Disclosure Policy" : {
1922 ],
2023 "remove" : [
2124 " .breadcrumb"
25+ ],
26+ "filter" : [
27+ {
28+ "removeCloudflareEmailProtection" : " security@gitlab.com"
29+ },
30+ {
31+ "removeCloudflareEmailProtection" : " Security@gitlab.com"
32+ }
2233 ]
2334 },
2435 "Terms of Service" : {
You can’t perform that action at this time.
0 commit comments