Skip to content

Instantly share code, notes, and snippets.

@Envl
Last active September 4, 2020 22:17
Show Gist options
  • Save Envl/9cdc9faeeb44ce3fbd5e650f11d7dde1 to your computer and use it in GitHub Desktop.
Save Envl/9cdc9faeeb44ce3fbd5e650f11d7dde1 to your computer and use it in GitHub Desktop.
get flomo21
// ==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