GithubHelp home page GithubHelp logo

Firefox version about darkness HOT 11 CLOSED

liorgrossman avatar liorgrossman commented on August 20, 2024
Firefox version

from darkness.

Comments (11)

raywhui avatar raywhui commented on August 20, 2024 2

Hi! This is my first time contributing to an open source project, so I may not know all the rules to helping out.

So I did manage to get the Darkness Developer Edition to run on Mozilla (v 58.0.2 as of writing this). The process was very straight forward and didn't require a lot of changes to the code to get it to work. The only significant changes that were made was changing any instance of chrome.storage.sync to chrome.storage.local in js/user-settings.js and js/user-stats.js. There apparently is a way to get chrome.storage.sync to work, but requires a GUID provided by Mozilla that is blocklisted for some reason.

Also any instance of chrome-extension:// in the CSS files needs to be changed to moz-extension://, otherwise the icon doesn't appear.

There are also a few errors that occur mainly in manifest.json, but do not affect the extension's functionality:

  • background.persistent is not currently supported, but will automatically run as true regardless.
  • options.page is not a property of WebExtension.
  • In the debugger, sometimes an error pops up asking the user to change "chrome_style" to "browser_style". There doesn't seem to be any difference between the two.

Here's an image showing that it does work:
darkness_mozilla

Hope this helps!

from darkness.

liorgrossman avatar liorgrossman commented on August 20, 2024

Hey Bodo.

Porting Darkness for Firefox might not be very difficult, since it supports WebExtensions.

However, we haven't seen a lot of demand for it (very few people asked for Firefox support over the course of 1.5 years).

Since websites' CSS change frequently, Darkness requires frequent updates to the various skins (15+ websites).
I think having every commit in the project tested and verified to work with both Firefox and Chrome would make things harder. @theme1256 - what do you think?

from darkness.

bitboxer avatar bitboxer commented on August 20, 2024

Maybe separating the css files from the releases might help with this?

from darkness.

theme1256 avatar theme1256 commented on August 20, 2024

Usually, websites use the same frontend and then it doesn't matter what browser it is, but som of the sites we skin, I'm not sure about.

I might be more work for some of the skins and we might have the go through and find all the -webkit code, because, as far as I remember, Mozilla created their own CSS system called moz, but they might support webkit.

It's a good idea since a lot of devs is moving back to FireFox, now that it has gotten a lot better and Chrome is ups and downs.

from darkness.

bitboxer avatar bitboxer commented on August 20, 2024

I just scrolled through the hits when searching for "-webkit" here and I think it should work. You are using "-webkit-filter" a lot with the inverse filter. According to the mozilla documentation this is supported with the "-webkit" namespace. See here for details.

from darkness.

liorgrossman avatar liorgrossman commented on August 20, 2024

Yes, Firefox Quantum is pretty damn good, and I saw many people giving Firefox a try lately.
In any case, we use SCSS (and not pure CSS), so we can use mixins to add browser vendor prefix, or even use something like this: https://github.com/postcss/autoprefixer
I'm still not sure it will work out of the box, since FIrefox and Chrome handle CSS rules differently and aren't 100% compatible.

Might be worth a try and just seeing just how many errors/problems occur. It might prove to be harder or easier than expected. Unfortunately, I'm over-capacity to do this port at the moment, but I'll support this kind of port if you wish to pursue it, and help with any questions you may have.

from darkness.

liorgrossman avatar liorgrossman commented on August 20, 2024

A good first step might be just trying to load the "chrome-extension" directory it into Firefox and see if it works, possibly creating a copy of the existing manifest file.

from darkness.

liorgrossman avatar liorgrossman commented on August 20, 2024

Thanks for investigating this @raywhui!
Great to see Darkness working inside Firefox Quantum.
Seems like most of the changes are relatively minor.
I just saw your pull request, will reply there shortly:
#72

from darkness.

liorgrossman avatar liorgrossman commented on August 20, 2024

Hey guys, thanks again for your help.
I just added Firefox support to Darkness. It might not be perfect, but it's a start.
Running gulp ff will copy and transform the chrome-extension directory to firefox-extension, which you could load from Firefox.
I have added instructions in the README and CONTRIBUTING docs.

from darkness.

heatr216 avatar heatr216 commented on August 20, 2024

Not sure it matters but I would absolutely love a Firefox version in the Extensions "store" like Chrome has. I have to use Firefox at work to avoid having my Google account managed by my organization. Therefore, I lose out on Darkness in Chrome for my own gmail/facebook. Using FF Quantum, I miss the extension. Just my two-cents. LOVE the Chrome version. Thank you.

from darkness.

wsalopek avatar wsalopek commented on August 20, 2024

I'm transitioning over to Firefox (over perceived privacy concerns) and would love to use Darkness Pro with Firefox. I've read the above posts...but can't find the "README" and "CONTRIBUTING" docs.

(I swear, no matter how many times I try to use the Github website, there is, to me, something SO confusing and unintuitive that I find it extremely difficult to find anything.).

Anyway, help appreciated....thanks.

from darkness.

Related Issues (20)

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.