Giter VIP home page Giter VIP logo

mediapart-mod's Introduction

Mediapart ModChrome Web StoreMozilla Add-on

Mediapart-mod

Modifie mediapart.fr et blogs.mediapart.fr pour une meilleure expérience!

Features

  • Thème sombre: inverse les couleurs pour une luminosité réduite
  • Lecture zen: l'affichage des articles est épuré et centré, pour limiter les distractions. Le contenu additionnel est déplacé en dessous du contenu principal.
  • Lecture sur une page par défaut
  • Raccourcis clavier: pour naviguer uniquement au clavier (retour vers la Une, passage à la page suivante) et contrôler les features de l'application. Voir la page d'options de l'extension pour tous les détails et la possibilité de reconfigurer les touches.

Usage

You can download the extension on the Chrome webstore for all chromium based browsers, and on the Mozilla store for Firefox. If you don't want to go through a store, a pre-built version is located in this repo at /dist/{browser}

Building the extension

All the source code is present in this repository. You need Node & npm (or Yarn). It's been tested on node 20.11.0 and npm 10.2.4.

First, install the node_modules:

npm install

Then run the build script:

npm run build

The build script does three things:

  1. (prebuild) Download the css from mediapart.fr and transform it to get a css file that contains the dark theme (in src/generateCSS/styles.json)
  2. (build) Build with webpack & babel the content script and the background script, and copy the manifest.json into /dist/[chrome||firefox].
  3. (postbuild) zip the extension with web-ext and output it in /dist/[chrome||firefox]/mediapart_mod-x.x.x.zip

Development

Once the repo is cloned and the node_modules are installed, there are two things to work on.

CSS generation

The dark theme is generated procedurally. The following command launches the generation:

npm run gen-css

Browser extension

Install the extension locally on your browser of choice, using either dist/chrome or dist/firefox.

mediapart-mod's People

Contributors

apollinaire avatar

Stargazers

 avatar

Watchers

 avatar  avatar

mediapart-mod's Issues

section "lire aussi": mauvaise position de la fleche rouge

les fleches sont des background image, insérées avec un background . Il y a aussi un background-position qui les positionne correctement.
En theme clair, la background-position est au dessus du background
en theme sombre, le background est au dessus de la background-position et donc l'annule.

Possibles solutions:

  1. remettre tout le css (simple mais lourd)
  2. filtrer les property plus finement, pour ne garder que les couleurs (complexe, léger, mais peut ne pas couvrir tous les cas)
  3. transformer les shorthand (background) en leur équivalent de couleur background-color (complexe ++, léger, peut gérer tous les cas)

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.