Coder Social home page Coder Social logo

arshsb / darkpdf Goto Github PK

View Code? Open in Web Editor NEW
36.0 1.0 7.0 7.24 MB

a convenient Chrome Extension that enables dark mode for PDF documents

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

License: GNU General Public License v3.0

HTML 25.53% JavaScript 73.13% CSS 1.35%

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:

Sample image - 1

Have the PDF open in an active tab on Chrome, then simply click the extension icon or use the keyboard shortcut 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. Additionally, you have the option to choose 3 different intensities of the dark mode.

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

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

Attributions

darkpdf's People

Contributors

arshsb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

darkpdf's Issues

Help Making it darker

hey man, awesome extension, it made me start looking into js, ive been trying to change the border to black so it all looks black, do you think it can be done? i tried messing with your code a bit but i can only change the full color of the page, no success in making it custom made, do you think it is possible? , thanks for your work.

Add instructions

I request you to add instructions to allow access to file URLs as without that local pdfs are not being darkened.
I really appreciate your effort for making this addon.

Is it expected to work on MacOS?

Hi, I could not get it to work on MacOS. When I click on the DarkPDF icon, only the instructions appear and even Ctrl-Shift-9 or Cmd-Shift-9 does not seem to work on PDF documents opened within Chrome.

Border around darkened PDF

This is a really cool addon, thanks a lot for making it!
It could further add to the experience if the color of the background where the PDF pages are placed on were configurable. Same for the options bar at the top of the PDF viewer, both are in a rather bright gray that stands out a bit much compared to the pitch black PDF pages.

Download PDF with the dark mode

Hey @ArshSB, congrats for the amazing extension, I'm enjoying a lot!

I would like to know if there is any way to download the PDF with the Dark Mode? I tried a lot of things, but none of them worked.

Thanks in advance for your answer!

Dark Mode turns off with tab change

I've been using the extension for about an hour now and I noticed that when I switch between multiple tabs in Chrome the "automatically turn dark mode on" doesn't seem to be working as intended i.e. I have a white background when I switch back. I'm more than willing to try and help out with this project and try to figure out how to help if you could point me in some direction as I've never worked with chrome extensions before.

Download darkened PDF

It would be cool if you could add a feature with which you can download the new darkened PDF.

Source code seemingly outdated

It seems, the source code on GitHub has not been updated, along with updates to the add-on on Google Chrome.
The last push was in Sep 22, while the add-on was updated in Sep 23.

I want to modify the code to allow the background to be dark, and I would like to get the source code to the updated version of the add-on. Thanks

Keeps glitching, little unstable

it turns the dark mode on and off randomly, very quickly too, u switch to another tab and when u come back less than 30 seconds later its back the way it was before, white.

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.