From d662466ff614dc29cd33810b388aff528f9fef9c Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 1 Sep 2008 06:09:56 +0000 Subject: [PATCH] Merged revisions 3306,3309 from 1.0 branch via svnmerge --- chrome/content/zotero/xpcom/zotero.js | 68 --------------------------- components/zotero-protocol-handler.js | 36 +++++++------- scrapers.sql | 5 +- 3 files changed, 21 insertions(+), 88 deletions(-) diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index ad8c26b9af..f7b4a8b644 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -43,8 +43,6 @@ var Zotero = new function(){ this.getStorageDirectory = getStorageDirectory; this.getZoteroDatabase = getZoteroDatabase; this.getTempDirectory = getTempDirectory; - this.convertChromeURLToFile = convertChromeURLToFile; - this.convertChromeURLToFileURL = convertChromeURLToFileURL; this.chooseZoteroDirectory = chooseZoteroDirectory; this.debug = debug; this.log = log; @@ -397,72 +395,6 @@ var Zotero = new function(){ } - /** - * Get a file from a chrome://zotero URL - * - * Currently only works for skin URLs - * - * @param {String} chromeURI - * @return {nsIFile} - */ - function convertChromeURLToFile(chromeURL) { - var ios = Components.classes["@mozilla.org/network/io-service;1"]. - getService(Components.interfaces.nsIIOService); - var uri = ios.newURI(chromeURL, null, null); - uri.QueryInterface(Components.interfaces.nsIStandardURL); - - if (uri.scheme != 'chrome') { - throw ("URI " + uri.spec + - " not a chrome URI in Zotero.convertChromeURLToFileURL()"); - } - - if (uri.host != 'zotero') { - throw ("URI " + uri.spec + - " not a Zotero chrome URI in Zotero.convertChromeURLToFileURL()"); - } - - var parts = uri.path.substr(1).split('/'); - - // Auto-expand URL if necessary - var chromeReg = Components.classes["@mozilla.org/chrome/chrome-registry;1"] - .getService(Components.interfaces.nsIChromeRegistry); - uri = chromeReg.convertChromeURL(uri); - - var file = this.getInstallDirectory(); - file.append('chrome'); - - switch (parts[0]) { - case 'skin': - file.append('skin'); - file.append('default'); - file.append('zotero'); - - for (var i=1; i