Earlier quoted context omitted.
They are loaded when you re-open the extension by the looks of it.
Doesn't work for me - seems I am doing something wrong. I open a tab, write something, close the tab. I open a fresh tab - no text. I'd expect that the written text would show up.
Turn your browser into a notepad with one line
141–150 of 186 posts
Re: Turn your browser into a notepad with one line
#142For even more fun, turn your notepad into an interactive JavaScript environment: data:text/html, Then you can upgrade it by pasting in something like this: this.onkeyup = function () { this.style.backgroundColor = 'white'; try { eval(this.innerText); } catch (e) { this.style.backgroundColor = '#FFAAAA'; } }
Is there an equivalent to `this.onkeyup` for touch devices that don't generate onkeyup events? Trying to make this work on an iPad, but I only have surface knowledge of JS.
window.setInterval(function(){eval(this.innerText)},1000);Re: Turn your browser into a notepad with one line
#143Re: Turn your browser into a notepad with one line
#144Ah shoot. If Chrome allowed localStorage to be accessible from file:/// then we could add save (CTRL+S) and automatic load using this: data:text/html, window.onload=function(){var a=document.body;a.innerText=localStorage.mydoc;a.addEventListener("keydown",function(b){b.ctrlKey&&83==b.which&&(localStorage.mydoc=a.innerHTML,b.preventDefault())},!1)}; Firefox will save it to localStorage but clear the local storage afte…
Re: Turn your browser into a notepad with one line
#145Ah shoot. If Chrome allowed localStorage to be accessible from file:/// then we could add save (CTRL+S) and automatic load using this: data:text/html, window.onload=function(){var a=document.body;a.innerText=localStorage.mydoc;a.addEventListener("keydown",function(b){b.ctrlKey&&83==b.which&&(localStorage.mydoc=a.innerHTML,b.preventDefault())},!1)}; Firefox will save it to localStorage but clear the local storage afte…
Re: Turn your browser into a notepad with one line
#146After some mix-and-matching of the awesome code snippets posted in the comments, I came up with something easy on the eyes (with a nice little color transition (for webkit-enabled browsers): data:text/html, http://fonts.googleapis.com/css?family=Lato:100,200,300,400,... rel='stylesheet' type='text/css'> html { font-family: "Lato"; color:#e9e9e9; background-color:#222; } * { -webkit-transition: all linear 1s; }
Here's a version that can be copy/pasted: data:text/html, html { font-family: "Lato"; color:#e9e9e9; background-color:#222; } * { -webkit-transition: all linear 1s; }
data:text/html, html { font-family: "Lato"; color:#e9e9e9; background-color:#222; } * { -webkit-transition: all linear 1s; }NotesRe: Turn your browser into a notepad with one line
#147The nicest thing about this is that you can CTRL+S save it as a .html file, and then you can also CTRL+O load the file and it's still editable, and save it again!
Also, HOW to open an existing file while retaining 'contenteditable' mode? Everything I try alters the URL field, so returning the browser to standard display-only mode.
Re: Turn your browser into a notepad with one line
#148Re: Turn your browser into a notepad with one line
#149So discovering that 'by accident' web browsers can act as a simple (but huge, bloated and feature-starved) text editor seems like a big deal.
Personally I keep a simple, tiny, old freeware editor called Editpad 3.4, on every PC I use, accessed via desktop shortcut and 'right-click send-to'.
Re: Turn your browser into a notepad with one line
#150Earlier quoted context omitted.
That is so cool :). I just slapped together a (really) simple chrome ext for opening up a new tab in "contenteditable" mode. It saves the contents into localStorage, thats it for now :) Here it is if anyones interested https://github.com/jwaterfaucett/textpad
Made it a chrome extension for an easier install. https://chrome.google.com/webstore/detail/textpad/edopaieiod...