Not working anymore ?
-
please try with updated version .
Not working.
You can check the menu in header “Dark mode” in this website ticonnect .net
I’m trying to add onclick=”toggleLight() in order to let users turn into dark or light mode.
Script used :
<script src=”https://cdn.jsdelivr.net/npm/darkreader@4.9.2/darkreader.js” integrity=”sha256-ESc/02WWPMS6nHR51aorY6avazveX90YL/h6tca4GQo=” crossorigin=”anonymous”></script>
<script>
var light = false;function toggleLight() {
if(!light){
DarkReader.enable({
brightness: 100,
contrast: 90,
sepia: 10
});
light = true;
}else{ //this will only be executed once
DarkReader.disable();
light = false;
}
}
</script>your script source is not correct
https://cdn.jsdelivr.net/npm/darkreader@4.9.2/darkreader.js” integrity=”sha256-ESc/02WWPMS6nHR51aorY6avazveX90YL/h6tca4GQo=you can simply try
https://cdn.jsdelivr.net/npm/darkreader@4.9.2/darkreader.js
-
This reply was modified 5 years, 10 months ago by
Rohit Kumar.
I did that, not working again
`<script src=”https://cdn.jsdelivr.net/npm/darkreader@4.9.2/darkreader.js” crossorigin=”anonymous”></script>
<script>
var light = false;function toggleLight() {
if(!light){
DarkReader.enable({
brightness: 100,
contrast: 90,
sepia: 10
});
light = true;
}else{ //this will only be executed once
DarkReader.disable();
light = false;
}
}
</script>use
<script src=”https://cdn.jsdelivr.net/npm/darkreader@4.9.2/darkreader.js”></script>
Same problem.
Feature that I want to add :
https://github.com/darkreader/darkreader#using-for-a-websiteBut want I want to add, is an item in menu to let users turn on/off the dark mode.
I really appreciate your help since I’m not a coder.
I think you need a developer to do this job.
this plugin can trigger functions already present in your site
if you want to share more detail ping me on skype opal_rohit
thanksThank you for your help
-
This reply was modified 5 years, 10 months ago by
The topic ‘Not working anymore ?’ is closed to new replies.