Skip to content

Commit 222c7ee

Browse files
committed
fix
1 parent b235b5e commit 222c7ee

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

BingBgForBaidu/BingBgForBaidu.user.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// @name 百Bing图
33
// @name:en BingBgForBaidu
44
// @namespace hoothin
5-
// @version 2.2.1
5+
// @version 2.2.2
66
// @description 给百度首页换上Bing的背景图,并添加背景图链接与日历组件
77
// @description:en Just change the background image of baidu.com to bing.com
88
// @author hoothin
@@ -40,6 +40,7 @@
4040
iframe.setAttribute("scrolling","no");
4141
iframe.style.display="none";
4242
iframe.style.top="30px";
43+
iframe.style.left="0px";
4344
iframe.style.position="absolute";
4445
var sUpfuncMenus=document.querySelector("#s_upfunc_menus");
4546
if(sUpfuncMenus){
@@ -67,11 +68,17 @@
6768
iframe.width=width===0?538:width;
6869
iframe.height=height===0?370:height;
6970
var today=$(".op-calendar-new-table-today",iframe.contentDocument);
71+
var t;
7072
riliLink.innerHTML="<span class='title' style='text-decoration:overline;cursor:crosshair'>"+$(".op-calendar-new-right-date",iframe.contentDocument).html()+"</span>";
71-
riliLink.onmousemove=function(){
72-
if(top===0)iframeDoc.scrollTop(138);
73-
if(left===0)iframeDoc.scrollLeft(121);
74-
iframe.style.display="block";
73+
riliLink.onmouseover=function(){
74+
t=setTimeout(function(){
75+
if(top===0)iframeDoc.scrollTop(138);
76+
if(left===0)iframeDoc.scrollLeft(121);
77+
$(iframe).show(200);
78+
},500);
79+
};
80+
riliLink.onmouseout=function(){
81+
clearTimeout(t);
7582
};
7683
iframe.onmouseout=function(){
7784
iframe.style.display="none";

0 commit comments

Comments
 (0)