Permalink
Browse files

v2.0.0

  • Loading branch information...
1 parent 7b2564b commit 2a7450b3d02dd5d60b9b9b0d44ec85ba8879be4f @rnons committed Oct 25, 2012
Showing with 32 additions and 8 deletions.
  1. +1 −1 config.xml
  2. +7 −4 css/popup.css
  3. +11 −0 features.html
  4. +5 −0 popup.html
  5. +1 −1 scripts/index.js
  6. +7 −2 scripts/player.js
View
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<widget xmlns="http://www.w3.org/ns/widgets" defaultlocale="zh-cn" version="1.3.1-1" id="https://addons.opera.com/addons/extensions/details/doubanfm-2/">
+<widget xmlns="http://www.w3.org/ns/widgets" defaultlocale="zh-cn" version="2.0.0-1" id="https://addons.opera.com/addons/extensions/details/doubanfm-2/">
<name xml:lang="en">doubanfm</name>
<name xml:lang="zh-cn">豆瓣电台</name>
<icon src="img/icon_64.png"/>
View
@@ -1,18 +1,18 @@
body{margin:0}
span{font-family: "WenQuanYi Zen Hei", "sans-serif";}
a:hover{opacity:0.8}
-#main{width:280px;padding:7px 4px 7px 4px;height:120px;overflow:hidden;}
+#main{width:320px;padding:7px 4px 7px 4px;height:420px;overflow:hidden;}
#power {float:right;width:20px;margin-top:8px;clear:both}
#power:hover{opacity:0.7}
#song_title a{white-space:nowrap;font-size:12px;color:#3B5343;display:inline-block;overflow:hidden;line-height:15px;margin-bottom:1px;text-decoration:none}
#song_artist {white-space:nowrap;font-size:15px;color:#3B5343;font-weight:bold;display:inline-block;overflow:hidden;width:238px;line-height:18px}
-#display{margin-top:5px;width:240px;}
-#loaded{height:3px;background-color:#E9F4E9;width:240px;opacity:0.8;margin-top:2px}
+#display{margin-top:5px;width:320px;}
+#loaded{height:3px;background-color:#E9F4E9;width:320px;opacity:0.8;margin-top:2px}
#played{height:3px;background-color:#3B5343;width:0px;opacity:0.8}
#timer{margin-top:3px;font-size:10px;color:#777;float:right;display:block;vertical-align:middle;line-height:13px}
#switcher{width:20px;float:right;margin-top:4px;clear:both}
#switcher:hover{opacity:0.7}
-#wrapper{height:40px;margin-top:20px;width:280px}
+#wrapper{height:40px;margin-top:20px;width:320px}
#pause {float:right;width:20px;height:18px;clear:both}
#pause:hover{opacity:0.7}
#operation{width:120px;float:left}
@@ -36,6 +36,9 @@ a:hover{opacity:0.8}
#range{width:50px;height:4px;}
#volume_bar{width:25px;height:4px;background-color:#3B5343;top:68px;left:19px;border-radius:2px;z-index:-1;position:absolute;}
#volume{margin-top:5px;width:150px;float:left}
+#cover_wrap {
+ margin: 20px 0 50px;
+}
.on {
background-color: #ffffff;
}
View
@@ -36,6 +36,9 @@
</div>
<div id="content">
<div id="tips">
+ <h3>douRex版本已跃升至2.0.0,隆重推出dj兆赫收听、搜索、收藏功能!<br/>
+ UI还有待改进,有兴趣的同学可以帮助我改进~<br/>
+ 对于功能需求或使用中遇到的问题,欢迎反馈!</h3>
<h3>特性</h3>
<p>
- 豆瓣电台全功能<br/>
@@ -45,9 +48,17 @@ <h3>特性</h3>
- 在<a href="http://douban.fm/explore">douban.fm/explore</a>页面显示"\[douRex]/"
</p>
<h3>Changelog</h3>
+ <p>2.0.0-1<br/>
+ - dj兆赫收听、搜索、收藏</p>
<p>1.3.1-1 (2012-07-10)<br/>
- 图标、样式微调</p>
</div>
+ <h3>TODO</h3>
+ <p>
+ - UI<br/>
+ - 歌手兆赫<br/>
+ - 歌词<br/>
+ - 快捷键(切歌、红心)</p>
</div>
<div id="footer">
<a href="mailto:remotenonsense@gmail.com">Contact Me</a>
View
@@ -24,6 +24,11 @@
<span id="song_title">--</span>
<img src="img/lyric.png" class="lyric_button" id="search_lrc" title="去g.cn搜歌词" style="display:none"/>
</div>
+ <div id="cover_wrap">
+ <center>
+ <img id="cover" src="" width="224px" height="224px"/>
+ </center>
+ </div>
<div id="loaded">
<div id="played"></div>
</div>
View
@@ -29,7 +29,7 @@ window.addEventListener("load", function () {
popup: {
href: "popup.html",
width: 340,
- height: 340
+ height: 440
}
};
theButton = opera.contexts.toolbar.createItem(ToolbarUIItemProperties);
View
@@ -35,15 +35,18 @@ function showSong () {
data = radio.c_song;
site = /site/;
page = "http://music.douban.com" + data.album;
+ cover = data.picture;
+ cover = cover.replace('mpic', 'lpic');
if (data&&data.like == 1) {
$("#like").attr("src", "img/rated.png");
} else {
$("#like").attr("src", "img/unrated.png");
}
if (radio.power == true) {
$("#power").attr("src", "img/off.png");
+ $("#cover").attr("src", cover);
$("#pause").show();
- $("#search_lrc").show();
+ $("#search_lrc").hide();
} else {
$("#power").attr("src", "img/on.png");
$("#pause").hide();
@@ -53,8 +56,10 @@ function showSong () {
if (data.title) {
if (site.test(data.album)) {
$("#song_title").html("<a href='"+data.album+"'>"+data.title+"</a>");
+ $("#cover").wrap("<a href='"+data.album+"'></a>");
} else {
$("#song_title").html("<a href='"+page+"'>"+data.title+"</a>");
+ $("#cover").wrap("<a href='"+page+"'></a>");
}
$("#song_title").attr("title", data.title);
$("#song_artist").html(data.artist);
@@ -259,7 +264,7 @@ radio.jaudio.bind($.jPlayer.event.timeupdate+'.douRex', function (event) {
//var t=(this.currentTime/this.duration)*230
var current = radio.jaudio.data("jPlayer").status.currentTime;
var total = radio.jaudio.data("jPlayer").status.duration;
- var t = (current/total) * 240;
+ var t = (current/total) * 320;
$("#played").css("width", t+"px");
var min = 0;
var second = 0;

0 comments on commit 2a7450b

Please sign in to comment.