-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprivacyControl.js
32 lines (27 loc) · 1.17 KB
/
privacyControl.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
function updatePrivacy() {
const urlParams = new URLSearchParams(window.location.search);
const hideContacts = urlParams.get('hideContacts') === 'true';
const contacts = document.querySelector('.contacts');
const platformLinks = document.querySelectorAll('.job-title a');
if (hideContacts) {
// Hide contacts section
contacts.style.display = 'none';
// Replace links with their text content
platformLinks.forEach(link => {
const platformName = link.textContent;
const textNode = document.createTextNode(platformName);
link.parentNode.insertBefore(textNode, link);
link.remove();
});
// Add privacy notice
const notice = document.createElement('div');
notice.className = 'privacy-notice';
notice.textContent = 'Contact information removed because of platform rules';
notice.style.color = '#666';
notice.style.fontStyle = 'italic';
notice.style.margin = '10px 0';
contacts.parentNode.insertBefore(notice, contacts.nextSibling);
}
}
document.addEventListener('DOMContentLoaded', updatePrivacy);
window.updatePrivacy = updatePrivacy;