-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.js
More file actions
18 lines (16 loc) · 735 Bytes
/
setup.js
File metadata and controls
18 lines (16 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
document.addEventListener('DOMContentLoaded', function() {
const setupLinkContainer = document.getElementById('setup-link-container');
const setupLink = document.getElementById('setup-link');
// Check if the link has already been clicked or if the user has visited the settings page
chrome.storage.local.get(['setupLinkClicked'], function(result) {
if (result.setupLinkClicked) {
setupLinkContainer.style.display = 'none';
}
});
// Set up event listener for the link
setupLink.addEventListener('click', function() {
// Hide the link and store that it has been clicked
setupLinkContainer.style.display = 'none';
chrome.storage.local.set({ setupLinkClicked: true });
});
});