gitorious提供了查看文件的功能,但是我发现只有第一层目录下的文件可以看,深层目录下的文件都不能看,会发生404 not found错误。论坛里也有人遇到同样的问题。因为不懂Rails,尝试apache mod_rewrite也以失败告终,没法子,自己写了一个greasemonkey脚本,把链接修改过来。
// ==UserScript==
// @name Unescape Slash
// @namespace http://example.com/projects/
// @include http://example.com/projects/*
// ==/UserScript==
var allNodeFile, thisNodeFile, a;
allNodeFile = document.getElementsByClassName('node file');
thisNodeFile = 0;
for (var i = 0; i < allNodeFile.length; ++i) {
thisNodeFile = allNodeFile[i];
a = thisNodeFile.firstChild;
a.href = a.href.replace(/%2F/g, '/');
}





