zotero/chrome/content/zotero/standalone.js

47 lines
1.4 KiB
JavaScript
Raw Normal View History

/*
***** BEGIN LICENSE BLOCK *****
Copyright © 2009 Center for History and New Media
George Mason University, Fairfax, Virginia, USA
http://zotero.org
This file is part of Zotero.
Zotero is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Zotero is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
***** END LICENSE BLOCK *****
*/
/*
* This object contains the various functions for the interface
*/
var ZoteroStandalone = new function()
{
this.onLoad = function() {
2011-02-10 01:53:15 +00:00
if(!Zotero || !Zotero.initialized) {
ZoteroPane.displayStartupError();
window.close();
return;
2011-02-10 01:53:15 +00:00
}
ZoteroPane.init();
2011-02-10 01:53:15 +00:00
ZoteroPane.makeVisible();
}
this.onUnload = function() {
ZoteroPane.destroy();
}
}
window.addEventListener("load", function(e) { ZoteroStandalone.onLoad(e); }, false);
window.addEventListener("unload", function(e) { ZoteroStandalone.onUnload(e); }, false);