Follow one of these links to view the different stages of the project:
- Non-Bootstrap
- Non-Bootstrap Adjustable
- Non-Bootstrap Adjustable No svg file
- Non-Bootstrap Adjustable No svg or CSS file
- Non-Bootstrap standalone javascript file
- HTML
Installation Options
To use the latest version of the project on any webpage, you can use the following code:
-
Via Tampermonkey (most flexible way): Install Daltonism Color Adaptation overlay
P.S.: you need to have tapemonkey already installed in you browser for this link to trigger it.
If this is not the case, you can download it here: https://www.tampermonkey.net/
-
Via the javascript console:
- Via bookmark:javascript:(function(){ /*This is to enable persistent settings during your navigation throughout the website your are visiting*/ localStorage.setItem(window.daltonismFilterContent.daltonismUseLocalStorageName, "true"); const script = document.createElement('script'); script.src = '/non-bootstrap-daltonian-standalone/js/daltonism.js'; document.head.appendChild(script); } )();
function injectDaltonianScript(scriptUrl) { /*This is to enable persistent settings during your navigation throughout the website your are visiting*/ localStorage.setItem(window.daltonismFilterContent.daltonismUseLocalStorageName, "true"); const script = document.createElement('script'); script.src = scriptUrl; script.async = true; script.onload = function() { console.log('Color adaptation script loaded successfully'); }; script.onerror = function() { console.error('Error loading color adaptation script'); }; document.head.appendChild(script); }; injectDaltonianScript('/non-bootstrap-daltonian-standalone/js/daltonism.js');
-
By manually editing the html and pasting this line at the end of the body tag:
<script type="text/JavaScript" src="/non-bootstrap-daltonian-standalone/js/daltonism.js">/*This is to enable persistent settings during your navigation throughout the website your are visiting*/localStorage.setItem(window.daltonismFilterContent.daltonismUseLocalStorageName, "true");</script>