| 
			 
					阅读:2171回复:2
				 
				求“状态栏显示标题”的ucjs,先谢谢了
					hidecapation用不了,记得以前有过一个“状态栏显示标题”的uc脚本。
 
							可是现在死活都搜索不到…… 如果有能找到的,那先谢谢了,  | 
	|
| 
			 1楼# 
								发布于:2010-08-10 17:49				
			
					传个.
 
							作者是坛子里golf-at. var StatusTitle = {
    StuBar : null, AttrMod : null,
    Init : function() {
        AttrMod = 'DOMAttrModified';
        StuBar = document.getElementById('statusbar'
            +'-display');
        StuBar.addEventListener(AttrMod, StatusTitle.
            changeTitle, false);
        gBrowser.tabContainer.addEventListener('TabOpen',
            StatusTitle.onTabOpen, false);
        gBrowser.tabContainer.addEventListener('TabClose',
            StatusTitle.onTabClose, false);
        for(var n=0; n<gBrowser.mTabs.length; n++) {
            gBrowser.mTabs[n].addEventListener(AttrMod,
                StatusTitle.onTabOpen, false);
        }
    },
    onTabOpen : function(e) {
        e.target.addEventListener(AttrMod, StatusTitle.
            changeTitle, false);
    },
    onTabClose : function(e) {
        e.target.removeEventListener(AttrMod, StatusTitle
            .changeTitle, false);
    },
    changeTitle : function(e) {
        if (e.target.id == 'statusbar-display') {
            if (e.attrName=='label' && e.newValue==
                XULBrowserWindow.defaultStatus)
                StuBar.label = gBrowser.contentTitle;
        }
        else if(e.target==gBrowser.selectedTab && (e
            .attrName=='label' || (e.newValue=='true'
            && e.attrName=='selected'))) {
            setTimeout(function(e) {
                StuBar.label = gBrowser.contentTitle;
            }, 0);
        }    
    },
};
StatusTitle.Init();				 | 
	|
					
						
  | 
	
| 
			 2楼# 
								发布于:2010-08-10 17:49				
			
					嗯嗯,就是这个,谢谢了哈,呵呵				 
							 | 
	|