Coder Social home page Coder Social logo

ngduyanh / darkpdf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arshsb/darkpdf

0.0 0.0 0.0 6.55 MB

a simple and convenient Chrome Extension that enables dark mode for PDF viewing in Google Chrome

Home Page: https://chrome.google.com/webstore/detail/darkpdf/cfemcmeknmapecneeeaajnbhhgfgkfhp

License: GNU General Public License v3.0

HTML 16.87% JavaScript 73.75% CSS 9.38%

darkpdf's Introduction

DarkPDF - dark mode for PDFs in Google Chrome

Sample image - 2

General information

I use Chrome's native PDF viewer a lot, especially during the night. As an avid dark mode user, I was disappointed to learn that Chrome does not have a built-in dark mode feature. So I decided to dip my toes into the world of Chrome extensions and implement my own dark mode feature for PDF viewing. This is the result.

The extension is very simple. Here is the interface (please excuse the design):

Sample image - 1

Have the PDF open in an active tab on Chrome, then simply click the extension icon to turn the dark mode on or off.

The extension also offers automatic dark mode. While the feature is on, anytime you visit a PDF during your web browsing, dark mode will automatically be applied without needing to click the extension icon for maximum convenience. Automatic preference will be synced to user's Google account if logged in, otherwise it will only be synced locally.

To use this extension on local PDF files, you will have to give DarkPDF manual access to file URLs. Simply go to the Extensions tab on Chrome, click "Details" under DarkPDF, and turn on "Allow access to file URLs".

Here is a demo:

Sample video

Note: Although this extension is specifically for native PDF viewing in Chrome, it may also enable dark mode for other uses (websites like Stack Overflow or Youtube for example). However, results are not guaranteed. Additonally, automatic dark mode only works for native Chrome PDF documents and may not work for embedded PDF files on a website.

How to install

Simply install the extension via the Chrome Web Store here

You can also add the extension manually. Download this repository as a ZIP file, extract it to a folder and load it unpacked to your Chrome browser.

Here are the instructions in details.

Feedback

I hope this extension will be as useful to you as it has been to me. If you encounter any bugs, issues or you have feedback in general, please feel free to leave a ticket in the issues section of this repository!

Built with

  • Chrome Extensions API - build your own Chrome extensions using their powerful library
  • Vanilla JavaScript - for working with the API
  • HTML / CSS - for extension interface

Attributions

darkpdf's People

Contributors

arshsb 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.