[故障现象]:
我先后装了Firefox3.0.5+Flashgot1.1+Xunlei3.5。Firefox页面上的右键菜单始终不出现Xuneli菜单项。
[原因]:
Flashgot无耻地阻止了Xunlei菜单项的显示。
[解决方案]:
删掉Flashgot
[技术细节]:
源代码参见[/extensions/{19503e42-ca3c-4c27-b1e2-9cdb2170ee34}/components/components/flashgotService.js]
实现处
*******************************
dm.nativeUI = "#ThunderDownloadUp, #ThunderDownload, #ThunderDownloadAll";
hideNativeUI: function(document, selectors) {
var s = selectors + " {display: none !important}";
if("nsIDownloadManagerUI" in CI) { // Toolkit, sync stylesheets
this.domUtils.updateStyleSheet(s, true);
} else {
for each (var id in this.extractIds(selectors)) try {
document.getElementById(id).style.display = "none";
} catch(e) {}
}
(document._FlashGot_NativeUI_styleSheets ||
(document._FlashGot_NativeUI_styleSheets = [])
).push(s);
},
*******************************
定义了Xunlei菜单项的ID后,利用hideNativeUI()方法隐藏Xunlei菜单项。