Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add tabtracker #47

wants to merge 1 commit into from

Conversation

ayaangrover
Copy link

@ayaangrover ayaangrover commented Nov 2, 2024

Project Details

  1. What is the name of your project?
    TabTracker
  2. How many hours did you spend developing this?
    (Give your best estimate)
    12
  3. What problem does your extension solve, or what makes it unique?
    (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.
  4. How many people have tested your extension?
    (We recommend at least 3)
    9
  5. Does your extension work in both Chrome and Firefox?
    (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.

Copy link

vercel bot commented Nov 2, 2024

@ayaangrover is attempting to deploy a commit to the Hack Club Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Collaborator

@JosiasAurel JosiasAurel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see comments

Comment on lines +52 to +68
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");
}
});
}
Copy link
Collaborator

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?

Copy link
Author

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)

Copy link
Collaborator

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",
Copy link
Collaborator

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?

Copy link
Author

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.

Copy link
Collaborator

@JosiasAurel JosiasAurel left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants