File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22// @name 百Bing图
33// @name :en BingBgForBaidu
44// @namespace hoothin
5- // @version 2.2.6
5+ // @version 2.2.7
66// @description 给百度首页换上Bing的背景图,并添加背景图链接与日历组件
77// @description :en Just change the background image of baidu.com to bing.com
88// @author hoothin
3030 }
3131 var bingBgLink = document . createElement ( "a" ) ;
3232 bingBgLink . innerHTML = "<span class='title'>Bing图</span>" ;
33+ var riliLink = document . createElement ( "a" ) , date = new Date ( ) ;
3334 var icons = document . querySelector ( "#s_icons" ) ;
3435 if ( ! icons ) {
3536 icons = document . querySelector ( "#u1" ) ;
3637 bingBgLink . classList . add ( "mnav" ) ;
38+ riliLink . classList . add ( "mnav" ) ;
3739 }
3840 if ( icons ) icons . appendChild ( bingBgLink ) ;
3941 var iframe = document . createElement ( "iframe" ) ;
4345 iframe . style . top = "30px" ;
4446 iframe . style . left = "0px" ;
4547 iframe . style . position = "absolute" ;
48+ iframe . style . zIndex = "999" ;
4649 var sUpfuncMenus = document . querySelector ( "#s_upfunc_menus" ) ;
50+ if ( ! sUpfuncMenus ) {
51+ sUpfuncMenus = document . querySelector ( ".head_wrapper" ) ;
52+ iframe . style . top = "50px" ;
53+ iframe . style . left = "" ;
54+ iframe . style . right = "0px" ;
55+ }
4756 if ( sUpfuncMenus ) {
4857 sUpfuncMenus . appendChild ( iframe ) ;
4958 }
50- var riliLink = document . createElement ( "a" ) , date = new Date ( ) ;
5159 var dateDay = date . getDate ( ) , dateMonth = date . getMonth ( ) + 1 ;
5260 if ( dateDay < 10 ) dateDay = "0" + dateDay ;
5361 if ( dateMonth < 10 ) dateMonth = "0" + dateMonth ;
You can’t perform that action at this time.
0 commit comments