lyly
小狐狸
小狐狸
  • UID35829
  • 注册日期2011-04-02
  • 最后登录2011-08-04
  • 发帖数14
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
阅读:4921回复:16

玩一玩标签栏,导航栏,标题栏,置底

楼主#
更多 发布于:2011-04-10 06:40
无意中找到一段标签栏置底的js代码,稍微学学,发现真的很简洁,方便
还可以按照代码排列的顺序,改变置底的顺序,也许我火星,但觉得真的不错,不用什么扩展那么麻烦,我新手,也不太懂什么格式,就一段一段的排列

//uc代码置底顺序从上到下


try {
    var vbox = document.createElement('vbox');
    document.getElementById("navigator-toolbox").parentNode.insertBefore(
        vbox, document.getElementById("browser-bottombox"));
    vbox.appendChild(document.getElementById("nav-bar"));
}catch(e) {}  
//导航栏
try {
    var vbox = document.createElement('vbox');
    document.getElementById("navigator-toolbox").parentNode.insertBefore(
        vbox, document.getElementById("browser-bottombox"));
    vbox.appendChild(document.getElementById("TabsToolbar"));
}catch(e) {} 
//标签栏

try {
    var vbox = document.createElement('vbox');
    document.getElementById("navigator-toolbox").parentNode.insertBefore(
        vbox, document.getElementById("browser-bottombox"));
    vbox.appendChild(document.getElementById("titlebar"));
}catch(e) {}
//标题栏
lyly
小狐狸
小狐狸
  • UID35829
  • 注册日期2011-04-02
  • 最后登录2011-08-04
  • 发帖数14
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
1楼#
发布于:2011-04-10 06:40
wen1jian:想知道楼主的按钮风格是怎么办到的?
是主题的原因吗?
回到原帖



自己找的图标,用css更换
lyly
小狐狸
小狐狸
  • UID35829
  • 注册日期2011-04-02
  • 最后登录2011-08-04
  • 发帖数14
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
2楼#
发布于:2011-04-10 06:40
ciel:那位来段自动隐藏标签栏代码,感谢。回到原帖


看到一段隐藏导航栏的css,改来隐藏标签栏试了下
一般,标签栏上放的按钮无法点击下拉菜单,只放标签页就还不错
哪位高手改改,选择标签栏上,其它按钮的下拉菜单时不隐藏

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
@-moz-document url(chrome://browser/content/browser.xul) {

#main-window:not([inFullscreen="true"]) #navigator-toolbox:not([customizing="true"]) ~ #browser {
margin-top: 0px !important;/* 标签工具栏的宽度,负值缩小*/

}

#main-window:not([inFullscreen="true"]) #navigator-toolbox:not([customizing="true"]) > #TabsToolbar {
-moz-transition: max-height .4s ease-in-out 1s !important;
-moz-box-ordinal-group: 1000 !important;
padding: 0 3px !important;
position: relative !important;
z-index: 100 !important;
overflow-y: hidden !important;
max-height: 0px !important;
min-height: 0px !important;

}

/* 
#navigator-toolbox:not([customizing="true"]) > #PersonalToolbar,*/ 
#main-window:not([inFullscreen="true"]) #navigator-toolbox:not([customizing="true"]):hover > #TabsToolbar {
-moz-transition: max-height .2s ease-in-out !important;
max-height: 30px !important;
background:transparent !important;  /* 标签栏背景颜色或透明,如黑色:black*/

}

}
lyly
小狐狸
小狐狸
  • UID35829
  • 注册日期2011-04-02
  • 最后登录2011-08-04
  • 发帖数14
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
3楼#
发布于:2011-04-10 06:40
把导航栏移动到标签栏,把标签栏置底不就行了嘛,附加组件栏整合到地址栏需要uc脚本

// ==UserScript==
// @name           StatusbarInURLBar3.uc.js
// @namespace      http://d.hatena.ne.jp/Griever/
// @include        main
// @compatibility  Firefox 4.0b7
// @note           Firefox 3.6, 4.0b6 はこちら https://gist.github.com/67460/d87a8f38280d26f1ccb81fcbb1c3b6a1fcb07e90
// ==/UserScript==

(function(){
   if (!isElementVisible(gURLBar)) return;//アドレスバーが無かったらストップ
   var urlbarIcons = document.getElementById('urlbar-icons');
   var statusBar = document.getElementById('status-bar');
   //add stylish icon
   var stylishPanel = document.getElementById('stylish-toolbar-button');
   if(stylishPanel){
      stylishPanel.setAttribute("id","stylish-panel");
      stylishPanel.onclick = function(event){
         stylishOverlay.handleStatusClick(event);
      };
      statusBar.appendChild(stylishPanel);
   }
   
   statusBar.setAttribute("context", "");//ツールバーのコンテキストメニューがでないように
   urlbarIcons.insertBefore(statusBar, urlbarIcons.firstChild);

   var style = <![CDATA[
#status-bar {
  min-height: 18px !important;
  margin: 0px !important;
  border: none !important;
  background-color: transparent !important;
}
/* Remove stylish button shape and place in the location bar */
#stylish-panel {
  -moz-appearance: none !important;
  border: 0 !important;
  background: white !important;
  box-shadow: white 0 0 !important;
  padding: 2px 4px !important;
  margin: -2px !important;
  position: fixed !important;
}

#stylish-panel > dropmarker{
  display: none !important;
}
/*
.urlbar-textbox-container-children {
  opacity: 1 !important;
  -moz-transition: none !important;
}

.urlbar-origin-label {
  display: none !important;
}

.urlbar-over-link-box {
  background-image: none !important;
  padding-left: 4px !important;
}
*/

   ]]>.toString();
   var sspi = document.createProcessingInstruction(
      'xml-stylesheet',
      'type="text/css" href="data:text/css,' + encodeURI(style) + '"'
   );
   document.insertBefore(sspi, document.documentElement);
   sspi.getAttribute = function(name) {
      return document.documentElement.getAttribute(name);
   };
})()
lyly
小狐狸
小狐狸
  • UID35829
  • 注册日期2011-04-02
  • 最后登录2011-08-04
  • 发帖数14
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
4楼#
发布于:2011-04-10 06:40
标签栏不放其它的还行,就是要改改,我是新手,不太懂
lyly
小狐狸
小狐狸
  • UID35829
  • 注册日期2011-04-02
  • 最后登录2011-08-04
  • 发帖数14
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
5楼#
发布于:2011-04-10 06:40
把标签栏这样放就暂时可以玩隐藏了
游客

返回顶部