Skip to content

Commit

Permalink
3.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
lkytal committed Nov 13, 2015
1 parent 9e02406 commit 521cad9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion meta/popsearch.meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// @exclude http://acid3.acidtests.org/*
// @exclude http://www.acfun.tv/*
// @require http://libs.baidu.com/jquery/2.1.3/jquery.min.js
// @version 3.2.1
// @version 3.2.2
// @icon http://lkytal.qiniudn.com/ic.ico
// @grant GM_xmlhttpRequest
// @grant GM_addStyle
Expand Down
23 changes: 13 additions & 10 deletions popsearch.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// @exclude http://acid3.acidtests.org/*
// @exclude http://www.acfun.tv/*
// @require http://libs.baidu.com/jquery/2.1.3/jquery.min.js
// @version 3.2.1
// @version 3.2.2
// @icon http://lkytal.qiniudn.com/ic.ico
// @grant GM_xmlhttpRequest
// @grant GM_addStyle
Expand Down Expand Up @@ -189,22 +189,25 @@ Init = function() {
};

praseTranslation = function(responseDetails) {
var Result, Rst, Rtxt, i, len, lines, ref;
var Result, Rline, Rst, Rtxt, i, j, len, len1, lines, ref, ref1;
if (!popData.bTrans) {
return;
}
Rtxt = JSON.parse(responseDetails.responseText);
ref = Rtxt.translation;
for (i = 0, len = ref.length; i < len; i++) {
lines = ref[i];
Rline = lines + "<br>";
}
Rst = "";
if (Rtxt.basic != null) {
Rst = "";
ref = Rtxt.basic.explains;
for (i = 0, len = ref.length; i < len; i++) {
lines = ref[i];
Rst += lines + "<br />";
ref1 = Rtxt.basic.explains;
for (j = 0, len1 = ref1.length; j < len1; j++) {
lines = ref1[j];
Rst = lines + "<br>";
}
} else {
Rst = Rtxt.translation;
}
Result = "<div id=\"tranRst\" style=\"font-size:14px;overflow:auto;\">\n <p style=\"padding:5px 15px;line-height:200%\">\n " + Rst + "\n </p>\n</div>";
Result = "<div id=\"tranRst\" style=\"font-size:13px;overflow:auto;padding:5px 15px;\">\n <div style=\"line-height:160%;font-size:14px;padding:5px 0px;\">" + Rline + "</div>\n <p style=\"line-height:180%;font-size:13px;\">\n " + Rst + "\n </p>\n</div>";
$('#Gspan').empty().append(Result).show();
fixPos(document.defaultView.getSelection());
};
Expand Down
6 changes: 3 additions & 3 deletions tieba_enhance.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ open_setting_window = function() {
$("#tail_option_box").append("<div class=\"tail_option\">" + x + "</div>");
}
UpdateText = function() {
var e;
var e, error;
if ($("#tail_type_text")[0].innerHTML === "javascript") {
try {
$("#tail_data_show")[0].innerHTML = eval($("#tail_data")[0].value);
} catch (_error) {
e = _error;
} catch (error) {
e = error;
$("#tail_data_show")[0].innerHTML = e;
}
} else {
Expand Down

0 comments on commit 521cad9

Please sign in to comment.