彭梓峰
小狐狸
小狐狸
  • UID31008
  • 注册日期2009-11-08
  • 最后登录2010-01-31
  • 发帖数67
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
阅读:7739回复:20

谁能提供一个油猴或者stylish,隐藏标题栏的脚本,就是火狐边框。

楼主#
更多 发布于:2009-12-10 20:44
我知道有个扩展可以隐藏,但是现在我不想安扩展了,就想要个脚本,各位狐狸帮帮忙,stylish的脚本库我都找遍了,结果还是没有找到......
彭梓峰
小狐狸
小狐狸
  • UID31008
  • 注册日期2009-11-08
  • 最后登录2010-01-31
  • 发帖数67
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
1楼#
发布于:2009-12-10 20:44
harnack:别白费力气了,css和gm都干不了这个。可以试试用uc脚本,隔壁见到过。回到原帖



怪不得,stylish的脚本库我的翻遍了,就是没有
这样说就只能用扩展了哟。uc我一直都不知道怎么用
彭梓峰
小狐狸
小狐狸
  • UID31008
  • 注册日期2009-11-08
  • 最后登录2010-01-31
  • 发帖数67
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
2楼#
发布于:2009-12-10 20:44
msky:userChromeJS
http://userchromejs.mozdev.org/

在配置文件夹的chrome目录里,编辑userChrome.js,在最后加上一行

userChrome.import("*", "UChrm");

保存,退出,把下面这个代码保存成一个.js脚本,这个应该会把,新建TXT文件……放到在配置文件夹的chrome目录里,重启FX即可

(function(){const B=document.getElementById("main-window");if(B){window.maximize();const A=document.getElementById("window-controls");A.setAttribute("fullscreencontrol","false");A.setAttribute("hidden","false");B.setAttribute("hidechrome","true");while(STATE_NORMAL!==window.windowState){window.restore()}window.moveTo(screen.availLeft,screen.availTop);window.resizeTo(screen.availWidth,screen.availHeight);document.getAnonymousElementByAttribute(document.getElementById("status-bar"),"class","statusbar-resizerpanel").setAttribute("hidden","true")}})();
回到原帖


是在最后加上一行,还是在最后一行加上?
彭梓峰
小狐狸
小狐狸
  • UID31008
  • 注册日期2009-11-08
  • 最后登录2010-01-31
  • 发帖数67
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
3楼#
发布于:2009-12-10 20:44
我这个人笨的很还是搞不懂
只有这样了
加好了的文件如下:
/*
 * userChromeJS
 *
 * This file can be used to customize the functioning of Mozilla's user
 * interface.  Usage and syntax follow below; for useful code snippets see
 * http://mozilla.zeniko.ch/userchrome.js.html.
 *
 * Examples:
 * setTimeout(function() { document.title = "A new title for every window" }, 2000);
 *
 * if (location == "chrome://browser/content/browser.xul") {
 *   alert("Script loaded in main browser only");
 * }
 *
 * // DOMi window
 * if (location == "chrome://inspector/content/inspector.xul") {
 *    // Move Urlbar box to main toolbar
 *    var tb = document.getElementById('bxURLBar');
 *    var el = document.getElementById('mbrInspectorMain');
 *    if (tb && el) el.appendChild(tb, el.firstChild);
 * }
 *
 * NOTE: userChromeJS includes an 'import' function to facilitate file management.
 * An absolute path or relative path with Directory name property token can be
 * used, as follows:
 *
 * // Single file (javascript .js or overlay .xul file)
 * userChrome.import("Full file path");
 * userChrome.import("Relative file path", "Token");
 * // All .js and .xul files in a folder will be loaded.
 * userChrome.import("Full file folder path");
 * userChrome.import("Relative file folder path/name", "Token");
 * userChrome.import("*", "Token");
 * // Console logger
 * userChrome.log("My message", "Optional calling script name arg");
 *
 * NOTE: absolute windows files and folders must be have backslash escaped:
 * "C:\\Program Files\\Mozilla\\scripts\\myscript.js"
 *
 * Examples:
 * // Import script in [ProfileDir]/chrome/scripts/myscript.js
 * userChrome.import("scripts/myscript.js", "UChrm");
 * // Import script in [Profiles]/scripts/myscript.js (share same script in
 * // multiple profiles
 * userChrome.import("scripts/myscript.js", "DefProfRt");
 * // All .js or .xul in profile chrome directory
 * userChrome.import("*", "UChrm");
 * // Import overlay
 * userChrome.import("C:\\Program Files\\Mozilla\\scripts\\myOverlay.xul");
 * // Import everything in Desktop folder /scripts
 * userChrome.import("scripts", "Desk");
 * // Perhaps the only thing you need in this file..
 * if (location == "chrome://browser/content/browser.xul") {
 *  userChrome.import("scripts", "DefProfRt");
 * }
 *
 * NOTE: for a full listing of directory tokens see the two links found here:
 * https://developer.mozilla.org/en/Code_s ... cial_files
 * // What's the path for a token?  This will print it in the console..
 * userChrome.log(userChrome.getAbsoluteFile("Desk").path, "getAbsoluteFile:'Desk'");
 *
 * NOTE: userChromeJS includes a log function, invoked as follows:
 * userChrome.log("string1", ["string2"])
 * Example:
 * userChrome.log("hello world!", "myscript.js");
 * Results in a console message:
 * 2009-05-22 18:07:40 userChromeJS.js::myscript.js: hello world!
 *
 * NOTE: the date format for the userChrome.log console logger may be user defined:
 * Example:
 * userChrome.dateFormat = "%Y-%m-%d %H:%M:%S";
 *
 * NOTE: the following shortcuts are predefined:
 * Cc = Components.classes;
 * Ci = Components.interfaces;
 * Cr = Components.results;
 * Cu = Components.utils;
 *
 */
userChrome.import("*", "UChrm");



晕....图片跑哪里去了
彭梓峰
小狐狸
小狐狸
  • UID31008
  • 注册日期2009-11-08
  • 最后登录2010-01-31
  • 发帖数67
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
4楼#
发布于:2009-12-10 20:44
just4fun:装了ucjs的话连stylish都可以卸了,可以用ucjs_Stylish_modoki 代替回到原帖

这东西好不好,好歹我要知道怎么安装吧,是不是像我这样的格式,直接就在userChrome最后一行加上userChrome.import("*", "UChrm"); 就行,然后就在chame的目录里,添加新的脚本就可以了?
添加的格式是不是直接建个文本文档,把代码直接复制就去?
后戳是什么?我看见有的人说是 . uc.js
我都晕了....又有的人说这个扩展有时不生效....
能不能你们再说得白一点,好让我这个鸟飞起来
彭梓峰
小狐狸
小狐狸
  • UID31008
  • 注册日期2009-11-08
  • 最后登录2010-01-31
  • 发帖数67
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
5楼#
发布于:2009-12-10 20:44
对不起各位,这我已经用uc脚本解决了,谢谢
游客

返回顶部