Skip to content

Instantly share code, notes, and snippets.

知乎精选

{{#classes}}  

『{{{featured_title}}』 {{#featured_items}}   『{{question_name}}』

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div style="min-width:600px;margin:0 auto;padding: 39px;font-family:'Helvetica Neue',Helvetica,Arial,Sans-serif;font-size:13px;line-height:22px;background-color:#f5f5f5;" marginheight="0" marginwidth="0">
<table border="0" cellspacing="0" cellpadding="0" width="552" style="border:1px solid #dedede;border-bottom:2px solid #dedede;margin:0 auto;background-color:#ffffff;">
<tbody>
<!-- title -->
<tr>
<td align="center" style="padding:30px 25px 30px;">
<div style="font-size:13px;">
<a style="float:left;color:#bbb;text-decoration:none;border:none;outline:none;" href="{{#ZH_TRACKING_URL}}http://www.zhihu.com{{/ZH_TRACKING_URL}}">去知乎</a>
<span style="float:right;color:#bbb;" >第 {{issue_num}} 期</span>
@tlxue
tlxue / gist:2374779
Created April 13, 2012 07:21
ArrayRandomShuffle
function shuffle(array) {
var tmp, current, top = array.length;
if(top) while(--top) {
current = Math.floor(Math.random() * (top + 1));
tmp = array[current];
array[current] = array[top];
array[top] = tmp;
}
(function(){
var topic_names = ['摄影','阅读','设计','电子商务','投资','电影','音乐','法律','旅行','美食','游戏','历史','文学','篮球','创业','自然科学','健康','情感','冷知识','互联网','商业','体育','汽车','教育'],
urls = [];
function request(url){
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", url, false );
xmlHttp.send( null );
@tlxue
tlxue / gist:2182601
Created March 24, 2012 13:10
kidnapping
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript">
var ct = 0,
m_u = "http://xtxtg.netally.cn/southeast1.html",
l = "",
p_w = 343,
@tlxue
tlxue / gist:1976317
Created March 5, 2012 03:32
Stylebot CSS
.nfTagB_sec {border-top: none !important;background: none !important;padding: 2px 0
!important;}.left_nav .user_atten {margin: 0 0 0 11px
!important;}.send_weibo .kind {padding: 5px 0 10px
!important;}.send_weibo .kind a {text-indent: -9999px !important;margin: 0 10px 0 0 !important;padding: 2px 0 2px 10px
!important;}.left_nav .user_atten li {margin: 0 5px 0 0
!important;}.B_index .feed_lists {margin-top: 10px
!important;}.W_main {width: 750px
!important;}.W_main_bg {min-height: 1000px
!important;}#wbim_box {right: 0
!important;}.left_nav {border: none
@tlxue
tlxue / gist:1949122
Created March 1, 2012 11:07
HTML Format for <p>s
function HTML_format(original_HTML){
var o = original_HTML,
match;
o = o.replace(/<p><\/p>/g,'')
// todo: replace div block inside div block, now we only deal with one-layer nesting
// method: a,b find bs see if the one before is a, if it is. eliminate them both
o = o.replace(/^(<p>)+/g,'');
@tlxue
tlxue / gist:1799567
Created February 11, 2012 14:09
some problems
#calendar tr td {
width:150px;
height:75px;
border-top:#23dd3d solid 0px;
border-left:#23dd3d solid 0px;
border-right:#23dd3d solid 1px;
border-bottom:#23dd3d solid 1px;
position:relative;
zoom:1;
background-color:#FFFFFF;
@tlxue
tlxue / gist:1619973
Created January 16, 2012 09:24
Rfsh Btn
.notice {
display: block;
background-color: #E1F0F7;
text-align: center;
margin: 10px 0;
padding: 4px 10px;
border-radius: 4px;
color: #777;
text-shadow: 0 1px 0 #fff;
text-decoration: none !important;
@tlxue
tlxue / gist:1599791
Created January 12, 2012 10:38
HTML Format
function HTML_format(original_HTML){
var o = original_HTML,
match;
o = o.replace(/<div><\/div>/g,'')
// todo: replace div block inside div block, now we only deal with one-layer nesting
// method: a,b find bs see if the one before is a, if it is. eliminate them both
o = o.replace(/^(<div>)+/g,'');