Make best use of Godaddy Free Products

我不算一个好顾客——很挑剔,但可以算是 Google, Godaddy 和 Tesco 的忠实顾客,因为他们的产品或服务几乎无可挑剔——又扯远了。

我要讲的是如何把 Godaddy 购买域名后的免费赠品用足用好。Godaddy Free Products 有 Free Hosting, Free Blogcast 和 Free Photo Album。虽然我另租 1&1 的服务器,但 Godaddy 这么客气,我想不要浪费了人家的热忱。再说,在  Godaddy Free Products 上搞搞实验,物理上跟生产服务器隔绝,用得也心安。

只是 Godaddy Free Products 既然是免费的,同时广告也来了。拿它来建商业站点肯定是不合适的,就是自己人搞实验对着广告也烦。有没有办法去掉?我稍作搜索就有答案:可爱的 css 发挥一下

#conash3D0 {display:none; }

因为答案来得太容易,没有我发挥的空间总不心甘。于是我又想,我每装一个软件都要去改 css,太烦;有些 一键安装的产品(比如 Free Blogcast 和 Free Photo Album)也不允许我改 css,怎么办?答案是 user css。以 Mozilla Firefox 3.5.5 for Fedora 11 为例,具体做法是:

打开 /home/{myusername}/.mozilla/profile.ini,看里面说的 profile path 是什么,通常是跟 profile.ini 同级的一个目录,名字是 {randomchars}.default。

在 /home/{myusername}/.mozilla/{randomchars}.default/chrome 目录下新建一个 userContent.css,内容是:

#conash3D0 {display:none !important; }

使用 !important 只是保证这条规则的优先权,对付目前 Godaddy 的广告条,不用也可以。因为不在服务器端动手脚,恐怕 Godaddy 到死也不会意识到它的广告被屏蔽了。万一它改进 javascript 来探测广告条的 display 状况,那 user 再换一条规则:

#conash3D0 {position:absolute !important; left:-10000px !important}

也是一样效果(你的显示器不会大于 10,000 pixels 吧)。不过 Godaddy 不会有时间整天琢磨这些玩意,所以有两条规则备用足以。

以此类推,对付 Godaddy Blogcast 广告,可以使用:

iframe.adFrame, div.adBanner { display:none !important; }

对付 Godaddy Photo Album 广告,可以使用:

div#wrapper div iframe { display:none !important; }

至于其他浏览器怎么建 user css,我摘抄一段前人讲的

Internet Explorer for Windows

1. Create a .css file in a convenient location using Notepad.
2. Tools menu, Internet Options, General tab, Accessibility button.

Opera

1. Create a .css file in a convenient location using Notepad.
2. File menu, Preferences, Page Style.

2 comments

  1. 元旦快乐! 打扰了,我这里有个问题。
    免费空间里没有SSH的设置,因而无法访问如下的目录
    /home/{myusername}/.mozilla/{randomchars}.default/chrome
    烦请楼主指教一下,您是如何访问的?
    谢谢。

Leave a comment

Your email address will not be published. Required fields are marked *