用户操作
[留言]  [发消息]  [加为好友] 
订阅我的博客
XML聚合    FeedSky
订阅到鲜果
订阅到Google
订阅到抓虾
ftofficer的公告
ftofficer,本名张聪。 供职于360安全卫士,负责恶意网页后台分析集群的搭建 OpenInkpot 中文化负责人 乐于讨论互联网服务器技术和嵌入式技术。 本博是本人博客 http://blog.ftofficer.com 的墙内技术镜像。
文章分类
默认分类
本人博客完整版(RSS)
存档

原创  解决在Firefox下面Live Space“发布日志”按钮被禁用的问题 收藏

来自主blog

不知道从什么时候起,我的Live Space在Firefox下面使用就开始不正常了,“发布日志”的按钮一直都是灰色的。
为了解决这个问题,分析了一下Live Space发布的页面,用greasemonkey把这个问题解决了,将其分享给大家。

首先,你需要安装Firefox扩展 greasemonkey。这个扩展可以使你在加载一个页面的时候执行一段你自己的Javascript程序。

安装之后,将下面的程序拷贝到一个文本文件,并把扩展名改成 .user.js
(务必是.user.js,否则greasemonkey无法自动安装之)。

===脚本开始,拷贝时请不要包含这一行===
// ==UserScript==
// @name           Enable Live Space Post Button
// @namespace      http://ftofficer.spaces.live.com
// @description    Enable Live Space Post Button
// @include        http://*.spaces.live.com/*
// ==/UserScript==

function LiveSpace_enableButton(id) {
  var button = document.getElementById(id);
  if ( button ) {
    var cls = button.getAttribute("class");
    var clsNameEnd = cls.indexOf("spDisabled");
    if ( clsNameEnd != -1 ) {
      clsNameEnd--;   // skip " " before spDisabled
      var newCls = cls.substring(0, clsNameEnd);
     
      button.setAttribute("class", newCls);
      button.setAttribute("mi:state", "enabled");

      var aNode = document.createElement("a");
      aNode.id = id;
      aNode.href = "#";
    }
  }
}

LiveSpace_enableButton("actionToolbarBlogPost");
LiveSpace_enableButton("actionToolbarSave");

===脚本结束,拷贝时请不要包含这一行===

然后将这个js文件拖放到Firefox窗口中,greasemonkey会弹出对话框询问是否安装,选择是,即可完成安装。

然后,去Live Space的“添加日志”当中看看吧。

  • 如果看到“发布日志”和“保存为草稿”仍然没有启用的话,请看看greasemonkey当中配置的网直通配符是不是和你的网址一致,自己改改看看。在不行可以在这里回复。

发表于 @ 2007年11月07日 02:23:00 | 评论( loading... ) | 编辑| 举报| 收藏

旧一篇:让你的FireFox能够智能的切换输入法 | 新一篇:Python multiprocessing库使用手记(引子)

  • 发表评论
  • 评论内容:
  •  
Copyright © ftofficer
Powered by CSDN Blog