Skip to content

Commit

Permalink
Rework /popular sites
Browse files Browse the repository at this point in the history
  • Loading branch information
mat committed Nov 24, 2015
1 parent e382b7d commit 1e9e99d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 50 deletions.
4 changes: 2 additions & 2 deletions besticon/iconserver/assets/assets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions besticon/iconserver/assets/popular.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ <h2 class="content-subhead">Icon Examples</h2>
<thead>
<tr>
<th>Site</th>
<th>64</th>
<th>120</th>
<th>40</th>
<th>80</th>
<th>{{$.IconSize}}</th>
<th>&nbsp;</th>
</tr>
</thead>
{{range $url := .URLs}}
<tr class='icon'>
<td>{{$url}}</td>
<td align='center'><img src="/icon?url={{$url}}&amp;size=64" alt='' style='max-width: 32px'></td>
<td align='center'><img src="/icon?url={{$url}}&amp;size=120" alt='' style='max-width: 60px'></td>
<td align='center'><img src="/icon?url={{$url}}&amp;size=40" alt='' style='max-width: 20px'></td>
<td align='center'><img src="/icon?url={{$url}}&amp;size=80" alt='' style='max-width: 40px'></td>
<td align='center'><img src="/icon?url={{$url}}&amp;size={{$.IconSize}}" alt='' style='max-width: {{$.DisplaySize}}px'></td>
<td><a href="/icons?url={{$url}}">Details</a></td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion besticon/iconserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func iconHandler(w http.ResponseWriter, r *http.Request) {
func popularHandler(w http.ResponseWriter, r *http.Request) {
iconSize, err := strconv.Atoi(r.FormValue("iconsize"))
if iconSize > 1000 || iconSize < 10 || err != nil {
iconSize = 180
iconSize = 120
}

pageInfo := struct {
Expand Down
43 changes: 0 additions & 43 deletions besticon/popular_sites.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,104 +6,61 @@ var PopularSites []string
func init() {
PopularSites = []string{
"163.com",
"360.cn",
"about.com",
"adcash.com",
"adobe.com",
"alibaba.com",
"aliexpress.com",
"alipay.com",
"amazon.com",
"amazonaws.com",
"ameblo.jp",
"aol.com",
"apple.com",
"ask.com",
"baidu.com",
"bankofamerica.com",
"bbc.co.uk",
"bestbuy.com",
"bing.com",
"blogger.com",
"blogspot.com",
"bongacams.com",
"booking.com",
"bp.blogspot.com",
"buzzfeed.com",
"chase.com",
"china.com",
"cnet.com",
"cnn.com",
"cntv.cn",
"coccoc.com",
"craigslist.org",
"dailymail.co.uk",
"dailymotion.com",
"directrev.com",
"dropbox.com",
"ebay.com",
"espn.go.com",
"etsy.com",
"ettoday.net",
"facebook.com",
"fc2.com",
"flickr.com",
"flipkart.com",
"github.com",
"globo.com",
"gmail.com",
"gmw.cn",
"go.com",
"google.com",
"googleadservices.com",
"googleusercontent.com",
"hao123.com",
"huffingtonpost.com",
"imdb.com",
"imgur.com",
"indiatimes.com",
"instagram.com",
"jd.com",
"life.com.tw",
"linkedin.com",
"live.com",
"mail.ru",
"microsoft.com",
"msn.com",
"naver.com",
"netflix.com",
"nytimes.com",
"odnoklassniki.ru",
"onclickads.net",
"outbrain.com",
"paypal.com",
"pconline.com.cn",
"people.com.cn",
"pinterest.com",
"pixnet.net",
"qq.com",
"rakuten.co.jp",
"reddit.com",
"sina.com.cn",
"slideshare.net",
"sogou.com",
"sohu.com",
"soso.com",
"stackoverflow.com",
"t.co",
"taobao.com",
"target.com",
"thepiratebay.se",
"tmall.com",
"tudou.com",
"tumblr.com",
"twitter.com",
"uol.com.br",
"vimeo.com",
"vk.com",
"walmart.com",
"weather.com",
"weibo.com",
"wikia.com",
"wikipedia.org",
"wordpress.com",
Expand Down

0 comments on commit 1e9e99d

Please sign in to comment.