其实一般弄前端是用不着直接跟DOM打交道的……
但renren-markdown偏偏就需要动态操作CSS,于是就需要操作DOM的style对象…… 问题很快就来了。
javascript的习惯:lowerCamelCase为主,UpperCamelCase和FULL_CAPS为辅……
css的习惯:padding-right: 0.5em;
因此用javascript来操作padding-right就应该写作:
其实一般弄前端是用不着直接跟DOM打交道的……
但renren-markdown偏偏就需要动态操作CSS,于是就需要操作DOM的style对象…… 问题很快就来了。
javascript的习惯:lowerCamelCase为主,UpperCamelCase和FULL_CAPS为辅……
css的习惯:padding-right: 0.5em;
因此用javascript来操作padding-right就应该写作:
感觉挺有意思的~
off topic: captcha=NNNB
If you have a small (small!) library or tool that does exactly what you need, that you understand inside and out, then you know if your needs change slightly you can get in there and make adjustments without pacing back and forth for a new release. If you have an epiphany about how to further automate things or how to solve difficult cases you didn't think were possible, then you can code up those improvements. Maybe they don't always work out, but you can at least try the experiments.
| 时间:2013-3-11 10:26 | |
| 地点:清华大学紫荆11号楼 | |
| 本地IP:59.66.192.143 | |
| 操作系统:Windows8 | |
| Tracing route to 166.111.8.28 over a maximum of 30 hops | |
| 1 <1 ms <1 ms <1 ms 192.168.11.1 | |
| 2 <1 ms <1 ms <1 ms 59.66.192.1 | |
| 3 <1 ms <1 ms <1 ms 118.229.2.161 |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <cdtprojectproperties> | |
| <section name="org.eclipse.cdt.internal.ui.wizards.settingswizards.IncludePaths"> | |
| <language name="holder for library settings"> | |
| </language> | |
| <language name="Assembly"> | |
| <includepath>${KEIL}\ARM\INC</includepath> | |
| <includepath>${KEIL}\ARM\Startup</includepath> | |
| <includepath>${KEIL}\ARM\RV31\INC</includepath> |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>兵庫北 VS 埼玉</title> | |
| <style type="text/css"></style> | |
| </head> | |
| <body> | |
| <p>A站已被使徒入侵,请耐心等待战争结束!……Thank♂you♂sir!</p> | |
| <p> | |
| 若想和猴子签订契约成为战斗力,请移步 |
| @echo off | |
| echo NOTE: Run with administer rights! | |
| echo. | |
| :: set this to whatever gdb throws at you (between `c:` and `\go`) | |
| set FAKE_GOROOT="\Users\ADMINI~1\AppData\Local\Temp\2\bindist357622851" | |
| c: | |
| if not exist %FAKE_GOROOT% ( | |
| mkdir %FAKE_GOROOT% > nul |
| package main | |
| var S = "abc" | |
| var I int32 = 10000 | |
| func main() { | |
| go print(I) | |
| s := S | |
| print(s) | |
| print(S) |
| rrmd |
| // Copyright (c) 2013, smilekzs. (MIT Licensed) | |
| // ==UserScript== | |
| // @name renren-markdown | |
| // @namespace http://github.com/smilekzs | |
| // @version 1.0.0 | |
| // @description Powerful markdown-based editor for blog.renren.com | |
| // @grant GM_xmlhttpRequest | |
| // @match *://blog.renren.com/blog/*Blog* | |
| // @match *://blog.renren.com/blog/*edit* | |
| // @match *://blog.renren.com/*Entry* |