29 var gSongbirdSanitize = {
30 onLoad:
function() { gSongbirdSanitize.init(); },
34 if (document.documentElement.getAttribute(
"windowtype") ==
"Songbird:Core") {
35 this.onSanitizerStartup();
37 window.removeEventListener(
'load', gSongbirdSanitize.onLoad,
false);
38 window.addEventListener(
'unload', gSongbirdSanitize.onUnload,
false);
40 var
prefs = Components.classes[
"@mozilla.org/preferences-service;1"]
41 .getService(Components.interfaces.nsIPrefBranch2);
42 var guid = prefs.getComplexValue(
"songbird.library.web",
43 Components.interfaces.nsISupportsString);
46 Components.classes[
"@songbirdnest.com/Songbird/library/Manager;1"]
47 .getService(Components.interfaces.sbILibraryManager);
49 var webLibrary = libraryManager.getLibrary(guid);
50 Sanitizer.prototype.items[
"mediaHistory"] = {
58 return webLibrary.length > 0;
65 if (document.getElementById(
"sanitize.mediaHistory").checked) {
66 Sanitizer.prototype.items[
"mediaHistory"].clear();
73 window.removeEventListener(
'unload', gSongbirdSanitize.onUnload,
false);
74 if (document.documentElement.getAttribute(
"windowtype") ==
"Songbird:Core") {
75 this.onSanitizerShutdown();
79 onSanitizerStartup:
function() {
84 onSanitizerShutdown:
function() {
90 window.addEventListener(
'load', gSongbirdSanitize.onLoad,
false);
var gSanitizePromptDialog
function onUnload()
onUnload - called when the cover preview window unloads.