-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tabtracker #47
base: main
Are you sure you want to change the base?
Add tabtracker #47
Conversation
@ayaangrover is attempting to deploy a commit to the Hack Club Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please see comments
async function loadRules() { | ||
const response = await fetch(chrome.runtime.getURL('rules.json')); | ||
const rules = await response.json(); | ||
|
||
// Remove existing rules before adding new ones | ||
const ruleIds = rules.map(rule => rule.id); | ||
chrome.declarativeNetRequest.updateDynamicRules({ | ||
removeRuleIds: ruleIds, | ||
addRules: rules | ||
}, () => { | ||
if (chrome.runtime.lastError) { | ||
console.error("Error loading rules:", chrome.runtime.lastError); | ||
} else { | ||
console.log("Rules loaded successfully"); | ||
} | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does it do? and why do you need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part of the code loads the websites that can be accessed by the students. I put the list in a separate file because I'm planning to add a feature to the dashboard where the teacher can change the sites the students can access(like for a different class, you might need to have canva open)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Keep working on it then
{ | ||
"id": 1, | ||
"condition": { | ||
"urlFilter": "harker.org", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume these are websites that are automatically tracked? What if someone wants to change the rules or remove some?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, these are the websites that the students can open - all others are blocked. When on one of these domains, any part of the website accessed is sent to the database and is visible to the teacher on the dashboard. I'm planning to add the feature to the teacher dashboard soon where the teacher can change the allowed urls - right now its just a pre-set list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll approve and merge this once the project is validated (that is, you've got people who actually want to use this) and completed
Project Details
TabTracker
(Give your best estimate)
12
(Provide a brief description of the functionality or innovation)
My teacher doesn't like computers because he thinks AI will be used on projects. He's fine with computers as long as we can write essays in Word offline, but has no way to make sure we don't use AI and go offline again. This will help him do that.
(We recommend at least 3)
9
(Your extension must be compatible with both browsers)
Yes, as far as I have tested.
Additional Comments
(Feel free to provide any additional context or notes here)
This currently goes through a replit node server. I'm going to use Nest for this if it's approved.