DefaultPluginPro ---------------- DefaultPluginPro: A web browser default plug-in replacement. By Jason Summers Version 1.0.0 29 June 2002 Web site: Copyright (c) 2002 Jason Summers This program 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 2 of the License, or (at your option) any later version. This program 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. See the file COPYING.txt for more information. THIS SOFTWARE 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. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THIS SOFTWARE AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THIS SOFTWARE TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Security Considerations ----------------------- Due to the nature of browser plug-ins and the fact that they must work with untrusted data, it is possible for certain types of bugs to exist which may allow remote web sites to take control of your computer or do harm to it by using carefully constructed parameters or data files. While I've tried to write DefaultPluginPro carefully so that this cannot happen, it has not had any sort of security audit, and I cannot make any absolute guarantees. If you are paranoid about security, you may not wish to leave DefaultPluginPro enabled in your browser for an extended period of time. To disable it, simply rename the "npdefpluginpro.dll" file to "npdefpluginpro.old". Requirements ------------ This is a Windows program, and requires Microsoft Windows (95+) or a sufficiently-compatible implementation of Win32. It only works in certain web browsers. It is known to work in: * Netscape 4.x (and probably 3.x+ or even 2.x+) * Mozilla and Mozilla-based browsers, up to June 2002 at least: - Mozilla - Netscape 6.x, 7.x - Beonex Communicator - K-Meleon * It may or may not work in various versions of Opera; I've had mixed results. It does not work in any version of Microsoft Internet Explorer, as far as I know. Even before I started this program, I knew that the Mozilla team had plans to change or eliminate the default plug-in. I believe that, if and when this happens, it will probably make it difficult or impossible to use DefaultPluginPro in Mozilla and Mozilla-based browsers such as Netscape. (But if that happens, it may be possible to write something similar in XBL.) For the current status, see Mozilla "Bug 83754": http://bugzilla.mozilla.org/show_bug.cgi?id=83754 Installation ------------ First of all, you should probably make sure you have Windows Explorer configured so that it doesn't hide ".dll" files from you. Look for a "Show all files" option somewhere in the Folder Options configuration. Since replacing the default plug-in is not really something that browsers expect you to do, it may be difficult or impossible to install into some browsers. (But usually it's pretty easy.) You should probably shut down your browser when you're installing this. Basically, you need to locate your browser's "Plugins" folder, and copy the npdefpluginpro.dll file to it. You also need to find your browser's current default plug-in and disable it. The default plug-in is often, but not always, named npnul32.dll. Typcally, you can disable it by changing its filename extension from .dll to .old. It is possible that you will need to rename npdefpluginpro.dll to have the same name as your previous default plug-in, but I have not yet found any browser that requires that. >>> Installing into Netscape or Mozilla Run your browser and, with JavaScript enabled, choose Help|About Plugins from the menu. There should be an item named "Netscape Default Plug-in" or "Mozilla default Plug-in". Make a note of the file name listed and its location -- it should be named "npnul32.dll". Rename it to npnul32.old and copy npdefpluginpro.dll into the same folder. Restart your browser. >>> Installing into Opera Shut down Opera and copy the npdefpluginpro.dll file to your Opera\Plugins folder. You may also need to search for a file named "PlugDef.dll" and rename it to PlugDef.old. Note that newer versions of Opera are extremely aggressive in searching for plug-ins in all sorts of different places on your hard drive, so it can sometimes be quite painful to get Opera to use the plug-in you want it to use. How to use ---------- To use DefaultPluginPro, you need to click the right mouse button, and select items from the context menu. The phrase "the document" refers to the data file that would normally be viewed by a plug-in, such as a Shockwave Flash file, or an MP3 file, etc. Save Document - Save the document to disk. (Actually, the document is already stored on disk in a temporary file, so what this really does is to make a copy of it.) This option is only available after the document has been completely downloaded. The algorithm used to select a suggested filename is not particularly sophisticated, so you may need to type in a filename. File extensions are never added automatically. View Document Directly - Tells your browser to visit the URL of the document. What actually happens is up to your browser. Usually, your browser will then ask you what to do with the document, or prompt to save to disk. But depending on the MIME type of the document, something else may happen. For example, a "text/plain" document will probably be displayed directly by the browser, as plain text. Open in New Window - Same as "View Document Directly", except that it will attempt to open the document in a new separate browser window. (Come to think of it, this may be a pretty useless feature.) Copy Document Location - Copies the document's URL to the Windows clipboard. You can then paste it into another application. Get Recommended Plug-in - Some web pages include information about where you can find an appropriate plug-in (the "pluginspage" attribute). If that information is available, this option will be enabled, and will take you to that web site. Plug-in Search - Performs a plug-in search on Netscape's web site. If this option is not available, it's probably because the MIME type of the document was not available, or presumed to be incorrect (e.g. "text/plain"). If you want to use a different search page, you can set the following registry value to the new URL: HKCU\Software\Generic\DefaultPluginPro\searchpage The string "?mimetype=xxx/yyy" will be appended to the URL, where "xxx/yyy" is the MIME type of the current document. Refresh Plug-ins - Calls the JavaScript function: javascript:navigator.plugins.refresh(true) In most browsers, this will check for new plug-ins that have been installed after you last started the browser, and activate them if found. This almost certainly requires JavaScript to be enabled in your browser. Download Document - Initiates downloading of the document. Used if the document was not AutoDownloaded, or if you stopped the download. Stop Downloading - Stops the download. This is not a Pause; it completely cancels the download. If you start the download again, it may restart from the beginning, or your browser may be capable of resuming the download where it left off. AutoDownload This Type -> Yes In the future, when a document with this MIME type is encountered, download it immediately, without waiting for a "Download Document" command. AutoDownload This Type -> No In the future, when a document with this MIME type is encountered, do not download it automatically. Wait for a "Download Document" command. AutoDownload This Type -> Use Default In the future, treat this type of document just like all unknown types, by obeying the "AutoDownload By Default" setting. AutoDownload By Default - This is an option that can be turned on and off. If On, all documents, except those configured otherwise, will be downloaded automatically when they are encountered. If Off, all documents, except those configured otherwise, will not be downloaded until a "Download Document" command is given. Properties - Displays information about the current document. Limitations ----------- Probably does not work in any version of Microsoft Internet Explorer. May not work in future versions of Mozilla-based browsers. Very small plug-in windows will be hard to use, and hidden plug-ins are not supported at all. No download-and-save combination function. (Though the View Document Directly feature will usually produce the same result.)