diff --git a/chrome/chromeFiles/content/scholar/xpcom/integration.js b/chrome/chromeFiles/content/scholar/xpcom/integration.js index edffc82d8e..79d3922a14 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/integration.js +++ b/chrome/chromeFiles/content/scholar/xpcom/integration.js @@ -293,14 +293,19 @@ Scholar.Integration.DataListener.prototype._requestFinished = function(response) } Scholar.Integration.SOAP = new function() { - var window = Components.classes["@mozilla.org/appshell/appShellService;1"] - .getService(Components.interfaces.nsIAppShellService) - .hiddenDOMWindow; - + this.init = init; this.getCitation = getCitation; this.getBibliography = getBibliography; this.setDocPrefs = setDocPrefs; + var window; + + function init() { + window = Components.classes["@mozilla.org/appshell/appShellService;1"] + .getService(Components.interfaces.nsIAppShellService) + .hiddenDOMWindow; + } + /* * generates a new citation for a given item * ACCEPTS: style[, itemString, newItemIndex] @@ -375,6 +380,4 @@ Scholar.Integration.SOAP = new function() { var styleClass = Scholar.Cite.getStyleClass(io.style); return [io.style, styleClass]; } -} - -Scholar.Integration.init(); \ No newline at end of file +} \ No newline at end of file diff --git a/chrome/chromeFiles/content/scholar/xpcom/scholar.js b/chrome/chromeFiles/content/scholar/xpcom/scholar.js index 793469e802..bb99a0eaaa 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/scholar.js +++ b/chrome/chromeFiles/content/scholar/xpcom/scholar.js @@ -84,6 +84,10 @@ var Scholar = new function(){ Scholar.Schema.updateSchema(); Scholar.Schema.updateScrapersRemote(); + // Initialize integration web server + Scholar.Integration.SOAP.init(); + Scholar.Integration.init(); + _initialized = true; return true; }