Skip to content

Commit

Permalink
e fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lkytal committed Nov 14, 2015
1 parent 73065e2 commit c547037
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 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.3
// @version 3.2.4
// @icon http://lkytal.qiniudn.com/ic.ico
// @grant GM_xmlhttpRequest
// @grant GM_addStyle
Expand Down
12 changes: 6 additions & 6 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.3
// @version 3.2.4
// @icon http://lkytal.qiniudn.com/ic.ico
// @grant GM_xmlhttpRequest
// @grant GM_addStyle
Expand Down Expand Up @@ -52,15 +52,15 @@ fixPos = function(sel, e) {
offsets = get_selection_offsets(sel);
offsetTop = offsets[0];
offsetLeft = offsets[1];
eventTop = e.pageY + document.body.scrollTop;
eventLeft = e.pageX + document.body.scrollLeft;
if (e != null) {
if (Math.abs(offsetLeft - eventLeft) > 120) {
offsetLeft = eventLeft + 10;
}
eventTop = e.pageY + document.body.scrollTop;
eventLeft = e.pageX + document.body.scrollLeft;
if (Math.abs(offsetTop - eventTop) > 120) {
offsetTop = eventTop - 8;
}
if (Math.abs(offsetLeft - eventLeft) > 120) {
offsetLeft = eventLeft + 10;
}
} else {
$('#showupbody').css('margin-left', '60px');
}
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 c547037

Please sign in to comment.