Last active
September 4, 2020 22:17
-
-
Save Envl/9cdc9faeeb44ce3fbd5e650f11d7dde1 to your computer and use it in GitHub Desktop.
get flomo21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Flomo21 | |
// @version 0.1 | |
// @description Dark mode support for flomo.app | |
// @author GnimOay | |
// @match https://flomo.app/* | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const url='https://gist.githubusercontent.com/Envl/21b26a2f8de99ff4d188215aaccb8ff3/raw'; | |
fetch(url).then(rsp=>rsp.text()).then(csstxt=>{ | |
let s = document.createElement('style'); | |
s.setAttribute('type', 'text/css'); | |
s.appendChild(document.createTextNode(csstxt)) | |
document.querySelector('head').appendChild(s); | |
console.log('Inserted Flomo21, enjoy :\)'); | |
}) | |
const input=document.querySelector('.input'); | |
if(input){ | |
setTimeout(()=>{ | |
input.style.width=document.querySelector('.memos').clientWidth+2+'px'; | |
console.log('updated input width') | |
},1000) | |
} | |
window.onresize=()=>{ | |
const input=document.querySelector('.input'); | |
if(input){ | |
input.style.width=document.querySelector('.memos').clientWidth+2+'px'; | |
console.log('updated input width') | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment