|
2 | 2 | // @name 百Bing图 |
3 | 3 | // @name:en BingBgForBaidu |
4 | 4 | // @namespace hoothin |
5 | | -// @version 2.3.5 |
| 5 | +// @version 2.3.6 |
6 | 6 | // @description 给百度首页换上Bing的背景图,并添加背景图链接与日历组件 |
7 | 7 | // @description:en Just change the background image of baidu.com to bing.com |
8 | 8 | // @author hoothin |
|
80 | 80 | var height=rili.height(); |
81 | 81 | iframe.width=width===0?538:width; |
82 | 82 | iframe.height=height===0?370:height; |
83 | | - var today=$(".op-calendar-new-table-today",iframe.contentDocument); |
| 83 | + var today=$(".op-calendar-new-table-border",iframe.contentDocument); |
84 | 84 | var t; |
85 | 85 | riliLink.innerHTML="<span class='title' style='text-decoration:overline;cursor:crosshair'>"+$(".op-calendar-new-right-date",iframe.contentDocument).html()+"</span>"; |
86 | 86 | riliLink.onmouseover=function(){ |
|
97 | 97 | $(iframe).hide(500); |
98 | 98 | }; |
99 | 99 | if(today[0].classList.contains("op-calendar-new-table-festival")){ |
100 | | - riliLink.innerHTML+=today[0].title?" <font color='#FFFF66' style='background-color:#e02d2d;font-weight:bold'>("+today[0].title+")</font>":""; |
101 | | - riliLink.title=today[0].title; |
| 100 | + var title=today[0].title || $(".op-calendar-new-table-almanac",today).text(); |
| 101 | + riliLink.innerHTML+=title?" <font color='#FFFF66' style='background-color:#e02d2d;font-weight:bold'>("+title+")</font>":""; |
| 102 | + riliLink.title=title; |
102 | 103 | } |
103 | 104 | }; |
104 | 105 | var skinContainer=document.querySelector(".s-skin-container"); |
|
142 | 143 | bgUrl="url(\""+bgUrl+"\")"; |
143 | 144 | if(!bingImg)skinContainer.style.backgroundImage = bgUrl; |
144 | 145 | var logo=document.querySelector("#s_lg_img"); |
145 | | - if(logo && logo.src)logo.src=logo.src.replace(/\/[^\/]+\.png$/,"/logo_white.png"); |
| 146 | + if(logo && logo.src)logo.src=logo.src.replace(/\/bd_logo.*$/,"/logo_white.png"); |
146 | 147 | else{ |
147 | 148 | logo=document.querySelector("#lg>img"); |
148 | 149 | if(logo && logo.src)logo.src=logo.src.replace(/.*\/img\/bd_logo1\.png/,"//ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo/logo_white.png"); |
|
0 commit comments