Coder Social home page Coder Social logo

shivansh-bhatnagar18 / dark-patterns-recognition Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nicholastung/dark-patterns-recognition

0.0 0.0 0.0 1.49 MB

Chrome extension to recognize dark pattern text. Winner of Teenhacks LI Fall 2019

License: GNU General Public License v3.0

JavaScript 66.06% Python 23.09% CSS 8.25% HTML 2.59%

dark-patterns-recognition's Introduction

Dark Patterns Recognition (Insite)

Overall Winner of TeenHacks LI Fall 2019

Insite is a Chrome extension that detects and highlights dark patterns on shopping websites. It reads text on product pages of shopping websites, then identifies and classifies dark pattern text. These potential dark patterns are then highlighted, with a popup that identifies and explains the category that a given dark pattern belongs to.

This project would have been completely impossible without the paper Dark Patterns at Scale: Findings from a Crawl of 11K Shopping Websites (Mathur et al.). We are especially grateful for their dataset of dark pattern strings that was used to train our classifier, and their page segmentation algorithm, which broke down webpages into meaningful blocks of text. Most importantly, the work that they did informed us of the existence of these dark patterns and helped us become more aware of the online landscape, especially when shopping.

logo

Store page with identified dark patterns highlighted in yellow

Dark Patterns?

Dark patterns are design tricks used to influence the way users interact with software. While some dark patterns are harmless, like emphasizing signup buttons with color, others can be more malicious in problematic. In the context of online stores, dark patterns can be used to nudge buyers into buying items they might not need. For further information on dark patterns, check out this website. Created by the man who coined the term β€˜dark patterns,’ the site will teach you how to recognize the different kinds of dark patterns you may encounter.

Tech Stack

The Chrome Extension front-end that scrapes the active web page is written in Javascript. For the back-end, a Python server running Flask interfaces Bernoulli Naive Bayes models to classify tokens of text sent to it. To train these algorithms, datasets from Princeton University researchers along with manually annotated datasets were used.

Installation

To begin installation, first clone this repository, or download and unzip it.

Install and run the Flask app backend by navigating to api, installing required libraries, and running app.py with Python

Install the Chrome extension:

  1. Navigate to chrome://extensions
  2. Enable "Developer mode" by toggling the switch at the top right of the page
  3. Click the "Load unpacked" button.
  4. Navigate to the repository directory, and select the folder app for installation
  5. Ensure that the extension is enabled, and if so, the extension has been successfully installed!

Reference

Mathur, A., Acar, G., Friedman, M. J., Lucherini, E., Mayer, J., Chetty, M., & Narayanan, A. (2019). Dark Patterns at Scale: Findings from a Crawl of 11K Shopping Websites. Proceedings of the ACM on Human-Computer Interaction, 3(CSCW), 81.

dark-patterns-recognition's People

Contributors

nicholastung avatar unknown avatar jarjar1028 avatar shivansh-bhatnagar18 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.