Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

pdf dark

function toggle() {
    let q = document.querySelectorAll('#nightify')
    if(q.length) {
        q[0].parentNode.removeChild(q[0])
        return false
    }
    var h = document.getElementsByTagName('head')[0],
        s = document.createElement('style');
    s.setAttribute('type', 'text/css');
    s.setAttribute('id', 'nightify');
    s.appendChild(document.createTextNode('html{-webkit-filter:invert(100%) hue-rotate(180deg) contrast(70%) !important; background: #fff;} .line-content {background-color: #fefefe;}'));
    h.appendChild(s); 
    return true
}

toggle()
Comment

PREVIOUS NEXT
Code Example
Javascript :: get screen width javascript 
Javascript :: angular command to create interceptor 
Javascript :: jquery on load button click 
Javascript :: javascript for each key in object 
Javascript :: Math prime js 
Javascript :: javascript int with commas 
Javascript :: disable mouse right click javascript 
Javascript :: js switch case greater than 
Javascript :: node open file 
Javascript :: regrex for password 
Javascript :: req.body empty mongodb 
Javascript :: on load of jquery 
Javascript :: jquery disable form element 
Javascript :: how to get data from another website in javascript 
Javascript :: line break in react 
Javascript :: how to create a .js file in windows command prompt code 
Javascript :: chart js y axis integer 
Javascript :: filter special characters javascript 
Javascript :: react native status bar 
Javascript :: javascript object to json 
Javascript :: set html value javascript 
Javascript :: get filename from url js 
Javascript :: get image url in react input file or preview form image 
Javascript :: javascript create uuid 
Javascript :: get attribute href 
Javascript :: js format urcurency 
Javascript :: javascript redirect to homepage 
Javascript :: react form on submit 
Javascript :: cypress set viewport for all test cases 
Javascript :: if statement es6 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =