最新消息:阿啰哈,本人90后,目前单身,欢迎妹子们来撩!.(。→‿←。) 微信:frank01991

把浏览器当作临时记事本、编辑器

新建一个浏览器窗口在里面打字,可以当作简单的 notepad 用,比如临时记点东西什么的,这样不必每次开 Notes/TextEdit/Vi/Evernote 之类的工具了。(小技巧来自:One line browser notepad
打开浏览器,在地址栏里敲入下面这行:

data:text/html, <html contenteditable> 

如果稍微美化调整一下并修改浏览器标题栏的话:

data:text/html, <title>Notepad</title>
<body contenteditable style="font-size:2rem;line-height:1.4;max-width:60rem;
margin:0 auto;padding:4rem;"> 

可以把上面代码保存到书签,这样就不必每次复制粘贴上面的代码了
Ruby 代码高亮的编辑器

data:text/html, <style type=%22text/css%22>#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id=%22e%22></div><script src=%22http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js%22 type=%22text/javascript%22 charset=%22utf-8%22></script><script>var e=ace.edit(%22e%22);e.setTheme(%22ace/theme/monokai%22);e.getSession().setMode(%22ace/mode/ruby%22);</script>

Python编辑器

data:text/html, <style type=%22text/css%22>#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id=%22e%22></div><script src=%22http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js%22 type=%22text/javascript%22 charset=%22utf-8%22></script><script>var e=ace.edit(%22e%22);e.setTheme(%22ace/theme/monokai%22);e.getSession().setMode(%22ace/mode/python%22);</script>

PHP编辑器

data:text/html, <style type=%22text/css%22>#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id=%22e%22></div><script src=%22http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js%22 type=%22text/javascript%22 charset=%22utf-8%22></script><script>var e=ace.edit(%22e%22);e.setTheme(%22ace/theme/monokai%22);e.getSession().setMode(%22ace/mode/php%22);</script>

JavaScript编辑器

data:text/html, <style type=%22text/css%22>#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id=%22e%22></div><script src=%22http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js%22 type=%22text/javascript%22 charset=%22utf-8%22></script><script>var e=ace.edit(%22e%22);e.setTheme(%22ace/theme/monokai%22);e.getSession().setMode(%22ace/mode/javascript%22);</script>

java编辑器

data:text/html, <style type=%22text/css%22>#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id=%22e%22></div><script src=%22http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js%22 type=%22text/javascript%22 charset=%22utf-8%22></script><script>var e=ace.edit(%22e%22);e.setTheme(%22ace/theme/monokai%22);e.getSession().setMode(%22ace/mode/java%22);</script>

C/C++编辑器

data:text/html, <style type=%22text/css%22>#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id=%22e%22></div><script src=%22http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js%22 type=%22text/javascript%22 charset=%22utf-8%22></script><script>var e=ace.edit(%22e%22);e.setTheme(%22ace/theme/monokai%22);e.getSession().setMode(%22ace/mode/c_cpp%22);</script>

编辑内容时,自动变换背景颜色;停止后变换白色。

data:text/html, <html><head><link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'><style type="text/css"> html { font-family: "Open Sans" } * { -webkit-transition: all linear 1s; }</style><script>window.onload=function(){var e=false;var t=0;setInterval(function(){if(!e){t=Math.round(Math.max(0,t-Math.max(t/3,1)))}var n=(255-t*2).toString(16);document.body.style.backgroundColor="#ff"+n+""+n},1e3);var n=null;document.onkeydown=function(){t=Math.min(128,t+2);e=true;clearTimeout(n);n=setTimeout(function(){e=false},1500)}}</script></head><body contenteditable style="font-size:2rem;line-height:1.4;max-width:60rem;margin:0 auto;padding:4rem;">

可把这些链接作为浏览器书签收藏

转载请注明:林志斌 » 把浏览器当作临时记事本、编辑器

发表评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址