Giter Site home page Giter Site logo

botnarvladimir / chrome-extension Goto Github PK

View Code? Open in Web Editor NEW

This project forked from masa-finance/chrome-extension

0.0 0.0 0.0 3.05 MB

Masa Chrome Extension

Home Page: https://masa.finance

JavaScript 2.38% TypeScript 64.69% CSS 8.08% HTML 2.07% SCSS 22.78%

chrome-extension's Introduction

Masa Chrome Extension ๐ŸŒโœจ

Welcome to the repository for the Masa Chrome Extension! This extension is specifically designed to interact with Twitter web pages, enabling campaign managers to track when a user follows another user directly from the Twitter interface. Additionally, it empowers users to monetize their browsing data and participate in quests and campaigns on the Masa zk-Data Network.

Features

Twitter Follow Button Tracking ๐Ÿฆ๐Ÿ–ฑ๏ธ

Our extension is fine-tuned to listen for click events specifically on Twitter's "Follow" button. This allows campaign managers to gather valuable data on user engagement.

  • Targets and tracks clicks on Twitter's "Follow" button, identified by the class .css-1rynq56 and additional classes r-bcqeeo r-qvutc0.
  • Collects details such as the button's tag name, ID, class names, and the text content (trimmed to the first 100 characters) to ensure we capture the essence of the interaction without compromising user privacy.
  • Records the current URL and the exact timestamp of the interaction, providing a comprehensive dataset for campaign tracking.

URL Change Detection ๐Ÿ”—

The extension keeps an eye on URL changes to detect when a user navigates to a new Twitter profile or refreshes their feed, ensuring that every follow action is accounted for.

  • Employs MutationObserver to watch for DOM changes that signal page navigation.
  • Captures popstate and hashchange events to maintain accurate tracking across different types of URL updates.

Seamless Background Communication ๐Ÿ“ก

Utilizes Chrome's runtime.sendMessage to relay captured data to the background script, ensuring that every follow action is logged for campaign analysis.

Permission Configuration ๐Ÿ› ๏ธ๐Ÿ”’

Before the extension can start tracking, it requires the user to grant permission. This is a one-time setup that needs to be done by setting a flag in the localStorage of the browser.

  • The user must set a specific permission flag in localStorage to activate tracking features.
  • This permission ensures that the user is aware of and consents to the tracking behavior of the extension.

Permissions and Manifest Configuration ๐Ÿ› ๏ธ

  • Requires permissions for activeTab, scripting, webNavigation, and storage.
  • Needs host permissions for all URLs (<all_urls>) to track follow actions across the entire Twitter domain.
  • Sets up a background service worker (background.js) to handle asynchronous data processing.
  • Injects content.js into Twitter web pages post-load to start tracking without delay.

Upcoming Features ๐Ÿšง

  • User Interface for Permission Granting: We are planning to build a user-friendly interface where users can easily grant permissions to the extension. This will streamline the process and enhance the user experience.
  • Monetization and Participation in Quests: Users will be able to monetize their browsing data and engage in various quests and campaigns through the Masa zk-Data Network, leveraging zero-knowledge proofs to maintain privacy.

Installation

To get started with the extension, clone this repository and load it as an unpacked extension in Chrome. Remember to set the permission in localStorage as mentioned above to enable the tracking features.

Contributing

We welcome contributions! If you have suggestions or find a bug, please feel free to submit pull requests or open issues.

Thank you for exploring the Masa Chrome Extension, your go-to tool for Twitter campaign tracking and participating in the Masa zk-Data Network! ๐Ÿš€๐ŸŽฏ

chrome-extension's People

Contributors

hide-on-bush-x avatar teslashibe avatar aaronknott avatar dependabot[bot] avatar h34d avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.