xStyle | A user styles manager for Firefox and Chrome | Browser Plugin library
kandi X-RAY | xStyle Summary
kandi X-RAY | xStyle Summary
A style manager for your browser. Built on the WebExtensions APIs. You can get this extension from Mozilla Add-ons and Chrome Webstore. But if you want to stay up-to-date with the latest developments, you should install our self-distributed version. For more documentation, please visit the wiki.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of xStyle
xStyle Key Features
xStyle Examples and Code Snippets
Community Discussions
Trending Discussions on xStyle
QUESTION
I am trying to change the stylesheet of my page through a javascript function. It does work at first, but after 2 clicks the variable defining the non-active stylesheet gets stuck on the "dark" value.
I would be very grateful if I received support from this amazing community. ^^
Here you have both the page and the source code:
Link: https://jadeblink.netlify.app
HTML
...ANSWER
Answered 2020-May-02 at 14:43There's something wrong in your logic.
Using if(otherstyle="dark")
won't compare it, as you need to use ==
to compare, or ===
for a strict comparison.
Apart from that, if you're setting it to light
, it will enter your next if
condition, restoring it to dark
, so you need to use an else if
for the second condition.
This should do the trick:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install xStyle
Download WebExt-build-tool and configure it.
Download WebExt-build-tool and configure it
The config of xStyle is like this:
Run node build.js xstyle
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page