PK P\1WQQ install.rdfUT 3A6AUx {6e84150a-d526-41f1-a480-a67d3fed910d} ieview 0.84 Open pages in IE via Firefox menus Paul Roub http://ieview.mozdev.org/ chrome://ieview/content/ieviewsettings.xul content/ locale/en-US/ieview/ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 0.8+ 1.0 {86c18b42-e466-45a9-ae7a-9b95ba6f5640} 1.7 1.8 PK KR\1 install.jsUT A6AUx// $Header: /cvs/ieview/ieview/install.js,v 1.11 2004/10/28 14:18:21 roub Exp $ const APP_DISPLAY_NAME = "IE View"; const APP_NAME = "ieview"; const APP_PACKAGE = "/Paul Roub/ieview"; const APP_VERSION = "0.84"; const APP_JAR_FILE = "ieview.jar"; const APP_CONTENT_FOLDER = "content/"; const APP_LOCALE = "en-US"; const APP_LOCALE_FOLDER = "locale/" + APP_LOCALE + "/ieview/"; const APP_SUCCESS_MESSAGE = "New menuitems will appear on the link and page context menus.\n\n"; var chromef, chromeFlag; initInstall(APP_NAME, APP_PACKAGE, APP_VERSION); chromef = getFolder("Profile", "chrome"); chromeFlag = PROFILE_CHROME; setPackageFolder(chromef); var err = addFile("Paul Roub", APP_VERSION, "chrome/" + APP_JAR_FILE, chromef, null); if (err == SUCCESS) { var jar = getFolder(chromef, APP_JAR_FILE); registerChrome(CONTENT | chromeFlag, jar, APP_CONTENT_FOLDER); registerChrome(LOCALE | chromeFlag, jar, APP_LOCALE_FOLDER); err = performInstall(); if(err == SUCCESS || error == 999) { alert(APP_NAME + " " + APP_VERSION + " has been succesfully installed.\n" +APP_SUCCESS_MESSAGE +"Please restart your browser before continuing."); } else { alert("Install failed. Error code:" + err); cancelInstall(err); } } else { alert("Failed to create " +APP_JAR_FILE +"\n" +"You probably don't have appropriate permissions \n" +"(write access to phoenix/chrome directory). \n"); cancelInstall(err); } PK !C]1$ГHHchrome/ieview.jarUT 6A6AUxPK U\11locale/UT KA6AUxPK P\1content/UT ,A6AUxPK E11skin/UT JA chrome://ieview/content/ieviewOverlay.xul chrome://ieview/content/ieviewOverlay.xul PK +E\1)@a((content/ieviewOverlay.jsUT A6AUx/* * * Copyright (c) 2003 Paul Roub * * $Header: /cvs/ieview/ieview/content/ieviewOverlay.js,v 1.4 2004/10/28 12:41:22 roub Exp $ * * Portions based on GPLed code by * Ted Mielczarek * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * ***** * * Notes: * * Since we can't know ahead of time where IE will be installed, we Kiboze the * Start Menu tree. If the shortcut has been renamed (i.e. it is no longer * titled "Internet Explorer"), we're out of luck. The only option at that * point would be to open and dereference every symlink we find, and see if the * target leaf name is "iexplore.exe". Not doing that at the moment, since * it just seems insane. */ var ieviewMenuItems = new Array("ieview-do-view", "ieview-do-viewlink"); var userPrograms = "Progs"; var allUserPrograms = "CmPrgs"; var applicationData = "AppData"; var gIeViewBundle; function isJsLink(href) { return(href && (href.substr(0, 11).toLowerCase() == "javascript:") ); } function ieviewContext() { if(gContextMenu) { for(var i=0; i= 2) && (result.charAt(0) == '"') && (result.charAt(result.length - 1) == '"') ) { result = ievtrim(result.substr(1, result.length - 2)); } return(result); } function ieViewLaunch (path,argumentstext) { var cantMessage = "can't find"; try { cantMessage = gIeViewBundle.getString("ieview.cantFindExplorer"); } catch(e) { alert(e); } var prefservice = Components.classes["@mozilla.org/preferences-service;1"]. getService(Components.interfaces.nsIPrefService); var prefs = prefservice.getBranch(""); try{ if(path=="") return false; var ieloc = null; if (prefs.getPrefType("ieview.ieapp") == prefs.PREF_STRING) { ieloc = deQuote(prefs.getCharPref("ieview.ieapp")); } var natTarget = null; var usePath = null; if (ieloc != null) { natTarget = ieloc; } else { var dsprops = Components.classes['@mozilla.org/file/directory_service;1'].getService(Components.interfaces.nsIProperties); usePath = tryDir(dsprops, userPrograms); // try user-specific program menu first var file = null; if (usePath != "") { file = searchPath(usePath, path); } if (! file) { usePath = tryDir(dsprops, allUserPrograms); // no joy? try "all users" program menu if (usePath != "") { file = searchPath(usePath, path); } } if (! file) { usePath = tryDir(dsprops, applicationData); // last resort, check the "quick start" bar if (usePath != "") { var quickPath = "\\microsoft\\internet explorer\\quick launch"; usePath = usePath + quickPath; file = searchPath(usePath, path); if (! file) // check alternate QuickLaunch bar title { var launchLink = "Launch Internet Explorer Browser.lnk"; file = searchPath(usePath, launchLink); } } } // last ditch -- find the windows directory // assume that the main Program Files directory is on the same drive // look in there, under Program Files\Internet Explorer, for iexplore.exe // if (! file) { var usePath = tryDir(dsprops, "WinD"); if ((usePath != "") && (usePath.charAt(1) == ":")) { usePath = usePath.substr(0, 2) + "\\program files\\internet explorer"; file = searchPath(usePath, "iexplore.exe"); } } if ((! file) || (! file.exists())) { alert(cantMessage); return false; } natTarget = file.target; } var targetFile = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile); try { targetFile.initWithPath(natTarget); } catch(e) { alert(cantMessage); return(false); } if (! targetFile.exists()) { alert(cantMessage); return(false); } usePath = targetFile.target; var process = Components.classes['@mozilla.org/process/util;1'].getService(Components.interfaces.nsIProcess); process.init(targetFile); var arguments= [] ; arguments.push(argumentstext); process.run(false, arguments, arguments.length, {}); return true; }catch(e){ alert(e);return false; } return false; // avoid JavaScript Error. } function ieviewInit() { var menu = document.getElementById("contentAreaContextMenu"); menu.addEventListener("popupshowing",ieviewContext,false); gIeViewBundle = document.getElementById("bundle_ieview"); if (document.location.href.substring(0, 7) != 'chrome:') { if (! gIeViewBundle) { alert("no bundle"); } } } function setIeviewOptions() { if (document.getElementById('ieloc').value) { var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); var prefs = prefService.getBranch(""); prefs.setCharPref("ieview.ieapp", document.getElementById('ieloc').value); } window.close(); } function pickIe() { var picker = Components.classes["@mozilla.org/filepicker;1"].getService(Components.interfaces.nsIFilePicker); picker.init(window, "Choose Browser", 0); picker.appendFilters(64); if (picker.show() == 0) { document.getElementById('ieloc').value = picker.file.target; } } function initPath() { var prefservice = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService); var prefs = prefservice.getBranch(""); var ieloc = null; if (prefs.getPrefType("ieview.ieapp") == prefs.PREF_STRING) { ieloc = prefs.getCharPref("ieview.ieapp"); } if ((ieloc != null) && (ieloc.length > 0)) { document.getElementById('ieloc').value = ieloc; } prefs = null; } // do the init on load window.addEventListener("load", ieviewInit, false); PK 0qq''content/ieviewsettings.xulUT 2@6AUx &ieview.prefdialoglocdesc1; &ieview.prefdialoglocdesc2; PK 0,@~ content/ieviewOverlay.xulUT 2@6AUx