-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent.js
31 lines (23 loc) · 935 Bytes
/
content.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
// content.js
// Log a message when the script runs
console.log('GFG RightBar Hider script injected and running');
// Function to hide the rightBar
function hideRightBar() {
const rightBar = document.querySelector('.rightBar');
const leftBar = document.querySelector('.leftBar');
if (rightBar) {
rightBar.style.display = 'none'; // Hide the rightBar
}
if (leftBar) {
// Set the leftBar to take up the full available width
leftBar.style.flexBasis = '100%';
leftBar.style.maxWidth = '100%';
// leftBar.style.minWidth = '100%';
}
setTimeout(hideRightBar, 1000);
}
// Initial attempt to hide the rightBar
hideRightBar();
// Log the current URL to make sure the script is targeting the right page
console.log('Current URL:', window.location.href);
// ------------------------------------------------------------------------------------------------------------------