Skip to content

Commit

Permalink
v2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ETY001 committed Feb 15, 2016
1 parent c6faed3 commit 890d5af
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 17 deletions.
5 changes: 4 additions & 1 deletion _locales/en_US/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"message": "Open In a New Tab"
},
"block": {
"message": "Block"
"message": "Block this"
},
"blocklist": {
"message": "Block List"
Expand All @@ -58,5 +58,8 @@
},
"nouse": {
"message": "No use,Delete it"
},
"chat": {
"message": "Chat on Gitter"
}
}
5 changes: 4 additions & 1 deletion _locales/zh_CN/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"message": "在新标签页打开"
},
"block": {
"message": "不再提醒"
"message": "不再提醒该条书签"
},
"blocklist": {
"message": "不再提醒列表"
Expand All @@ -58,5 +58,8 @@
},
"nouse": {
"message": "没用了,删掉它"
},
"chat": {
"message": "Chat on Gitter"
}
}
8 changes: 7 additions & 1 deletion css/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ hr{
.button-success,
.button-error,
.button-warning,
.button-secondary {
.button-secondary,
.button-yellow {
color: white;
border-radius: 4px;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
Expand All @@ -25,6 +26,11 @@ hr{
.button-secondary {
background: rgb(66, 184, 221); /* this is a light blue */
}

.button-yellow {
background: rgb(250, 210, 50);
}

.bigbox{
top: 0;
bottom: 0;
Expand Down
35 changes: 26 additions & 9 deletions js/show.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
$(function(){
$('#openpreview').hide();
$('#closepreivew').hide();
var tab_id;
/*if(window.localStorage.preview_switch=='on'){
var url;
if(window.localStorage.preview_switch=='on'){
$('#openpreview').hide();
} else {
$('#closepreivew').hide();
}*/
}

var lang_req = [
"appname",
Expand All @@ -18,7 +17,8 @@ $(function(){
"block",
"blocklist",
"blockmsg",
"nouse"
"nouse",
"chat"
];

var port = chrome.runtime.connect({name: "bookmark_manager_ety001"});
Expand All @@ -30,19 +30,35 @@ $(function(){
port.postMessage({ctype:"remove_bookmark",cdata:tab_id});
});

$('#openpreview').click(function(){
window.localStorage.preview_switch='on';
$(this).hide();
$('iframe').attr('src', url);
$('#closepreivew').show();
});

$('#closepreivew').click(function(){
window.localStorage.preview_switch='off';
$(this).hide();
$('iframe').attr('src', '');
$('#openpreview').show();
});

port.postMessage({ctype:"getbookmark",cdata:false});
port.postMessage({ctype:"lang", cdata:lang_req});
port.onMessage.addListener(function(msg) {
console.log(msg);
//console.log(msg);
var ctype = msg.ctype;
var cdata = msg.cdata;
switch (ctype) {
case 'getbookmark':
var title = cdata[0].title;
var url = cdata[0].url;
url = cdata[0].url;
tab_id = cdata[0].id;
$('#bookmark_title').html(title);
$('iframe').attr('src', url);
$('#bookmark_title').html(title+" | "+url);
if(window.localStorage.preview_switch=='on'){
$('iframe').attr('src', url);
}
$('#openinnewtab').attr('href', url);
break;
case 'lang':
Expand All @@ -55,6 +71,7 @@ $(function(){
$('#donate').html(cdata.donate);
$('#blockmsg').html(cdata.blockmsg);
$('#nouse').html(cdata.nouse);
$('#chat').html(cdata.chat);
break;
case 'block':
if(cdata){
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

"name": "__MSG_appname__",
"description": "__MSG_appdesc__",
"version": "2.2.1",
"version": "2.2.2",

"icons": {
"16": "img/icon-16.png",
Expand Down
10 changes: 6 additions & 4 deletions show.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ <h1 id="appname"></h1>
</div>
<div class="bookmark_info">
<span id="previewtext"></span><span id="bookmark_title"></span><hr>
<button id="nouse" class="button-error pure-button"></button>
<a id="openinnewtab" class="pure-button-primary pure-button" target="_blank"></a>
<button id="closepreivew" class="button-error pure-button"></button>
<button id="openpreview" class="button-success pure-button"></button>
<button id="block" class="button-warning pure-button"></button>
<a id="donate" class="button-secondary pure-button" target="_blank" href="http://www.domyself.me/donate"></a>
<button id="nouse" class="button-error pure-button"></button>
<button id="closepreivew" class="button-yellow pure-button"></button>
<button id="openpreview" class="button-success pure-button"></button>
&nbsp;
<a id="chat" href="https://gitter.im/ety001/bookmark-extension" target="_blank" class="button-secondary pure-button"></a>
<a id="donate" class="pure-button" target="_blank" href="http://www.domyself.me/donate"></a>
<span id="blockmsg" style="display:none;"></span>
</div>
</div>
Expand Down

0 comments on commit 890d5af

Please sign in to comment.