diff --git a/browser/gopher/LICENSE.txt b/browser/gopher/LICENSE.txt new file mode 100644 index 0000000000..348f4486d6 --- /dev/null +++ b/browser/gopher/LICENSE.txt @@ -0,0 +1,69 @@ +*** FOR MORE DETAILED CREDIT INFORMATION, TYPE about:gopher AFTER INSTALL *** + +This code is issued under a disjunctive tri-license giving you the choice of +one of the three following sets of free software/open source licensing terms: + + * Mozilla Public License, version 1.1 + * GNU General Public License, version 2.0 + * GNU Lesser General Public License, version 2.1 + +For users under the Mozilla Public License: + +The contents of this file are subject to the Mozilla Public License +Version 1.1 (the "License"); you may not use this file except in +compliance with the License. You may obtain a copy of the License at +http://www.mozilla.org/MPL/ + +Software distributed under the License is distributed on an "AS IS" +basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +License for the specific language governing rights and limitations +under the License. + +The Original Code is the OverbiteFF Gopher addon. + +The Initial Developer of the Original Code is Cameron Kaiser. +Portions created by Cameron Kaiser are Copyright (C) 2008-2011 +Cameron Kaiser. All Rights Reserved. Copyright (C) 2008-2011 Contributors +to the Overbite Project. + +For users under the GNU Public License: + +OverbiteFF Gopher/CSO Firefox addon +Copyright (C) 2008-2011 Cameron Kaiser +Copyright (C) 2008-2011 Contributors to the Overbite Project + +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; version 2. + +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. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +[ or http://www.gnu.org/licenses/gpl-2.0.html ] + +For users under the GNU Lesser General Public License: + +OverbiteFF Gopher/CSO Firefox addon +Copyright (C) 2008-2011 Cameron Kaiser +Copyright (C) 2008-2011 Contributors to the Overbite Project + +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; version 2.1. + +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +[ or http://www.gnu.org/licenses/lgpl-2.1.html ] + + diff --git a/browser/gopher/README.md b/browser/gopher/README.md new file mode 100644 index 0000000000..f08a8db010 --- /dev/null +++ b/browser/gopher/README.md @@ -0,0 +1,51 @@ +## libgopher + +libgopher is a fork of OverbiteFF, a plugin which lets you browse Gopher sites on legacy Firefox-based browsers such as Dactyloidae. + +In this tree it is built into the browser rather than installed as an add-on. The browser registers the Gopher protocol handler during startup, so `gopher://` links work immediately in a new profile. + +### Built-in integration + +The integration is split into the same pieces used by other browser-native features: + +- `moz.build` adds the component files, default preferences, and chrome package to the browser build. +- `components/gopher.manifest` registers the Gopher protocol and the `about:gopher`/`about:overbite` pages. +- `components/protocol.js` implements Gopher networking, directory conversion, internal resources, and supported item types. +- `components/about.js` supplies the Overbite information page. +- `jar.mn` packages the `overbiteff` content and locale namespaces. +- `defaults/preferences/overbiteff.js` initializes the build marker preference. + +The browser-level build entry is `browser/moz.build`; no XPI installation or add-on manager registration is required. + +### Supported URLs + +The primary entry point is any Gopher URL, for example: + +```text +gopher://gopher.floodgap.com/ +``` + +The built-in information pages are available at: + +```text +about:gopher +about:overbite +``` + +The protocol handler also serves the generated internal resources used by Gopher directory pages, including icons, CSS, and the page interaction script. These resources are addressed through `gopher:///internal-*` URLs and are resolved from the packaged `content/chrome/` directory. + +### Gopher item types + +Directory conversion includes the traditional Gopher item types for text, menus, CSO/ph, errors, archives, searches, Telnet, images, sound, HTML, movies, PNG, PDF, and generic binary content. Unknown types receive the generic icon and label instead of preventing the directory from loading. + +### Profile customization + +The protocol handler first checks the profile’s `gopherchrome` directory for replacements for internal CSS, JavaScript, and image resources. This allows local visual or behavior changes without editing the browser package. + +The following preferences are recognized when present: + +- `extensions.overbiteff.dotless` — enables dotless text cleanup. +- `extensions.overbiteff.fixitype` — enables the legacy item-type correction behavior. +- `extensions.overbiteff.buildmark` — records the initialized OverbiteFF build number. + +Only the build marker is given a default value by the built-in preference file; the other options remain opt-in. diff --git a/browser/gopher/components/about.js b/browser/gopher/components/about.js new file mode 100644 index 0000000000..ba1077e4ff --- /dev/null +++ b/browser/gopher/components/about.js @@ -0,0 +1,177 @@ +/* + +This code is issued under a disjunctive tri-license giving you the choice of +one of the three following sets of free software/open source licensing terms: + + * Mozilla Public License, version 1.1 + * GNU General Public License, version 2.0 + * GNU Lesser General Public License, version 2.1 + +For users under the Mozilla Public License: + +The contents of this file are subject to the Mozilla Public License +Version 1.1 (the "License"); you may not use this file except in +compliance with the License. You may obtain a copy of the License at +http://www.mozilla.org/MPL/ + +Software distributed under the License is distributed on an "AS IS" +basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +License for the specific language governing rights and limitations +under the License. + +The Original Code is the OverbiteFF Gopher addon. + +The Initial Developer of the Original Code is Cameron Kaiser. +Portions created by Cameron Kaiser are Copyright (C) 2008-2011 +Cameron Kaiser. All Rights Reserved. Copyright (C) 2008-2011 Contributors +to the Overbite Project. + +For users under the GNU Public License: + +OverbiteFF Gopher/CSO Firefox addon +Copyright (C) 2008-2011 Cameron Kaiser +Copyright (C) 2008-2011 Contributors to the Overbite Project + +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; version 2. + +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. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +[ or http://www.gnu.org/licenses/gpl-2.0.html ] + +For users under the GNU Lesser General Public License: + +OverbiteFF Gopher/CSO Firefox addon +Copyright (C) 2008-2011 Cameron Kaiser +Copyright (C) 2008-2011 Contributors to the Overbite Project + +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; version 2.1. + +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +[ or http://www.gnu.org/licenses/lgpl-2.1.html ] + + +*/ + +const OBFFABOUT = "chrome://overbiteff/content/infobabe.html"; +// register this to three contract IDs +const OBFFABOUT_CONTRACTID1 = "@mozilla.org/network/protocol/about;1?what=gopher"; +const OBFFABOUT_CONTRACTID2 = "@mozilla.org/network/protocol/about;1?what=overbite"; +//const OBFFABOUT_CONTRACTID3 = "@mozilla.org/network/protocol/about;1?what=overbiteff"; + +const OBFFABOUT_CID = Components.ID("{80d3faa0-de53-11dc-95ff-0800200c9a66}"); + +const nsISupports = Components.interfaces.nsISupports; +const nsIFactory = Components.interfaces.nsIFactory; +const nsIModule = Components.interfaces.nsIModule; +const nsIAboutModule = Components.interfaces.nsIAboutModule; +const nsIIOService = Components.interfaces.nsIIOService; +const nsIObserver = Components.interfaces.nsIObserver; +const nsIComponentRegistrar = Components.interfaces.nsIComponentRegistrar; + +Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); + +var OverbiteAbout = { + + classID: OBFFABOUT_CID, + + // nsISupports + QueryInterface : XPCOMUtils.generateQI([nsISupports, + nsIObserver, + nsIFactory, + nsIAboutModule]), + + // nsIObserver + observe : function(subject, topic, data) { + // nothing yet + }, + + // nsIAboutModule + newChannel : function(uri) { + var chan = Components + .classes["@mozilla.org/network/io-service;1"] + .getService(nsIIOService) + .newChannel(OBFFABOUT, null, null); + chan.originalURI = uri; + return chan; + }, + + getURIFlags : function(uri) { return 0; }, + + // nsIFactory + createInstance : function(outer, iid) { + if (outer != null) + throw Components.results.NS_ERROR_NO_AGGREGATION; + return this.QueryInterface(iid); + }, + + lockFactory : function(lock) { // ignored + } +}; + +var Module = { + + // nsISupports + QueryInterface : XPCOMUtils.generateQI([nsISupports, + nsIModule]), + + // nsIModule + getClassObject : function(compMgr, cid, iid) { + if (cid.equals(OBFFABOUT_CID)) { + return OverbiteAbout.QueryInterface(iid); + } + + throw Components.results.NS_ERROR_FACTORY_NOT_REGISTERED; + }, + registerSelf : function(compMgr, fileSpec, location, type) { + var compReg = compMgr.QueryInterface(nsIComponentRegistrar); + + // do the treble + compReg.registerFactoryLocation(OBFFABOUT_CID, + "about:gopher", + OBFFABOUT_CONTRACTID1, + fileSpec, + location, + type); + compReg.registerFactoryLocation(OBFFABOUT_CID, + "about:overbite", + OBFFABOUT_CONTRACTID2, + fileSpec, + location, + type); +/* sigh. it must not like the length. + compReg.registerFactoryLocation(OBFFABOUT_CID, + "about:overbiteff", + OBFFABOUT_CONTRACTID3, + fileSpec, + location, + type); +*/ + }, + unregisterSelf : function(compMgr, location, type) { + var compReg = compMgr.QueryInterface(nsIComponentRegistrar); + + // undo the treble + compReg.unregisterFactoryLocation(OBFFABOUT_CID, location); + }, + canUnload : function(compMgr) { return true; } +}; + +function NSGetModule(compMgr, fileSpec) { return Module; } +function NSGetFactory(component) { return OverbiteAbout; } diff --git a/browser/gopher/components/gopher.manifest b/browser/gopher/components/gopher.manifest new file mode 100644 index 0000000000..b9549b9aa2 --- /dev/null +++ b/browser/gopher/components/gopher.manifest @@ -0,0 +1,8 @@ +component {977ffc4c-a635-433d-8477-ea575bfb7b19} protocol.js +contract @mozilla.org/network/protocol;1?name=gopher {977ffc4c-a635-433d-8477-ea575bfb7b19} +category profile-after-change GopherProtocol @mozilla.org/network/protocol;1?name=gopher +component {80d3faa0-de53-11dc-95ff-0800200c9a66} about.js +contract @mozilla.org/network/protocol/about;1?what=gopher {80d3faa0-de53-11dc-95ff-0800200c9a66} +contract @mozilla.org/network/protocol/about;1?what=overbite {80d3faa0-de53-11dc-95ff-0800200c9a66} +category profile-after-change OverbiteAbout @mozilla.org/network/protocol/about;1?what=gopher +category profile-after-change OverbiteAbout @mozilla.org/network/protocol/about;1?what=overbite diff --git a/browser/gopher/components/protocol.js b/browser/gopher/components/protocol.js new file mode 100644 index 0000000000..e1fff72a77 --- /dev/null +++ b/browser/gopher/components/protocol.js @@ -0,0 +1,2054 @@ +/* + +This code is issued under a disjunctive tri-license giving you the choice of +one of the three following sets of free software/open source licensing terms: + + * Mozilla Public License, version 1.1 + * GNU General Public License, version 2.0 + * GNU Lesser General Public License, version 2.1 + +For users under the Mozilla Public License: + +The contents of this file are subject to the Mozilla Public License +Version 1.1 (the "License"); you may not use this file except in +compliance with the License. You may obtain a copy of the License at +http://www.mozilla.org/MPL/ + +Software distributed under the License is distributed on an "AS IS" +basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +License for the specific language governing rights and limitations +under the License. + +The Original Code is the OverbiteFF Gopher addon. + +The Initial Developer of the Original Code is Cameron Kaiser. +Portions created by Cameron Kaiser are Copyright (C) 2008-2016 +Cameron Kaiser. All Rights Reserved. Copyright (C) 2008-2016 Contributors +to the Overbite Project. + +For users under the GNU Public License: + +OverbiteFF Gopher/CSO Firefox addon +Copyright (C) 2008-2016 Cameron Kaiser +Copyright (C) 2008-2016 Contributors to the Overbite Project + +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; version 2. + +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. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +[ or http://www.gnu.org/licenses/gpl-2.0.html ] + +For users under the GNU Lesser General Public License: + +OverbiteFF Gopher/CSO Firefox addon +Copyright (C) 2008-2016 Cameron Kaiser +Copyright (C) 2008-2016 Contributors to the Overbite Project + +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; version 2.1. + +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +[ or http://www.gnu.org/licenses/lgpl-2.1.html ] + +*/ +const OBFFVERS = 3.1; +const OBFFBUILD = 1695; +const OBFFBUILDPREF = "extensions.overbiteff.buildmark"; +const OBFFDOTLESSPREF = "extensions.overbiteff.dotless"; +const OBFFFIXITYPEPREF = "extensions.overbiteff.fixitype"; +const OBFFSCHEME = "gopher"; +const OBFFCHROMEURL = "chrome://overbiteff"; +const OBFFABOUTURL = (OBFFCHROMEURL + "/content/infobabe.html"); +const OBFFIABOUTURL = "about:overbite"; +const OBFFRABOUTURL = (OBFFCHROMEURL + "/content/startpage.html"); +const OBFFPROT_HANDLER_CONTRACTID = "@mozilla.org/network/protocol;1?name="+OBFFSCHEME; +const OBFFPROT_HANDLER_CID = Components.ID("{977ffc4c-a635-433d-8477-ea575bfb7b19}"); + +const Ci = Components.interfaces; +const Cc = Components.classes; +const Cr = Components.results; +const Cu = Components.utils; + +Cu.import("resource://gre/modules/XPCOMUtils.jsm"); + +const nsILoadInfo = Ci.nsILoadInfo; +const nsIFactory = Ci.nsIFactory; +const nsISupports = Ci.nsISupports; +const nsIProtocolHandler = Ci.nsIProtocolHandler; +const nsIProxiedProtocolHandler = Ci.nsIProxiedProtocolHandler; + +const nsIRequest = Ci.nsIRequest; +const nsIChannel = Ci.nsIChannel; +const nsIProxiedChannel = Ci.nsIProxiedChannel; +const nsIProgressEventSink = Ci.nsIProgressEventSink; + +const nsISocketTransport = Ci.nsISocketTransport; +const nsIStreamConverter = Ci.nsIStreamConverter; +const nsIStreamListener = Ci.nsIStreamListener; +const nsIObserver = Ci.nsIObserver; +const nsIRequestObserver = Ci.nsIRequestObserver; +const nsITimerCallback = Ci.nsITimerCallback; + +/* port control */ +// 80 is okay because of some hybrid servers that can speak both on one port +var alwayslet = [ 13, 43, 70, 71, 72, 79, 80, 105, 1070, 2347, 3000, 3070, + 3099, 4323, 7055, 7070, 7071, 7072, 7077, 7080, 7777, 27070 ]; +//var badports = [ 20,21,22,23,25,53,69,111,115,137,138,139,443,513,514,548 ]; + +/* cache */ +var capscache = new Object(); +var nullcaps = { + PathKeepPreDelimiter : false, + PathParentDouble : false, + PathDelimiter : "", + CapsVersion : 1 +}; + +/* global functions for logging to the error console */ +function OverbiteLogAlways(msg, error) { + var consoleService = Cc["@mozilla.org/consoleservice;1"] + .getService(Ci.nsIConsoleService); + msg = "OverbiteFF says: "+msg; + if (error) { + consoleService.logStringError(msg); + } else { + consoleService.logStringMessage(msg); + } +} + +function OverbiteLog(msg, error) { + + // return Cr.NS_OK; // comment out for logging + + // OverbiteLogAlways(msg, error); +} + +/* crap on a stick. + you mean I have to implement my own NS_QueryNotificationCallbacks? + so what do I have XPConnect for anyway?! + rot in hell. */ +function OverbiteQNC(one, two, three) { + var progsink = null; + + if (three) + return three; + if (one.notificationCallbacks) { + progsink = one.notificationCallbacks + .getInterface(nsIProgressEventSink); + if (!progsink && two) { + // try that instead + var cbs = two.notificationCallbacks; + if (cbs) + progsink = cbs.getInterface( + nsIProgressEventSink); + } + } + return(progsink); +} + +/* global functions for processing caps */ +function OverbiteCapsKey(host, port) { + var nport = (port < 1) ? 70 : port; + return host.toLowerCase()+":"+nport; +} +function OverbiteCapsPro(caps) { + if (caps.substr(0, 4) != "CAPS") + return nullcaps; + + var capsarr = caps.substr(4).split(/[\r\n]{1,2}/); + var ncapsarr = nullcaps; + var i; + + try { + for (i=0; i opaque, jump to root + var i = sel.lastIndexOf(d); + if (i == -1) return ""; // no delimeter in sel => jump to root + + // putative + var s = sel.substr(0, i); + + // handle the situation where the delimiter was on the end with nothing + // after it + if ((s + d) == sel) { // grrr + i = s.lastIndexOf(d); + if (i == -1) return ""; // no delimiter in sel => jump to root + s = s.substr(0, i); + } + + return s; +} +function OverbiteCapsUniversalBackURL(host, port, itype, sel) { + // based on the caps, return either a .caps pseudo URL, a real URL or + // nothing. used for the direct links. the capupurl is only valid iff: + // + // 1. we have a cached caps *and* it supports path delimeters + // or + // 2. we have no cached caps, in which case we hope for the best + // + // I thought about having this suppress the capupurl if it equals the + // root, but this is inconsistent, especially with new hosts. + + var capupurl = ''; + var caps = capscache[OverbiteCapsKey(host, port)]; + + // the itype could be in one of two places: either itself, or the + // first character of the sel. if itype == '' then get it from there. + if (itype == '') { + itype = sel.substr(0, 1); + sel = sel.substr(1); + } + // by definition backing up only can *ever* go up to a menu. + itype = '1'; + + if (!caps) { // no cache; construct pseudo URL + capupurl = OverbiteURLFromSel( + host + '.caps', port, itype, sel); + } else { + var kk = caps["PathDelimiter"]; + // if we have a path delimeter, use it + if (kk && kk.length) + capupurl = OverbiteURLFromSel( + host, port, itype, + OverbiteCapsBackPathFromSel(caps, sel)); + } + return capupurl; +} + +// utility function, used by lots of things +function OverbiteURLFromSel(host, port, itype, sel) { + var nport = (!port || port < 1) ? 70 : port; + var suburl = OBFFSCHEME + '://' + host + + ((nport != 70)?(':'+nport): '') + + '/' + encodeURI(itype + sel); + ; + return suburl; +} + +/* + * HACK! + * the OverbitePrompter "debounces" back to back alerts and acts + * effectively as the front end mutex. Needed since our channels + * can get multiplexed even in single-process Firefox and our + * channel object does a certain amount of front-end work currently. + * + * TODO: For e10s, remove all use of the prompter and use content + * controls (a form for searches, HTML error messages, etc.) +*/ + +var lastPromptKey = null; +var lastCachedResponse = null; +// These need to be globals so that responses cache properly. +var chequestub = { value : false }; +var query = { value : '' }; +function OverbitePrompter(newkey, response) { + if (lastPromptKey == newkey) { +OverbiteLog("prompter key "+lastPromptKey+" returning cached "+lastCachedResponse); + lastPromptKey = null; + return lastCachedResponse; + } + query = { value : '' }; + lastPromptKey = newkey; + lastCachedResponse = response(); +OverbiteLog("caching prompt "+newkey+" responded "+lastCachedResponse); + return lastCachedResponse; +} + +/* + * the OverbiteCaps object is a pseudo-object that controls browser navigation + * and stores caps data in the cache. it is mostly the same as Dotless and + * implements the same interfaces. + * + * future expansion: have the caps display a proper info page. +*/ + +function OverbiteCaps() { } +OverbiteCaps.prototype = { + + // my stuff + _contentType: null, + _listener : null, + _context : null, + _buf : '', + _sstream : null, + _browser_callback : null, + _host : '', + _port : -1, + _itemtype : '', + _selector : '', + + // feed the beast (i.e., the listener on the other end) + _feedBeast : function(request, listener, context, what) { + // create a new instance each time (instead of reusing one) + // just to make sure the previous instance has time to finish + var stringstream = Cc["@mozilla.org/io/string-input-stream;1"] + .createInstance(Ci.nsIStringInputStream); + stringstream.setData(what, what.length); + listener.onDataAvailable(request, context, + stringstream, 0, what.length); + }, + + // nsISupports + QueryInterface : XPCOMUtils.generateQI([nsISupports, + nsIStreamListener, + nsIStreamConverter, + nsIRequestObserver]), + + // nsIRequestObserver + onStartRequest : function(request, context) { + // init the channel with data and content type + // this is almost always text/plain but we are flexible + + this._context = context; + this._buf = ''; + + var chan = request.QueryInterface(nsIChannel); + if (chan) + chan.contentType = "text/html"; + this._listener.onStartRequest(request, context); + }, + + /* when the request terminates, we then parse the data (using the + global functions above) and manipulate the browser. the other + end gets a StopRequest but we don't pass it any data. */ + + onStopRequest : function(request, context, status) { + // stop the stream and destroy it + if (this._sstream) + this._sstream.close(); + this._sstream = null; + + // process it here before we tear down everything + var w = OverbiteCapsPro(this._buf); + var k = OverbiteCapsKey(this._host, this._port); + capscache[k] = w; + OverbiteLog("cached caps entry created for "+k); + + // if there is a callback, send NO data. manipulate the URL + // and we are done! + if (this._browser_callback) { + // compute the new URL ... + var s = OverbiteCapsBackPathFromSel(w, this._selector); + s = OverbiteURLFromSel(this._host, this._port, + this._itemtype, s); + OverbiteLog("backing up to "+s); + + // briefly stop the load group before we retarget ... + this._listener.onStopRequest(request, this._context, status); + this._listener = null; + this._context = null; + + // ... and force the browser to the new URL. + // we need to biff the current history entry so that + // the caps redirect is seamless. + this._browser_callback.webNavigation.loadURI(s, + 128, // LOAD_FLAGS_REPLACE_HISTORY + null, null, null); + return; + } + + // we are being asked to display the caps, so squirt it out + // to the _listener, and conclude. + var x = ""; + for (var i in w) { + if (w.hasOwnProperty(i)) { + var v = w[i]; + if (v == true) + v = "true"; + if (v == false) + v = "false"; + x += i + " ==> " +w[i] + "
\n"; + } + } + this._feedBeast(request, this._listener, this._context, + x); + this._listener.onStopRequest(request, this._context, status); + this._listener = null; + this._context = null; + }, + + // nsIStreamListener + onDataAvailable : function(request, context, stream, offset, count) { + var nbuf; + + if (!this._sstream) { + // create (and cache) our scriptable input stream + // note: this is NOT BINARY SAFE (but Gopher is + // mostly 7-bit) + this._sstream = Cc["@mozilla.org/scriptableinputstream;1"] + .createInstance(Ci.nsIScriptableInputStream); + this._sstream.init(stream); + } + nbuf = this._sstream.read(count); + this._buf += nbuf; + }, + + // nsIStreamConverter + convert : function(from, to, listener, context) { + // synchronous conversion will not be supported w/o good reason + throw Cr.NS_ERROR_NOT_IMPLEMENTED; + }, + asyncConvertData : function(from, to, listener, context) { + // if this were a real translator, we'd uncomment this +// if (from != ... || to != ...) +// throw Cr.NS_ERROR_NOT_IMPLEMENTED; + this._contentType = to; + this._listener = listener; + this._context = context; + } +} + +/* + * the dotless object handles things like svg and xml that barf on the + * terminal period that certain servers emit, and is also nice for + * text/plain. it is similar to Caps and implements the same interfaces. +*/ + +function OverbiteDotless() { } +OverbiteDotless.prototype = { + + // my stuff + _contentType: null, + _listener : null, + _context : null, + _buf : '', + _sstream : null, + + // useful internal functions + + // feed the beast (i.e., the listener on the other end) + _feedBeast : function(request, listener, context, what) { + // create a new instance each time (instead of reusing one) + // just to make sure the previous instance has time to finish + var stringstream = Cc["@mozilla.org/io/string-input-stream;1"] + .createInstance(Ci.nsIStringInputStream); + stringstream.setData(what, what.length); + listener.onDataAvailable(request, context, + stringstream, 0, what.length); + }, + // charAtEnd allows easier snarfing of trailing characters + _charAtEnd : function(index) { + return this._buf.charAt(this._buf.length - index); + }, + _lopOff : function(index) { + OverbiteLog("dotless removed "+index+" characters"); + this._buf = this._buf.substr(0, this._buf.length - index); + OverbiteLog("now "+this._buf.length+" long"); + }, + + // nsISupports + QueryInterface : XPCOMUtils.generateQI([nsISupports, + nsIStreamListener, + nsIStreamConverter, + nsIRequestObserver]), + + // nsIRequestObserver + onStartRequest : function(request, context) { + // init the channel with data and content type + + var chan = request.QueryInterface(nsIChannel); + if (chan) + chan.contentType = this._contentType; + // from asyncConvertData + this._context = context; + this._buf = ''; + this._listener.onStartRequest(request, context); + }, + + /* this is a very simple construct with a rolling buffer. essentially + we start by priming the pump with a small one character output, + then delaying and buffering data until the last pulse of data and + onStopRequest gets called, which if there is a final dot, should + be in the leftover buffer. */ + + onStopRequest : function(request, context, status) { + // trim the end of _buf + if (this._buf.indexOf(".")) { // don't bother if there's no dot + // check for very specific sequences + var l = this._buf.length; + if (l == 1) + this._buf = ""; // must be a bare dot + else if (this._buf == ".\r\n" || this._buf == ".\n") + this._buf = ""; + else if (this._buf == "\n." || this._buf == "\r\n.") + this._buf = ""; + else if (this._charAtEnd(1) == "." && + this._charAtEnd(2) == "\n"){ + this._lopOff(1); + } else if (this._charAtEnd(1) == "\n") { + if (l > 3 && this._charAtEnd(2) == "\r" && + this._charAtEnd(3) == "." && + this._charAtEnd(4) == "\n") { + this._lopOff(3); + } else if (l > 2 && this._charAtEnd(2) == "." + && this._charAtEnd(3) == "\n") { + this._lopOff(2); + } + } + // otherwise must be some other construction + } + this._feedBeast(request, this._listener, + this._context, this._buf) + if (this._buf.length); + this._buf = ''; + this._listener.onStopRequest(request, this._context, status); + this._listener = null; + this._context = null; + if (this._sstream) + this._sstream.close(); + this._sstream = null; + }, + + // nsIStreamListener + onDataAvailable : function(request, context, stream, offset, count) { + var nbuf; + + if (!this._sstream) { + // create (and cache) our scriptable input stream + // note: this is NOT BINARY SAFE (but Gopher is + // mostly 7-bit) + this._sstream = Cc["@mozilla.org/scriptableinputstream;1"] + .createInstance(Ci.nsIScriptableInputStream); + this._sstream.init(stream); + } + nbuf = this._sstream.read(count); + if (this._buf.length) { + this._feedBeast(request, this._listener, this._context, + this._buf); + this._buf = nbuf; + } else { + if (count == 1) { // degenerate case + this._feedBeast(request, this._listener, + this._context, nbuf); + // come back for more + } else { + this._buf = nbuf.substr(1); + this._feedBeast(request, this._listener, + this._context, nbuf.substr(0,1)); + } + } + }, + + // nsIStreamConverter + convert : function(from, to, listener, context) { + // synchronous conversion will not be supported w/o good reason + throw Cr.NS_ERROR_NOT_IMPLEMENTED; + }, + asyncConvertData : function(from, to, listener, context) { + // if this were a real translator, we'd uncomment this +// if (from != ... || to != ...) +// throw Cr.NS_ERROR_NOT_IMPLEMENTED; + this._contentType = to; + this._listener = listener; + this._context = context; + } +} + +/* + * the converter object for turning a gopher directory into HTML. we no + * longer use HTTP_INDEX because frankly it can't handle all that gopher + * offers. +*/ + +function OverbiteDirconv() { } +OverbiteDirconv.prototype = { + + // my stuff + _listener : null, + _context : null, + _buf : '', + _pbuf : '', + _sstream : null, + _divlevel : 0, + + /* l10n/i18n support and string bundles */ + + // for strings that are already Unicode (like our localization) + _unicodeEntityFix : function(what) { + // needed to ampersand-encode ALT text and other stuff + return "&#" + what.charCodeAt(0) + ";"; + }, + _unicodeStringFix : function(what) { + var q; + q = what; + q = q.replace(/([\u0080-\uFFFF])/g, this._unicodeEntityFix); + return q; + }, + + // we load both itypes and obff because we use both of them now. + _bundle : Cc["@mozilla.org/intl/stringbundle;1"] + .getService(Ci.nsIStringBundleService) + .createBundle(OBFFCHROMEURL + "/locale/itypes.properties"), + _getL10NString : function(msg, args) { + var q; + OverbiteLog("string query: "+msg); + + if (args) + return this._unicodeStringFix( + this._bundle.formatStringFromName(msg, args, + args.length)); + else + return this._unicodeStringFix( + this._bundle.GetStringFromName(msg)); + }, + _obundle : Cc["@mozilla.org/intl/stringbundle;1"] + .getService(Ci.nsIStringBundleService) + .createBundle(OBFFCHROMEURL + "/locale/obff.properties"), + _ogetL10NString : function(msg, args) { + if (args) + return this._obundle.formatStringFromName(msg, args, + args.length); + else + return this._obundle.GetStringFromName(msg); + }, + + _itypes : [ '0', '1', '2', '3', '4', '5', '6', + '7', '8', '9', 'g', 'I', 's', 'h', ';', + 'p', 'd', 'T' ] , + + // useful internal functions + + // feed the beast (i.e., the listener on the other end) + _feedBeast : function(request, listener, context, what) { + // create a new instance each time (instead of reusing one) + // just to make sure the previous instance has time to finish + var stringstream = Cc["@mozilla.org/io/string-input-stream;1"] + .createInstance(Ci.nsIStringInputStream); + stringstream.setData(what, what.length); + listener.onDataAvailable(request, context, + stringstream, 0, what.length); + }, + // mungers and twisters to convert RFC-1436 cdata into valid SGML + _dsSpaceFix : function(what) { + var wout = what; + wout = wout.replace(/ /g, "  "); + wout = wout.replace(/ \ /g, "  "); + wout = wout.replace(/\  /g, "  "); + wout = wout.replace(/^ /, " "); + return wout; + }, + _entityFix : function(what) { + var wout = what; + wout = wout.replace(/\&/g, "&"); + wout = wout.replace(/>/g, ">"); + wout = wout.replace(/' ; + + rootbutt = +'
' + capupurl + +'' + +'
' + +"\n"; + } + whoami = whoami.asciiSpec; + } + if (whoami && whoami.length) { + twhoami = ": "+whoami; + if (whoami.indexOf("?") > -1) + whoami = ((whoami.split("?"))[0]) + "?..."; + else if (whoami.indexOf("%09") > -1) + whoami = ((whoami.split("%09"))[0]) + "?..."; + } + if (!whoami) + whoami = ''; + + var ibuf = +'' + "\n" + +"\n"+ +"\n"+ +'' + "\n" + +'' + "\n" + +"Gopher document" + twhoami + "\n"+ +''+ +'\n"+ +"\n"+ +'
'+ +'
'+ +'
'+ +'
' + whoami + '
' + + "\n" + +rootbutt + +'
'+ +'
' + "\n" + +'' + "\n"; + + // init the channel with data and content type + var chan = request.QueryInterface(nsIChannel); + if (chan) + chan.contentType = 'text/html'; + this._context = context; + this._listener.onStartRequest(request, context); + this._feedBeast(request, this._listener, context, ibuf); + + }, + + onStopRequest : function(request, context, status) { + this._buf += +"
\n"+ +"
\n"+ +"
\n"+ +"\n"+ +"\n"; + + this._feedBeast(request, this._listener, + this._context, this._buf); + this._buf = ''; + this._listener.onStopRequest(request, this._context, status); + this._listener = null; + this._context = null; + if (this._sstream) + this._sstream.close(); + this._sstream = null; + }, + + // nsIStreamListener + onDataAvailable : function(request, context, stream, offset, count) { + var i; + var obuf = ''; + + if (!this._sstream) { + // create (and cache) our scriptable input stream + // note: this is NOT BINARY SAFE (but Gopher is + // mostly 7-bit) + this._sstream = Cc["@mozilla.org/scriptableinputstream;1"] + .createInstance(Ci.nsIScriptableInputStream); + this._sstream.init(stream); + } + this._pbuf += this._sstream.read(count); + while((i = this._pbuf.indexOf("\n")) > -1) { + // pull the next tab-delimited string off the buffer + var w = this._pbuf.substr(0, i); + if (i < this._pbuf.length) + this._pbuf = this._pbuf.substr(i+1); + else + this._pbuf = ''; + + w = w.replace("\r", ""); + w = w.replace("\n", ""); + + var itype = w.substr(0,1); + + var attribs = w.substr(1).split("\t"); + var ds = this._dsSpaceFix(this._entityFix( + attribs.shift())); + if (!ds.length) + ds = " "; + + var sel = attribs.shift(); + if (!sel) + sel = ''; + + var host = attribs.shift(); + if (host && host.length) + host = encodeURI(host); + var port = parseInt(attribs.shift()); + if (isNaN(port)) + port = 0; // falls through to bogosity filter + var icalt = (this._itypes.indexOf(itype) > -1) + ? this._getL10NString(itype) + : this._getL10NString('unknown'); + var iconbase = "gopher:///internal-"; + + if (itype == "'" || itype == '"') { + // these are just going to cause all kinds of + // problems, so they are simply suppressed + obuf += +'\n"; + } else if (itype == 'i' || itype == '3') { + var lclass = (itype == '3') ? 'erroritem' + : 'infoitem'; + if (itype == '3') { + obuf += + '' + + ''; + //+ 'border = "0">'; + } else + obuf += ""; + obuf += '' + + '' + + ds + "\n"; + } else if (host && host.length && port > 1) { + var suburl; + var icon = "icn.png"; + var lclass = "fileitem"; + var spannable = 0; + + if (itype == '8' || itype == 'T') { + // don't let them inject + // arbitrary HTML with " + sel = sel.replace(/["']/g, ""); + suburl = "telnet://" + host + ":" + + port + "/" + sel; + var icon = "icn" + itype + ".png"; + var lclass = "telnetitem"; + icalt = this._getL10NString('telnet'); + } else if (itype == 'h' && + (sel.substr(0,4) == "URL:" || + sel.substr(0,5) == "/URL:")) { + var subn = (sel.substr(0,1) == "/") + ? 5 : 4; + suburl = encodeURI(sel.substr(subn)); + if (suburl.match(/^javascript:/) || + suburl.match(/^data:/)) { + suburl = ""; + ds += + ' (' + this._getL10NString('unsafeurl') + ')'; + } + icon = "icnhURL.png"; + lclass = "urlitem"; + icalt = this._getL10NString('exturl'); + } else if (port >= 80 && itype == 'h' && + sel.match(/^[A-Z]+(%20| )/)) { + sel = sel.replace(/^[A-Z]+(%20| )/,''); + suburl = "http://"+host+":"+port+ + (sel.substr(0,1) == "/" ? + "" : "/") + + encodeURI(unescape(sel)); + icon = "icnhURL.png"; + lclass = "urlitem"; + icalt = this._getL10NString('exturl'); + } else { + suburl = OverbiteURLFromSel(host, port, + itype, sel); + + if (itype == "g" + || itype == "h" + || itype == "p" + || itype == "I" + || itype == "7" + || itype == "0") spannable = 1; + this._divlevel += spannable; + var dl = this._divlevel; + + // attempt to escape weird itypes + var eitype = escape(itype); + if (eitype.length > 1) // it was + eitype = eitype.substr(1) + .toLowerCase(); + icon = (this._itypes.indexOf(itype)>-1) + ? ("icn"+eitype+".png") + : "icn.png"; + lclass = + (itype == '7' || itype == '2') + ? 'searchitem': + (itype == '1') ? 'diritem' : + 'fileitem'; + } + obuf += + ''; + if (spannable) obuf += +''; + obuf += + '' + + '' + + '' + + '' + + '' + + ds + "\n"; + if (spannable) obuf += + ''+ + '
'+"\n"; + + } else { + obuf += // no point in localizing this, I think + "\n"; + } + } + this._feedBeast(request, this._listener, this._context, obuf); + }, + + // nsIStreamConverter + convert : function(from, to, listener, context) { + // synchronous conversion will not be supported w/o good reason + throw Cr.NS_ERROR_NOT_IMPLEMENTED; + }, + asyncConvertData : function(from, to, listener, context) { + // if this were a real translator, we'd uncomment this +// if (from != "text/x-overbite-gopher-dir" || to != "text/html") +// throw Cr.NS_ERROR_NOT_IMPLEMENTED; + this._listener = listener; + this._context = context; + } + +}; + +/* + * the channel object that actually does the protocol negotiation. +*/ + +function OverbiteChannel(input_uri, proxyinfo, loadinfo) { + this.init(input_uri, proxyinfo, loadinfo); +} + +OverbiteChannel.prototype = { + + // my stuff + _itemtype : null, + _selector : null, + _host : null, + _port : null, + _transport : null, + _proxyinfo : null, + _pump : null, + _listener : null, + _context : null, + _progsink : null, + _browser_callback : null, + _is_caps : false, + + // for bug 769764 + _proxyresolveflags : null, + _proxy_uri : null, + + csoargs : '', + queryargs : '', + transreq : null, // actual transmitted request (see sendRequest) + + // we only need itypes for the notification helper. + _bundle : Cc["@mozilla.org/intl/stringbundle;1"] + .getService(Ci.nsIStringBundleService) + .createBundle(OBFFCHROMEURL + "/locale/itypes.properties"), + _getL10NString : function(msg, args) { + var q; + OverbiteLog("string query: "+msg); + + if (args) + return this._bundle.formatStringFromName(msg, args, + args.length); + else + return this._bundle.GetStringFromName(msg); + }, + // for strings that are already Unicode (like our localization) + _unicodeEntityFix : function(what) { + // needed to ampersand-encode ALT text and other stuff + return "&#" + what.charCodeAt(0) + ";"; + }, + _unicodeStringFix : function(what) { + var q; + q = what; + q = q.replace(/([\u0080-\uFFFF])/g, this._unicodeEntityFix); + return q; + }, + + // nsISupports + // we can simplify this later; see nsIProxiedProtocolHandler + QueryInterface : XPCOMUtils.generateQI(((Ci.nsIProtocolProxyCallback) + ? [nsISupports, nsIChannel, nsIRequest, Ci.nsIProtocolProxyCallback] + : [nsISupports, nsIChannel, nsIRequest])), + + // nsIRequest + loadFlags : 0, + name : null, + _pending : false, + isPending : function() { return this._pending; }, + _status : Cr.NS_OK, + _loadGroup : null, + + get status() { + if (this._pump) + return (this._pump.status); + else + return this._status; + }, + set status(status) { this._status = status; }, + cancel : function(status) { + if (this._pump) + return (this._pump.cancel(status)); + else + return Cr.NS_OK; + }, + suspend : function() { + if (this._pump) + return (this._pump.suspend()); + else + return Cr.NS_OK; + }, + resume : function() { + if (this._pump) + return (this._pump.resume()); + else + return Cr.NS_OK; + }, + + // nsIChannel + loadInfo : null, + loadAttributes : null, + contentCharset : null, + contentLength : -1, + contentType : null, + _notificationCallbacks : null , + originalURI : null, + owner : null, + URI : null, + init : function(input_uri, proxyinfo, loadinfo) { + // constructor + this.URI = input_uri; + this.originalURI = input_uri; + this.name = input_uri; + if (proxyinfo) + this._proxyinfo = proxyinfo; + + // process item type and set contentType + var sel = decodeURI(input_uri.path); + if (sel == null || !sel.length || sel == '/') { + this._itemtype = '1'; + this._selector = ''; + } else if (sel.length == 1) { + this._itemtype = sel; + this._selector = ''; + } else { + this._itemtype = sel.substr(1,1); + this._selector = sel.substr(2); + } + + if (!input_uri.host || !input_uri.host.length) + throw Cr.NS_ERROR_MALFORMED_URI; + else + this._host = input_uri.host; + if (!input_uri.port || input_uri.port < 1) + this._port = 70; + else + this._port = input_uri.port; + + // force our itemtype. realistically, the old Gopher let people + // slide a lot with content sniffing, but that's not going to + // happen anymore. this is written to be as rigid as possible + // for a particular itemtype (but see type I, sigh). + var c; + switch(this._itemtype) { + case '1' : + case '7' : + c = 'application/x-overbite-gopher-dir'; + // this lets us override 1.9's gopher support + break; + + case 'c' : + c = 'text/css'; + break; + + case 'x' : + c = 'application/xml'; // I miss text/xml + break; + + case '0' : + case '2' : + c = 'text/plain'; + break; + + case 'g' : + c = 'image/gif' ; + break; + + case 'I' : + // oh, man, this is gross -- designed to + // support both the common use of I for + // JPEG images, and the official spec that + // I is a 'general image type' (we only + // support the ones Mozilla will display) + // + // taken from netwerk/mime/public/nsMimeTypes.h + if (this._selector.match(/\.jpe?g$/i)) + c = 'image/jpeg' ; + else if (this._selector.match(/\.gif$/i)) + c = 'image/gif' ; // grrRRR! use 'g'!! + else if (this._selector.match(/\.xbm$/i)) + c = 'image/x-xbitmap' ; + else if (this._selector.match(/\.png$/i)) + c = 'image/png' ; + else if (this._selector.match(/\.svg$/i)) + c = 'image/svg+xml' ; + else if (this._selector.match(/\.bmp$/i)) + c = 'image/bmp' ; + else if (this._selector.match(/\.icon?$/i)) + c = 'image/x-icon' ; + else if (this._selector.match(/\.tiff?$/i)) + c = 'image/tiff' ; + else + c = 'image/jpeg' ; + // this broke too many things + //c = 'application/octet-stream'; + break; + + case 'h' : + c = 'text/html'; + break; + + case 'p' : + c = 'image/png'; + break; + + case 'd' : + c = 'application/pdf'; + break; + + case '8' : + case 'T' : + throw Cr.NS_ERROR_NOT_IMPLEMENTED; + break; + + default : + c = 'application/octet-stream'; + break; + } + this.contentType = c; + this.loadInfo = loadinfo; + + OverbiteLog(("channel initialized: "+ + this._host + " " + + this._port + " " + + this._itemtype + " " + + this._selector + " " + + "")); + return Cr.NS_OK; + }, + + /* open is not being implemented */ + open : function() { + throw Cr.NS_ERROR_NOT_IMPLEMENTED; + }, + + asyncOpen2 : function (listener) { + return asyncOpen(listener, null); + }, + + asyncOpen : function (listener, context) { + this._listener = listener; + this._context = context; + + // we can simplify this later; see nsIProxiedProtocolHandler + if (Ci.nsIProtocolProxyCallback) { + // if we can do asynchronous proxy resolution, ask + // the proxy service what to do + var nsPPS = Cc["@mozilla.org/network/protocol-proxy-service;1"] + .getService(Ci.nsIProtocolProxyService); + OverbiteLog(("async proxy resolution in progress")); + nsPPS.asyncResolve(this.URI, this._proxyresolveflags, + this); + OverbiteLog(("waiting for proxy")); + } else { + // otherwise assume already synchronously resolved + OverbiteLog(("no proxy callback needed")); + this.onProxyAvailable(null, null, this._proxyinfo, + Cr.NS_OK); + } + }, + + onProxyAvailable : function(request, uri, proxyinfo, status) { + if (proxyinfo) + OverbiteLog(("proxyinfo: "+proxyinfo)); + + this._proxyinfo = proxyinfo; + OverbiteLog(("proxyinfo on; trying to initialize transport")); + + var transportService = Cc["@mozilla.org/network/socket-transport-service;1"] + .getService(Ci.nsISocketTransportService); + this._transport = transportService + .createTransport(null, 0, + this._host, + this._port, + this._proxyinfo); + if (!(this.loadFlags & nsIRequest.LOAD_BACKGROUND)) { + // hook up our event sink to the current UI thread + var cq = Cc["@mozilla.org/thread-manager;1"] + .getService().currentThread; + OverbiteLog("yes, we have sink "+cq); + this._transport.setEventSink(this, cq); + } + // open and initialize the data pump to read from the socket + var sinput = + this._transport.openInputStream(0,0,0); + this.sendRequest(); + this._pump = Cc["@mozilla.org/network/input-stream-pump;1"]. + createInstance(Ci.nsIInputStreamPump); + this._pump.init(sinput, -1, -1, 0, 0, true); + this._pump.asyncRead(this, null); + if (this._loadGroup) { + this._loadGroup.addRequest(this, null); + OverbiteLog("load group added"); + } + this._pending = true; + + // if this is caps, start it and abort now + if (this._is_caps) { + OverbiteLog("caps request in progress"); + var caps = new OverbiteCaps(); + caps._host = this._host; + caps._port = this._port; + caps._itemtype = this._itemtype; + caps._selector = this._selector; + caps.asyncConvertData( + 'generic/caps', + this.contentType, + this._listener, + this._context); + this._listener = caps; + this._context = null; + caps._browser_callback = this._browser_callback; + OverbiteLog(("now with caps: "+caps)); + return Cr.NS_OK; + } + + // push on another content listener (in this case us) for + // those itemtypes requiring translation to something else + var transitives = [ '1', '7' ]; // item types for translation + if (transitives.indexOf(this._itemtype) > -1) { + OverbiteLog(("this type requires translation")); + var dirconv = new OverbiteDirconv(); + dirconv.asyncConvertData( + 'application/x-overbite-gopher-dir', + 'text/html', + this._listener, + this._context); + this._listener = dirconv; + this._context = null; + OverbiteLog(("now with dirconv: "+dirconv)); + } + // dotless conversion + var prefs = Cc["@mozilla.org/preferences-service;1"] + .getService(Ci.nsIPrefBranch); + var do_dotless = true; + // first load hidden preference for dotless + if (prefs.getPrefType(OBFFDOTLESSPREF) == prefs.PREF_BOOL) { + do_dotless = prefs.getBoolPref(OBFFDOTLESSPREF); + OverbiteLog(("dotless has been set to "+do_dotless)); + // otherwise default is true + } else { + OverbiteLog(("no "+OBFFDOTLESSPREF+" not bool")); + } + if (do_dotless && ( + this.contentType.match(/^text\//) || + this.contentType == 'application/xml' || + this.contentType == 'image/svg+xml' || + 0)) { + OverbiteLog("this type needs to be dotless"); + var dotless = new OverbiteDotless(); + dotless.asyncConvertData( + 'generic/dotless-type', + this.contentType, + this._listener, + this._context); + this._listener = dotless; + this._context = null; + OverbiteLog(("now with dotless: "+dotless)); + } + OverbiteLog(("transport service for "+ + this._host + " initialized")); + return Cr.NS_OK; + }, + + get loadGroup() { return this._loadGroup; }, + set loadGroup(loadGroup) { + this._loadGroup = loadGroup; + this._progsink = null; + }, + get notificationCallbacks() { + return this._notificationCallbacks; + }, + set notificationCallbacks(nc) { + this._notificationCallbacks = nc; + this._progsink = null; + }, + get securityInfo() { + if (this._transport) + return this._transport.securityInfo; + //throw Cr.NS_ERROR_NOT_AVAILABLE; + return null; + }, + // set securityInfo? bwahahaha + set securityInfo(foo) { + throw Cr.NS_ERROR_NOT_IMPLEMENTED; + return null; + }, + + + onStartRequest : function(request, context) { + if (this._listener) + this._listener.onStartRequest(this, + this._context); + OverbiteLog(("onStartRequest"+this._listener)); + }, + onStopRequest : function(request, context, status) { + OverbiteLog(("onStopRequest: "+status)); + if(Components.isSuccessCode(status)) + this.status = status; + + if (this._listener) { + this._listener.onStopRequest(this, + this._context, + this.status); + OverbiteLog("listener stopped"); + this._listener = null; + this._context = null; + } + if (this._loadGroup) { + this._loadGroup.removeRequest(this, + context, // null, + this.status); + OverbiteLog("load group stopped"); + } + + this._pump = null; + this._transport.close(this.status); + this._transport = null; + this.notificationCallbacks = null; // use our own getter/setter + this._progsink = null; + this._pending = false; + + OverbiteLog("end of request"); + + // Attach a notification box for navigation. + // Attach only iff: + // - the tab URL matches ours. (We could be in an iframe.) + // - there is no notification box there already. + // - this is not a gopher menu. We do this in the HTML instead. + // Backing up to a menu doesn't restore this box, so we should + // only do this to a terminal document. + var transitives = [ '1', '7' ]; // item types that are menus + if (transitives.indexOf(this._itemtype) == -1) { + try { // no meaning if this fails. + OverbiteLog("attempting to load nav bar "+this.originalURI.spec); + // XXX try selected tab first for speed? + + // Iterate over all windows and tabs to find us. + // If there are multiple instances, add the box; it + // won't hurt (as long as we didn't before). + + var wm = Cc["@mozilla.org/appshell/window-mediator;1"] + .getService(Ci.nsIWindowMediator); + var be = wm.getEnumerator("navigator:browser"); + while(be.hasMoreElements()) { + var win = be.getNext(); + var tabb = win.gBrowser; + + // check each tab + var tabs = tabb.browsers.length; + for (var i=0; i 1 && + (input_uri.path.charAt(input_uri.path.length-1) == "/" || + input_uri.path.match(/^\/[^1]$/))) { + var prefs = Cc["@mozilla.org/preferences-service;1"] + .getService(Ci.nsIPrefBranch); + // first load hidden preference for cluefulness + if (prefs.getPrefType(OBFFFIXITYPEPREF) == + prefs.PREF_BOOL) { + rv = prefs.getBoolPref(OBFFFIXITYPEPREF); + // this is our default answer + } else { + rv = OverbitePrompter("swapitype", function() { + return prompter.confirm(null, + self._getL10NString('swapitype.title'), + self._getL10NString('swapitype')) + }); + } + if (rv) { + var newuri = "gopher://" + input_uri.host + + ((input_uri.port == 70 || + input_uri.port == -1) ? "" : + (":"+input_uri.port)) + + "/1" + input_uri.path.substr(2); + this._getBrowser().webNavigation.loadURI( + newuri, 0, null, null, null); + // this is a bit cheap, but we don't want + // Fx freaking that we didn't give it a channel + throw Cr.NS_ERROR_ABORT; + return null; // above will do redirect + } else { + // INSERT COINS AND CONTINUE + } + } + + // handle itemtype 7 at this stage and turn into a channel + // for itemtype 1 instead, except if this particular URL has + // arguments (but wouldn't you want to do that as itype 1?). + if (input_uri.path.substr(0,2) == "/7" && + input_uri.path.indexOf("?") == -1 && + input_uri.path.indexOf("%09") == -1) { + // we will accept "blank" responses -- could be valid + // use the global prompter objects + var rv = OverbitePrompter("search", function() { + return prompter.prompt(null, + self._getL10NString('search.title'), + self._getL10NString('search'), + query, null, chequestub) + }); + if (!rv) { + throw Cr.NS_ERROR_ABORT; + return null; + } + // stuff query into channel query args rather than + // kludging it into a URL + var ob = new OverbiteChannel(input_uri, proxyinfo, + loadinfo); + ob._proxyresolveflags = proxyresolveflags; + ob._proxy_uri = proxy_uri; + ob.queryargs = query.value; + return ob; + } + + // similarly handle itemtype 2 + // if it's /2....fjhgkrjgh then pass that on to the CSO server + // (it's a fully qualified query that requires no parsing) + if (input_uri.path == "/2" || input_uri.path == "/2/") { + // unlike itype 7 we MUST enter a query for this + var rv = OverbitePrompter("cso", function() { + return prompter.prompt(null, + self._getL10NString('cso.title'), + self._getL10NString('cso'), + query, null, chequestub) + }); + if (rv && !query.value.length) // blank query + OverbitePrompter("csobogus", function() { + prompter.alert(null, + self._getL10NString('csobogus.title'), + self._getL10NString('csobogus')) + }); + if (!rv || !query.value.length) { + throw Cr.NS_ERROR_ABORT; + return null; + } + // stuff query into channel csoargs + var ob = new OverbiteChannel(input_uri, proxyinfo, + loadinfo); + ob._proxyresolveflags = proxyresolveflags; + ob._proxy_uri = proxy_uri; + ob.csoargs = query.value; + return ob; + } + + // make chrome channel either to images or CSS if + // input_uri is "gopher:///internal-" and no / and + // extension is .png, .css or .js + if (!input_uri.host.length && + // PARANOIA STRIKES DEEP IN THE HEARTLAND!!!1 + !input_uri.path.substr(1).match(/\//) && + input_uri.path.match(/^\/internal-[^/ ]+\.(css|png|js)$/)) { + OverbiteLog("handling internal chrome: " + +input_uri.asciiSpec); + var IURL; + var mpath = input_uri.path.substr(1) + .replace(/^internal-/, ""); + + // try profile directory + var dirService = Cc["@mozilla.org/file/directory_service;1"] + .getService(Ci.nsIProperties); + + var uprof = dirService.get("ProfD", Ci.nsIFile); + var basedir = "gopherchrome"; + //uprof.appendRelativePath(basedir); + uprof.append(basedir); + + if (uprof.exists() && uprof.isDirectory()) { + // use the user's gopherchrome directory for + // CSS, icons and content level javascript + OverbiteLog("trying user directory"); + var fileProServ = Cc["@mozilla.org/network/io-service;1"] + .getService(Ci.nsIIOService) + .getProtocolHandler("file") + .QueryInterface(Ci + .nsIFileProtocolHandler); + + uprof.append(mpath); + if (uprof.exists() && uprof.isFile()) + IURL = fileProServ.getURLSpecFromFile( + uprof); + } + if (!IURL) { + OverbiteLog("trying internal chrome dir"); + IURL = OBFFCHROMEURL+ "/content/chrome/" + +mpath; + } + OverbiteLog("resulting URL: "+IURL); + return ioService.newChannel(IURL, null, null); + } + + // otherwise + // make chrome channel to about page if + // input_uri lacks a hostname + if (!input_uri.host.length) { + OverbiteLog("internal about page served up instead"); + OverbiteSetPrefs(); // sigh + + // SEKRIT FUNKTION. gopher:/// clears the caps cache + capscache = new Object(); + OverbiteLogAlways("caps cache is cleared"); + + return ioService.newChannel( + OBFFABOUTURL, + null, null); + } + + // otherwise + // immediately reject "pseudo" item types we don't handle + // do this here because it traps internal URLs + var wontshow = ['/i', '/3', '/8', '/T']; + if (input_uri.path && input_uri.path.length > 1 && + wontshow.indexOf(input_uri.path.substr(0,2)) > -1) { + OverbitePrompter("baditype", function() { + prompter.alert(null, + self._getL10NString('baditype.title'), + self._getL10NString('baditype')) + }); + throw Cr.NS_ERROR_ABORT; + return null; + } + + // silently reject port numbers we will never allow + //if (badports.indexOf(input_uri.port) > -1) { + if (input_uri.port && input_uri.port >= 0 + && alwayslet.indexOf(input_uri.port)== -1) { + OverbiteLog("illegal port: "+input_uri.port); + throw Cr.NS_ERROR_PORT_ACCESS_NOT_ALLOWED; + return null; + } + + // else it's a legit gopher request + // make our channel and gopher it + ob = new OverbiteChannel(input_uri, proxyinfo, loadinfo); + ob._proxyresolveflags = proxyresolveflags; + ob._proxy_uri = proxy_uri; + return ob; + } +}; + +/* Startup code */ + +var components = [ OverbiteProtocol ]; +function NSGetModule(compMgr, fileSpec) { + return XPCOMUtils.generateModule(components); +} +/* for Gecko 2 (deprecated) */ +if (XPCOMUtils.generateNSGetFactory) + var NSGetFactory = XPCOMUtils.generateNSGetFactory(components); + +function OverbiteSetPrefs() { + var prefs = Cc["@mozilla.org/preferences-service;1"]; + var prefserv = prefs.getService(Ci.nsIPrefService); + prefs = prefs.getService(Ci.nsIPrefBranch); + prefs.setIntPref(OBFFBUILDPREF, OBFFBUILD); + prefserv.savePrefFile(null); +} + +OverbiteLog("startup with version "+OBFFVERS+" build "+OBFFBUILD); + +var prefs = Cc["@mozilla.org/preferences-service;1"]; +var prefserv = prefs.getService(Ci.nsIPrefService); +prefs = prefs.getService(Ci.nsIPrefBranch); + +if (prefs.getPrefType(OBFFBUILDPREF) != prefs.PREF_INT || + prefs.getIntPref(OBFFBUILDPREF) < OBFFBUILD) { + var obs = Cc["@mozilla.org/observer-service;1"] + .getService(Ci.nsIObserverService); + + // create an observer to wait for the top level window + // and then take it over for startup + var listeno = { + _timer : null, + _window : null, +/* TEMPORARY HACK: Complain in the brag screen if this is an e10s window. */ + _e10s : false, + + // nsISupports + QueryInterface : XPCOMUtils.generateQI([nsISupports, + nsIObserver, + nsITimerCallback]), + + // nsITimerCallback + notify : function(timer) { + OverbiteLog("timer tripped"); + this._timer = null; + this._window.focus(); + this._window.getBrowser().selectedTab = + this._window.getBrowser().addTab(OBFFIABOUTURL+ +/* TEMPORARY HACK: Complain in the brag screen if this is an e10s window. */ + ((this._e10s) ? "#e10s" : "")); + this._window = null; + }, + + // nsIObserver + observe : function(subject, topic, data) { + // we're not picky about topic, since it + // is designed to respond to *at least* two. + OverbiteLog("observer tripped by topic: "+topic); + +/* TEMPORARY HACK: Complain in the brag screen if this is an e10s window. */ + if (subject && subject.gMultiProcessBrowser) + this._e10s = true; // damn + + var obs = Cc["@mozilla.org/observer-service;1"] + .getService(Ci.nsIObserverService); + var wm = Cc["@mozilla.org/appshell/window-mediator;1"] + .getService(Ci.nsIWindowMediator); + + var w = wm.getMostRecentWindow('navigator:browser'); + if (!w) + return; // and live to hook another day + OverbiteLog("trying window"); + this._window = w; + + // for some reason this doesn't work until the window appears + // so we do it at the window opening level + var prefs = Cc["@mozilla.org/preferences-service;1"]; + var prefserv = prefs.getService(Ci.nsIPrefService); + prefs = prefs.getService(Ci.nsIPrefBranch); + + if (prefs.getPrefType(OBFFBUILDPREF) != + prefs.PREF_INT || + prefs.getIntPref(OBFFBUILDPREF) < + OBFFBUILD) { + // save even if the tab fails -- we + // only want to try this the first time + prefs.setIntPref(OBFFBUILDPREF, OBFFBUILD); + prefserv.savePrefFile(null); + OverbiteLog("prefs set"); + + this._timer = Cc["@mozilla.org/timer;1"] + .createInstance(Ci.nsITimer); + this._timer.initWithCallback(this, 2000, 0); + } + obs.removeObserver(this, topic); + return; + } + }; + + obs.addObserver(listeno, "sessionstore-windows-restored", false); + obs.addObserver(listeno, "browser-delayed-startup-finished", false); + OverbiteLog("no window yet, listener installed"); +} + diff --git a/browser/gopher/content/chrome/favicon.png b/browser/gopher/content/chrome/favicon.png new file mode 100644 index 0000000000..b1bd4a558f Binary files /dev/null and b/browser/gopher/content/chrome/favicon.png differ diff --git a/browser/gopher/content/chrome/gopherchrome.css b/browser/gopher/content/chrome/gopherchrome.css new file mode 100644 index 0000000000..85f17800a6 --- /dev/null +++ b/browser/gopher/content/chrome/gopherchrome.css @@ -0,0 +1,150 @@ +/* You can modify this to your heart's content. This version tries to + harmonize with your computer's theme. */ + +img.gicon { + border: 0px; +} +table.gmenu { + width: 100%; + border: 0px; +} +td.gicon { + text-align: right; + vertical-align: middle; + padding: 0px; + margin: 1px; +} +td.ds { + text-align: left; + vertical-align: middle; + width: 100%; + padding: 0px; + margin: 1px; +} +span.diritem { + font-family: lucida sans typewriter, lucida console, droid sans mono, liberation mono, monaco, andale mono, bitstream vera sans mono, monospace; + font-size: small; +} +span.fileitem { + font-family: lucida sans typewriter, lucida console, droid sans mono, liberation mono, monaco, andale mono, bitstream vera sans mono, monospace; + font-size: small; +} +span.infoitem { + font-family: lucida sans typewriter, lucida console, droid sans mono, liberation mono, monaco, andale mono, bitstream vera sans mono, monospace; + font-size: small; + opacity: 0.9; +} +span.searchitem { + font-family: lucida sans typewriter, lucida console, droid sans mono, liberation mono, monaco, andale mono, bitstream vera sans mono, monospace; + font-size: small; + font-weight: bold; +} +span.urlitem { + font-family: lucida sans typewriter, lucida console, droid sans mono, liberation mono, monaco, andale mono, bitstream vera sans mono, monospace; + font-size: small; + font-weight: bold; +} +span.telnetitem { + font-family: lucida sans typewriter, lucida console, droid sans mono, liberation mono, monaco, andale mono, bitstream vera sans mono, monospace; + font-size: small; + font-weight: bold; +} +span.erroritem { + font-family: lucida sans typewriter, lucida console, droid sans mono, liberation mono, monaco, andale mono, bitstream vera sans mono, monospace; + font-size: small; + font-weight: bold; +} +span.purl { + /* font-family: lucida sans, lucida grande, droid sans, droid sans mono, monospace; */ + font: message-box; + font-weight: bold; + font-size: 1.5em; +} +div#topbar { + display: table-row; + padding: 0px; + margin: 0px; +} +div#urlparent { + display: table-cell; + width: 100%; + text-align: left; + padding: 0px; + margin: 0px; +} +div#urlarea { + padding: 8px; + margin-bottom: 0px; + border-style: none; + border-top-width: 1px; + border-left-width: 1px; + border-right-width: 1px; + border-bottom-width: 0px; + border-top-left-radius: 10px; + border-top-right-radius: 10px; + -moz-border-radius-topleft: 10px; + -moz-border-radius-topright: 10px; + display: table-cell; + vertical-align: text-bottom; +} +div#buttonarea { + padding: 8px; + margin-bottom: 0px; + border-color: ThreeDShadow; + border-style: solid; + border-top-width: 1px; + border-left-width: 1px; + border-right-width: 1px; + border-bottom-width: 0px; + display: table-cell; + border-top-left-radius: 10px; + border-top-right-radius: 10px; + -moz-border-radius-topleft: 10px; + -moz-border-radius-topright: 10px; +} +div#contentarea { + clear: both; + padding: 5px; + margin-top: 0px; + border-style: solid; + border-width: 1px; + border-color: ThreeDShadow; + -moz-border-radius-topleft: 10px; + -moz-border-radius-bottomleft: 10px; + -moz-border-radius-bottomright: 10px; + border-top-left-radius: 10px; + border-bottom-left-radius: 10px; + border-bottom-right-radius: 10px; +} +div#everything { + background-color: #ffffff; + -moz-border-radius: 10px; + border-radius: 10px; +} +body { + background-color: -moz-Dialog; +} +a.plus { + text-decoration: none; + font-family: monospace; + font-weight: bold; + font-size: 2.0em; + padding-right: 2px; + color: #000000; +} +span.inlineprompt { + font: message-box; +} +div.inlineprompt { + border: 1px solid #b0b0b0; + background-color: #d8d8c8; + -moz-border-radius-topleft: 7px; + -moz-border-radius-topright: 7px; + -moz-border-radius-bottomleft: 7px; + -moz-border-radius-bottomright: 7px; + border-top-left-radius: 7px; + border-top-right-radius: 7px; + border-bottom-left-radius: 7px; + border-bottom-right-radius: 7px; + padding: 10px; +} diff --git a/browser/gopher/content/chrome/icn.png b/browser/gopher/content/chrome/icn.png new file mode 100644 index 0000000000..03d5e71490 Binary files /dev/null and b/browser/gopher/content/chrome/icn.png differ diff --git a/browser/gopher/content/chrome/icn0.png b/browser/gopher/content/chrome/icn0.png new file mode 100644 index 0000000000..35fe814acb Binary files /dev/null and b/browser/gopher/content/chrome/icn0.png differ diff --git a/browser/gopher/content/chrome/icn1.png b/browser/gopher/content/chrome/icn1.png new file mode 100644 index 0000000000..8bef0842df Binary files /dev/null and b/browser/gopher/content/chrome/icn1.png differ diff --git a/browser/gopher/content/chrome/icn2.png b/browser/gopher/content/chrome/icn2.png new file mode 100644 index 0000000000..bcd2c66d20 Binary files /dev/null and b/browser/gopher/content/chrome/icn2.png differ diff --git a/browser/gopher/content/chrome/icn3.png b/browser/gopher/content/chrome/icn3.png new file mode 100644 index 0000000000..947538bf93 Binary files /dev/null and b/browser/gopher/content/chrome/icn3.png differ diff --git a/browser/gopher/content/chrome/icn3b.png b/browser/gopher/content/chrome/icn3b.png new file mode 100644 index 0000000000..fe07681eac Binary files /dev/null and b/browser/gopher/content/chrome/icn3b.png differ diff --git a/browser/gopher/content/chrome/icn4.png b/browser/gopher/content/chrome/icn4.png new file mode 100644 index 0000000000..5b0ebe6e90 Binary files /dev/null and b/browser/gopher/content/chrome/icn4.png differ diff --git a/browser/gopher/content/chrome/icn5.png b/browser/gopher/content/chrome/icn5.png new file mode 100644 index 0000000000..5b0ebe6e90 Binary files /dev/null and b/browser/gopher/content/chrome/icn5.png differ diff --git a/browser/gopher/content/chrome/icn6.png b/browser/gopher/content/chrome/icn6.png new file mode 100644 index 0000000000..5b0ebe6e90 Binary files /dev/null and b/browser/gopher/content/chrome/icn6.png differ diff --git a/browser/gopher/content/chrome/icn7.png b/browser/gopher/content/chrome/icn7.png new file mode 100644 index 0000000000..bcd2c66d20 Binary files /dev/null and b/browser/gopher/content/chrome/icn7.png differ diff --git a/browser/gopher/content/chrome/icn8.png b/browser/gopher/content/chrome/icn8.png new file mode 100644 index 0000000000..629cd3eb22 Binary files /dev/null and b/browser/gopher/content/chrome/icn8.png differ diff --git a/browser/gopher/content/chrome/icn9.png b/browser/gopher/content/chrome/icn9.png new file mode 100644 index 0000000000..5b0ebe6e90 Binary files /dev/null and b/browser/gopher/content/chrome/icn9.png differ diff --git a/browser/gopher/content/chrome/icnI.png b/browser/gopher/content/chrome/icnI.png new file mode 100644 index 0000000000..dc1e0c4bc7 Binary files /dev/null and b/browser/gopher/content/chrome/icnI.png differ diff --git a/browser/gopher/content/chrome/icnT.png b/browser/gopher/content/chrome/icnT.png new file mode 100644 index 0000000000..629cd3eb22 Binary files /dev/null and b/browser/gopher/content/chrome/icnT.png differ diff --git a/browser/gopher/content/chrome/icnd.png b/browser/gopher/content/chrome/icnd.png new file mode 100644 index 0000000000..9c1814f145 Binary files /dev/null and b/browser/gopher/content/chrome/icnd.png differ diff --git a/browser/gopher/content/chrome/icng.png b/browser/gopher/content/chrome/icng.png new file mode 100644 index 0000000000..dc1e0c4bc7 Binary files /dev/null and b/browser/gopher/content/chrome/icng.png differ diff --git a/browser/gopher/content/chrome/icnh.png b/browser/gopher/content/chrome/icnh.png new file mode 100644 index 0000000000..0ca7da3ae9 Binary files /dev/null and b/browser/gopher/content/chrome/icnh.png differ diff --git a/browser/gopher/content/chrome/icnhURL.png b/browser/gopher/content/chrome/icnhURL.png new file mode 100644 index 0000000000..c6e7de5c7e Binary files /dev/null and b/browser/gopher/content/chrome/icnhURL.png differ diff --git a/browser/gopher/content/chrome/icnp.png b/browser/gopher/content/chrome/icnp.png new file mode 100644 index 0000000000..dc1e0c4bc7 Binary files /dev/null and b/browser/gopher/content/chrome/icnp.png differ diff --git a/browser/gopher/content/chrome/icns.png b/browser/gopher/content/chrome/icns.png new file mode 100644 index 0000000000..dff7c2123a Binary files /dev/null and b/browser/gopher/content/chrome/icns.png differ diff --git a/browser/gopher/content/chrome/interface.js b/browser/gopher/content/chrome/interface.js new file mode 100644 index 0000000000..f3a2acedc2 --- /dev/null +++ b/browser/gopher/content/chrome/interface.js @@ -0,0 +1,180 @@ +/* + +This code is issued under a disjunctive tri-license giving you the choice of +one of the three following sets of free software/open source licensing terms: + + * Mozilla Public License, version 1.1 + * GNU General Public License, version 2.0 + * GNU Lesser General Public License, version 2.1 + +For users under the Mozilla Public License: + +The contents of this file are subject to the Mozilla Public License +Version 1.1 (the "License"); you may not use this file except in +compliance with the License. You may obtain a copy of the License at +http://www.mozilla.org/MPL/ + +Software distributed under the License is distributed on an "AS IS" +basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +License for the specific language governing rights and limitations +under the License. + +The Original Code is the OverbiteFF Gopher addon. + +The Initial Developer of the Original Code is Cameron Kaiser. +Portions created by Cameron Kaiser are Copyright (C) 2008-2016 +Cameron Kaiser. All Rights Reserved. Copyright (C) 2008-2016 Contributors +to the Overbite Project. + +For users under the GNU Public License: + +OverbiteFF Gopher/CSO Firefox addon +Copyright (C) 2008-2016 Cameron Kaiser +Copyright (C) 2008-2016 Contributors to the Overbite Project + +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; version 2. + +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. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +[ or http://www.gnu.org/licenses/gpl-2.0.html ] + +For users under the GNU Lesser General Public License: + +OverbiteFF Gopher/CSO Firefox addon +Copyright (C) 2008-2016 Cameron Kaiser +Copyright (C) 2008-2016 Contributors to the Overbite Project + +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; version 2.1. + +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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +[ or http://www.gnu.org/licenses/lgpl-2.1.html ] + +*/ + +/* This controls the JavaScript interface. This runs with content privileges, + not with chrome privileges, by design. It can be blocked by NoScript and + other such tools. It cannot call back to chrome, so it ought not be + naughty. Assuming Mozilla did their job. COW's n'at. */ + +var openstates = new Object(); +var opacstates = new Object(); +var timestates = new Object(); +var localization = new Object(); +const outtime = 30; + +/* Function names are short because: + 1. I am a lousy programmer + 2. I don't care + 3. To avoid lots of crap */ + +/* Reviewer note: You'll see lots of simplistic templating below. The + functions are being called by the HTML generated for gopher menus in + the main nsIChannel object. The nsIChannel thoroughly sanitizes them. + They are never directly called by anything that gets unfiltered user + input, and this script runs with content privileges, not chrome. */ + +// Store something in localization (passed from chrome bundle) +function l(x, z) { + localization[x] = decodeURI(z); +} + +// Create the disclosure "icon" +function w(x, y, z) { + document.write('+'); +} + +// Toggle the disclosure icon, and insert the page image or iframe or +// form for [pgI], [0h] or 7. This uses the
scaffolding that chrome +// has already set up for us; we just fill it in. +function x(x, y, z) { + if (!openstates[z]) { + var h = window.innerHeight / 3; + openstates[z] = 1; + document.getElementById("pl"+z).innerHTML = "-"; + if (timestates[z]) + clearTimeout(timestates[z]); + try { + document.getElementById("pv"+z).style.opacity = 0.0; + opacstates[z] = 0.0; + timestates[z] = setTimeout("fade("+z+")", outtime); + } catch(e) { alert(e); } + if (y == "p" || y == "g" || y == "I") { + document.getElementById("pv"+z).innerHTML = +'' + } else if (y == "7") { + document.getElementById("pv"+z).innerHTML = +'
'+ +'
'+ +''+localization[0]+'

'+ +' ' + + '
'; + document.getElementById("src"+z).focus(); + } else { + document.getElementById("pv"+z).innerHTML = +''; + } + } else { + openstates[z] = 0; + if (timestates[z]) + clearTimeout(timestates[z]); + timestates[z] = null; + document.getElementById("pl"+z).innerHTML = "+"; + document.getElementById("pv"+z).innerHTML = ""; + } + return false; +} + +// Resize images (onLoad handler for images) +function s(i) { + var w = window.innerWidth - 100; + if (!i.width) return; + if (i.width > w) { + i.width = w; + i.height = w / (i.width / i.height); + } +} + +// Dynamically turn a form into a Gopher item type 7 query +function f(u, r) { + window.location=u+"%09"+encodeURI(document.getElementById("src"+r).value); + return false; +} + +function fade(z) { + opacstates[z] += 0.1; + document.getElementById("pv"+z).style.opacity = opacstates[z]; + if (opacstates[z] >= 1.0) { + timestates[z] = null; + } else { + timestates[z] = setTimeout("fade("+z+")", outtime); + } +} +// future expansion +function edaf(z) { + opacstates[z] -= 0.1; + document.getElementById("pv"+z).style.opacity = opacstates[z]; + if (opacstates[z] <= 0.0) { + timestates[z] = null; + } else { + timestates[z] = setTimeout("edaf("+z+")", outtime); + } +} diff --git a/browser/gopher/content/chrome/root.png b/browser/gopher/content/chrome/root.png new file mode 100644 index 0000000000..5c5a24262c Binary files /dev/null and b/browser/gopher/content/chrome/root.png differ diff --git a/browser/gopher/content/chrome/up.png b/browser/gopher/content/chrome/up.png new file mode 100644 index 0000000000..d465b5c1d8 Binary files /dev/null and b/browser/gopher/content/chrome/up.png differ diff --git a/browser/gopher/content/infobabe.html b/browser/gopher/content/infobabe.html new file mode 100644 index 0000000000..169b1921f0 --- /dev/null +++ b/browser/gopher/content/infobabe.html @@ -0,0 +1,356 @@ + + + + + + +About OverbiteFF + + + + + +
+
+ +
+
+ + +| + +
+
+ +
+
+

OverbiteFF

+
+ +
+
Version +3.1-Mozilla +() +
+
+
+ +
+
+ +
+ +Cameron Kaiser +
+ +
+ +
+Cato Auestad, +Shaine Mata, +David Meyer, +Máté Nagy, +Roman Pavlov, +Jacob Dahl Pind, +Jeroen Schot, +Dennis Schulmeister, +B.J. Stobiecki, +Benoit Triquet, +Stegozor +
+ +
+ +
+Cato Auestad, +Sridhar Ayengar, +Michael Casadevall, +Philip Chee, +John Goerzen, +Brian Koontz, +Jacob Head, +David Meyer, +Avery Morrow, +José Moya, +Máté Nagy, +Roman Pavlov, +Jacob Dahl Pind, +Rob Sayers, +Jeroen Schot, +Dennis Schulmeister, +B.J. Stobiecki, +Benoit Triquet, +Peter Tynan, +Stegozor +
+ +
+Copyright © 2008- Contributors to the +Overbite Project. + +
+ +
+Overbite Mascot, Copyright © 2008- Cameron Kaiser. + + +
+ +
+ +
+ + +
+Mozilla Public License +| +GNU Public License +v2 +| +GNU Lesser +Public License v2.1 +
+ + + diff --git a/browser/gopher/content/mascot.png b/browser/gopher/content/mascot.png new file mode 100644 index 0000000000..dd70e21ab5 Binary files /dev/null and b/browser/gopher/content/mascot.png differ diff --git a/browser/gopher/defaults/preferences/overbiteff.js b/browser/gopher/defaults/preferences/overbiteff.js new file mode 100644 index 0000000000..741c51cc92 --- /dev/null +++ b/browser/gopher/defaults/preferences/overbiteff.js @@ -0,0 +1 @@ +pref("extensions.overbiteff.buildmark", 0); diff --git a/browser/gopher/jar.mn b/browser/gopher/jar.mn new file mode 100644 index 0000000000..8e02497a64 --- /dev/null +++ b/browser/gopher/jar.mn @@ -0,0 +1,34 @@ +# -*- Mode: makefile; tab-width: 8; indent-tabs-mode: t; -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +gopher.jar: +% content overbiteff %content/ +% locale overbiteff da-DK %locale/da-DK/ +% locale overbiteff de-DE %locale/de-DE/ +% locale overbiteff en-US %locale/en-US/ +% locale overbiteff es-ES %locale/es-ES/ +% locale overbiteff fr-FR %locale/fr-FR/ +% locale overbiteff hu-HU %locale/hu-HU/ +% locale overbiteff ja-JP %locale/ja-JP/ +% locale overbiteff nb-NO %locale/nb-NO/ +% locale overbiteff nl-NL %locale/nl-NL/ +% locale overbiteff pl-PL %locale/pl-PL/ +% locale overbiteff ru-RU %locale/ru-RU/ +% locale overbiteff tr-TR %locale/tr-TR/ + + content/ (content/*) + content/chrome/ (content/chrome/*) + locale/da-DK/ (locale/da-DK/*) + locale/de-DE/ (locale/de-DE/*) + locale/en-US/ (locale/en-US/*) + locale/es-ES/ (locale/es-ES/*) + locale/fr-FR/ (locale/fr-FR/*) + locale/hu-HU/ (locale/hu-HU/*) + locale/ja-JP/ (locale/ja-JP/*) + locale/nb-NO/ (locale/nb-NO/*) + locale/nl-NL/ (locale/nl-NL/*) + locale/pl-PL/ (locale/pl-PL/*) + locale/ru-RU/ (locale/ru-RU/*) + locale/tr-TR/ (locale/tr-TR/*) diff --git a/browser/gopher/locale/da-DK/aboutp.properties b/browser/gopher/locale/da-DK/aboutp.properties new file mode 100644 index 0000000000..90dc55da86 --- /dev/null +++ b/browser/gopher/locale/da-DK/aboutp.properties @@ -0,0 +1,13 @@ +oinstalled=OverbiteFF synes at være blevet installert vellykket. +ostartwith=Start Gopher med +v2=Søg med Veronica-2 +world=Floodgap list over servere +blurb=Gopher tilføjelsen til Mozilla Firefox og SeaMonkey +programming=Programming +testers=Testere +l10n=Lokalisering/Internationalisering +allrights=Alle rettigheder forbeholdes. +logolicense=Overbite maskotten optræder i OverbiteFF under Creative Commons BY-NC-ND licensen. +iconlicense=Visse ikoner og GUI elementer brugt i OverbiteFF stammer oprindeligt fra Netscape Navigator og Mozilla Project, og er underlagt vilkårene fra Mozilla Public Licensen. Adobe Acrobat og Acrobat logoet er registered varemærker fra Adobe Systems, Inc. +codelicense1=Alt andet orginalt materiale i OverbiteFF er distribueret under Mozilla Public License/GNU Public License/GNU Lesser Public License. +codelicense2=Brug udeover denne license er strengt forbudt. diff --git a/browser/gopher/locale/da-DK/itypes.properties b/browser/gopher/locale/da-DK/itypes.properties new file mode 100644 index 0000000000..0684749a5d --- /dev/null +++ b/browser/gopher/locale/da-DK/itypes.properties @@ -0,0 +1,25 @@ +unknown=Ukendt type +telnet=Forbundet til vært gennem Telnet/TN3270 +exturl=Ekstern URL +unsafeurl=Usikkert URL data udeladt +backpath=Gå til roden af denne server +uplev=Up +preview=View inline +0=Tekst dokument +1=Gopher menu +2=CSO/ph/qi telefone søgning +3=Gopher fejl +4=BinHex arkive +5=ZIP eller binært arkive +6=UUenkoded arkive +7=Applikation eller søgemaskine +8=Telnet forbindelse +9=Binær file +g=GIF billede +I=JPEG eller andet generisk billede +s=Lyd file +h=HTML file +;=Film/animations file +p=PNG billede +d=PDF dokument +T=Telnet/TN3270 forbindelse diff --git a/browser/gopher/locale/da-DK/obff.properties b/browser/gopher/locale/da-DK/obff.properties new file mode 100644 index 0000000000..0475d55bb0 --- /dev/null +++ b/browser/gopher/locale/da-DK/obff.properties @@ -0,0 +1,15 @@ +extensions.overbiteff.description=Gopher tilføjelse til firefox +hurl.error.title=Usikker URL %S +hurl.error=Denne URL indholder et usikker mål for omdirigering og er blevet udeladt. +hurl.warning.title=Gopher hURL omdirigering +hurl.warning=Dette element vil omdirigere dig til følgende ny URL:\n\n\t%S\n\nHvis du ikke genkender eller stoler på denne url, skal du trykke Cancel. Ellers tryk OK for at forsætte. +search.title=Angive parametere +search=Angive parametere som fjern serveren skal behandele: +cso.title=Angive CSO/ph forspørsel +cso=Angive nøgleord som der skal søges efter (eller en fuldstændig CSO/ph kommand begyndene med 'query').\n\nDin forspørgsel vil blive sendt uden nogen signatur. +csobogus.title=Ugyldig CSO/ph forspørgelse +csobogus=Denne forspørgelse er blevet annuleret da ingen kommando eller nøgleord blev modtaget. +baditype.title=Ugyldig element type +baditype=Dette element kan ikke vises direkte i din browser. +swapitype.title=Wrong item type? +swapitype=Usually menus are itemtype 1. Would you like the browser to fix this for you? diff --git a/browser/gopher/locale/de-DE/aboutp.properties b/browser/gopher/locale/de-DE/aboutp.properties new file mode 100644 index 0000000000..028874c724 --- /dev/null +++ b/browser/gopher/locale/de-DE/aboutp.properties @@ -0,0 +1,13 @@ +oinstalled=OverbiteFF wurde anscheinend erfolgreich installiert. +ostartwith=Starte Gopher mit +v2=Suche mit Veronica-2 +world=Floodgap-Liste der Server +blurb=Das Gopher-AddOn für Mozilla Firefox und SeaMonkey +programming=Programmierung +testers=Tester +l10n=Lokalisierung/Internationalisierung +allrights=Alle Rechte vorbehalten. +logolicense=Das Overbite-Maskottchen wird in OverbiteFF unter den Bedingungen der Creative Commons BY-NC-ND-Lizenz verwendet. +iconlicense=Bestimmte Ikonen und Elemente der Benutzungsoberfläche, welche in OverbiteFF verwendet werden, entstammen dem Netscape Navigator und Mozilla Projekt. Sie wurden unter den Bedingungen der Mozilla Public License veröffentlicht. Adobe Acrobat und das Acrobat-Logo sind eingetragene Warenzeichen von Adobe Systems, Inc. +codelicense1=Alle anderen, originären Inhalte von OverbiteFF werden unter den Bedingungen der Mozilla Public License/GNU Public License/GNU Lesser Public License veröffentlicht. +codelicense2=Die Nutzung außerhalb dieser Lizenzbestimmungen ist untersagt. diff --git a/browser/gopher/locale/de-DE/itypes.properties b/browser/gopher/locale/de-DE/itypes.properties new file mode 100644 index 0000000000..dcb0897b79 --- /dev/null +++ b/browser/gopher/locale/de-DE/itypes.properties @@ -0,0 +1,25 @@ +unknown=Unbekannter Typ +telnet=Verbindung zu Host via Telnet/TN3270 +exturl=Externe URL +unsafeurl=Unsichere URL-Daten wurden geblockt. +backpath=Zurück zum Wurzelmenü dieses Servers +preview=Sehe inline +uplev=Umgebende Menü +0=Textdokument +1=Gopher Menü +2=CSO/ph/qi-Adressbuchsuche +3=Gopher Fehler +4=BinHex-Archiv +5=ZIP oder Binärarchiv +6=UUencodiertes Archiv +7=Anwendung oder Suchmaschine +8=Telnet-Verbindung +9=Binärdatei +g=GIF-Bild +I=JPEG oder anderes Bildformat +s=Klangdatei +h=HTML-Datei +;=Film oder Animation +p=PNG-Bild +d=PDF-Dokument +T=Telnet/TN3270-Verbindung diff --git a/browser/gopher/locale/de-DE/obff.properties b/browser/gopher/locale/de-DE/obff.properties new file mode 100644 index 0000000000..768b5f0afd --- /dev/null +++ b/browser/gopher/locale/de-DE/obff.properties @@ -0,0 +1,15 @@ +extensions.overbiteff.description=Gopher-Erweiterung für Firefox +hurl.error.title=Unsichere URL %S +hurl.error=Diese URL verweist auf ein unsicheres Ziel. Die Weiterleitung wurde darum nicht durchgeführt. +hurl.warning.title=Gopher hURL-Weiterleitung +hurl.warning=Dieser Selektor leitet Sie zur folgenden URL weiter:\n\n\t%S\n\nFalls Sie diese URL nicht kennen, oder sich ihrer Vertrauenswürdigkeit unsicher sind, sollten Sie auf Abbrechen drücken. Andernfalls drücken Sie bitte auf OK um fortzufahren. +search.title=Suchparameter +search=Bitte geben Sie die Parameter für den entfernten Server ein: +cso.title=CSO/ph-Anfrage +cso=Bitte geben Sie die zu suchenden Schlagwörter (oder ein komplettes CSO/ph-Kommando beginnend mit 'query') ein.\n\nIhre Anfrage wird ohne Authentifizierung gesendet. +csobogus.title=Ungültige CSO/ph-Anfrage +csobogus=Die Anfrage konnte nicht durchgeführt werden, da weder ein Schlagwort noch ein Kommando angegeben wurde. +baditype.title=Ungültiger Item-Typ +baditype=Ihr Browser kann mit diesem Item-Typ leider nicht umgehen. +swapitype.title=Wrong item type? +swapitype=Usually menus are itemtype 1. Would you like the browser to fix this for you? diff --git a/browser/gopher/locale/en-US/aboutp.properties b/browser/gopher/locale/en-US/aboutp.properties new file mode 100644 index 0000000000..4521de2067 --- /dev/null +++ b/browser/gopher/locale/en-US/aboutp.properties @@ -0,0 +1,13 @@ +oinstalled=OverbiteFF appears to have been successfully installed. +ostartwith=Start Gopher with +v2=Search Veronica-2 +world=Floodgap list of servers +blurb=The Gopher addon for Mozilla Firefox and SeaMonkey +programming=Programming +testers=Testers +l10n=Localization/Internationalization +allrights=All rights reserved. +logolicense=The Overbite Mascot appears in OverbiteFF under a Creative Commons BY-NC-ND license. +iconlicense=Certain icons and UI elements used in OverbiteFF originated with Netscape Navigator and the Mozilla Project, and appear under the terms of the Mozilla Public License. Adobe Acrobat and the Acrobat logo are registered trademarks of Adobe Systems, Inc. +codelicense1=All other original content in OverbiteFF is distributed under the Mozilla Public License/GNU Public License/GNU Lesser Public License. +codelicense2=Use outside of this license is strictly prohibited. diff --git a/browser/gopher/locale/en-US/itypes.properties b/browser/gopher/locale/en-US/itypes.properties new file mode 100644 index 0000000000..3805e2002d --- /dev/null +++ b/browser/gopher/locale/en-US/itypes.properties @@ -0,0 +1,25 @@ +unknown=Unknown type +telnet=Connect to host via Telnet/TN3270 +exturl=External URL +unsafeurl=Unsafe URL data suppressed +backpath=Go to root menu for this server +preview=View this file inline +uplev=Up a menu +0=Text document +1=Gopher menu +2=CSO/ph/qi phonebook search +3=Gopher error +4=BinHex archive +5=ZIP or binary archive +6=UUencoded archive +7=Application or search engine +8=Telnet connection +9=Binary file +g=GIF image +I=JPEG or other generic image +s=Sound file +h=HTML file +;=Movie/animation file +p=PNG image +d=PDF document +T=Telnet/TN3270 connection diff --git a/browser/gopher/locale/en-US/obff.properties b/browser/gopher/locale/en-US/obff.properties new file mode 100644 index 0000000000..e94f43c68b --- /dev/null +++ b/browser/gopher/locale/en-US/obff.properties @@ -0,0 +1,15 @@ +extensions.overbiteff.description=Gopher extension for Firefox +hurl.error.title=Unsafe URL %S +hurl.error=This URL contains an unsafe target for redirection and has been suppressed. +hurl.warning.title=Gopher hURL redirect +hurl.warning=This selector will redirect you to the following new URL:\n\n\t%S\n\nIf you do not recognize or trust this URL, you should click Cancel. Otherwise, click OK to continue. +search.title=Enter parameters +search=Enter parameters for the remote server to process: +cso.title=Enter CSO/ph query +cso=Enter keywords to search for (or a complete CSO/ph command starting with 'query').\n\nYour request will be sent without authentication. +csobogus.title=Invalid CSO/ph query +csobogus=The query is cancelled because no command or keyword was received. +baditype.title=Invalid item type +baditype=This item type cannot be directly displayed by your browser. +swapitype.title=Wrong item type? +swapitype=Usually menus are itemtype 1. Would you like the browser to fix this for you? diff --git a/browser/gopher/locale/es-ES/aboutp.properties b/browser/gopher/locale/es-ES/aboutp.properties new file mode 100644 index 0000000000..3faaecdae9 --- /dev/null +++ b/browser/gopher/locale/es-ES/aboutp.properties @@ -0,0 +1,13 @@ +oinstalled=OverbiteFF parece haber instalado correctamente. +ostartwith=Iniciar Gopher con +v2=Buscar Veronica-2 +world=Lista de servidores Floodgap +blurb=Complemento Gopher para Mozilla Firefox y SeaMonkey +programming=Programación +testers=Probadores +l10n=Localización/Internacionalización +allrights=Reservados Todos los Derechos. +logolicense=El Overbite Mascot aparece en OverbiteFF bajo licencias Creative Commons BY-NC-ND. +iconlicense=Ciertos iconos y elementos UI usados en OverbiteFF se originaron con Netscape Navigator y proyecto Mozilla, y aparecen bajo los términos de Mozilla Public License. Adobe Acrobat y el logo Acrobat son marcas registradas de Adobe Systems, Inc. +codelicense1=Cualquier otro contenido original en OverbiteFF se distribuye bajo Mozilla Public License/GNU Public License/GNU Lesser Public License. +codelicense2=Está estrictamente prohibido el uso fuera de los terminos de esta licencia. diff --git a/browser/gopher/locale/es-ES/itypes.properties b/browser/gopher/locale/es-ES/itypes.properties new file mode 100644 index 0000000000..61aa393552 --- /dev/null +++ b/browser/gopher/locale/es-ES/itypes.properties @@ -0,0 +1,25 @@ +unknown=Tipo desconocido +telnet=Conectar a anfitrión atraves de Telnet/TN3270 +exturl=URL externo +unsafeurl=Datos suprimidos de URL inseguro +backpath=Ir a menú raiz de este servidor +preview=Mirar en linea +uplev=Ir a menú rodeando +0=Documento de texto +1=Menú Gopher +2=Buscar directorio telefonica CSO/ph/qi +3=Error de Gopher +4=Bin-Hex Archivo +5=ZIP o archivo binario +6=Archivo UUencoded +7=Aplicación o motor de búsqueda +8=Conexión Telnet +9=Archivo binario +g=Imagen tipo GIF +I=JPEG u otra imagen genérica +s=Archivo de sonido +h=Archivo HTML +;=Archivo de pelicula/animación +p=Imagen tipo PNG +d=Documento tipo PDF +T=Conexión Telnet/TN3270 diff --git a/browser/gopher/locale/es-ES/obff.properties b/browser/gopher/locale/es-ES/obff.properties new file mode 100644 index 0000000000..8180823944 --- /dev/null +++ b/browser/gopher/locale/es-ES/obff.properties @@ -0,0 +1,15 @@ +extensions.overbiteff.description=Extensión Gopher para Firefox +hurl.error.title=URL Insegura %S +hurl.error=Esta URL contiene un destino de reorientación inseguro y ha sido suprimida. +hurl.warning.title=Redirección Gopher hURL +hurl.warning=Este selector lo redireccionará a la siguiente URL:\n\n\t%S\n\nSi no reconoce o confia en esta URL, usted debe hacer clic en el botón de Cancelar. De otro modo, haga clic OK para continuar. +search.title=Introduzca los parámetros +search=Introduzca los parámetros para ejecutar proceso en servidor remoto: +cso.title=Introducir consulta CSO/ph +cso=Introducir palabras clave para buscar (o comando completo CSO/ph comenzando con 'query').\n\nSu solicitud sera enviada sin autenticación. +csobogus.title=Consulta CSO/ph no válida. +csobogus=Su consulta fue cancelada porque ningun commando o palabra clave fue recibido. +baditype.title=Tipo de elemento no válido +baditype=Este tipo de artículo no puede ser mostrado directamente en su navegador. +swapitype.title=Wrong item type? +swapitype=Usually menus are itemtype 1. Would you like the browser to fix this for you? diff --git a/browser/gopher/locale/fr-FR/aboutp.properties b/browser/gopher/locale/fr-FR/aboutp.properties new file mode 100644 index 0000000000..f8a455e284 --- /dev/null +++ b/browser/gopher/locale/fr-FR/aboutp.properties @@ -0,0 +1,13 @@ +oinstalled=OverbiteFF semble avoir été installée avec succès. +ostartwith=Démarrer sur Gopher avec +v2=Recherche Veronica-2 +world=Liste de serveurs Floodgap +blurb=Extension Gopher pour Mozilla Firefox et SeaMonkey +programming=Programmation +testers=Testeurs +l10n=Localisation/Internationalisation +allrights=Tous droits réservés. +logolicense=La mascotte Overbite apparaît dans OverbiteFF sous licence Creative Commons BY-NC-ND. +iconlicense=Certains éléments de l'interface graphique et icônes utilisés dans OverbiteFF viennent de Netscape Navigator et du Projet Mozilla, et sont couverts par la licence publique Mozilla. Adobe Acrobat et le logo Acrobat sont des marques déposées d'Adobe Systems, Inc. +codelicense1=Tout autre contenu original dans OverbiteFF est distribué sous Mozilla Public License/GNU Public License/GNU Lesser Public License. +codelicense2=L'utilisation en dehors du cadre de ces licences est strictement interdite. diff --git a/browser/gopher/locale/fr-FR/itypes.properties b/browser/gopher/locale/fr-FR/itypes.properties new file mode 100644 index 0000000000..49873d014e --- /dev/null +++ b/browser/gopher/locale/fr-FR/itypes.properties @@ -0,0 +1,25 @@ +unknown=Type inconnu +telnet=Connexion à l'hôte via Telnet/TN3270 +exturl=URL externe +unsafeurl=URL peu sûr, données supprimées +backpath=Aller au menu racine de ce serveur +preview=Afficher ce fichier ici +uplev=Aller au menu enfermant +0=Document texte +1=Menu Gopher +2=Recherche CSO/ph/qi dans un annuaire +3=Erreur Gopher +4=Archive BinHex +5=Archive ZIP ou binaire +6=Archive encodée avec UUencode +7=Application ou moteur de recherche +8=Connexion telnet +9=Fichier binaire +g=Image GIF +I=Image générique ou JPEG +s=Fichier son +h=Fichier HTML +;=Vidéo/fichier d'animation +p=Image PNG +d=Document PDF +T=Connexion Telnet/TN3270 diff --git a/browser/gopher/locale/fr-FR/obff.properties b/browser/gopher/locale/fr-FR/obff.properties new file mode 100644 index 0000000000..664ac151ba --- /dev/null +++ b/browser/gopher/locale/fr-FR/obff.properties @@ -0,0 +1,15 @@ +extensions.overbiteff.description=Extension Gopher pour Firefox +hurl.error.title=URL peu sûr %S +hurl.error=Cet URL contient une cible de redirection peu sûre et a été supprimée. +hurl.warning.title=Redirection hURL Gopher +hurl.warning=Ce sélecteur va vous rediriger vers l'URL suivant :\n\n\t%S\n\nSi vous ne connaissez ou ne faites pas confiance à cet URL, vous devriez cliquer sur Annuler. Sinon, cliquez sur OK pour continuer. +search.title=Entrez les paramètres +search=Entrez les paramètres à traiter par l'hôte distant : +cso.title=Entrez une requête CSO/ph +cso=Entrez les mots-clefs à rechercher (ou bien un commande CSO/ph complète commençant par 'query').\n\nVotre requête sera envoyée sans authentification. +csobogus.title=Requête CSO/ph non valide. +csobogus=La requête a été annulée parce qu'aucune commande ou mot-clef n'a été reçu. +baditype.title=Type d'item non valide. +baditype=Ce type d'item ne peut pas être affiché directement par votre navigateur. +swapitype.title=Wrong item type? +swapitype=Usually menus are itemtype 1. Would you like the browser to fix this for you? diff --git a/browser/gopher/locale/hu-HU/aboutp.properties b/browser/gopher/locale/hu-HU/aboutp.properties new file mode 100644 index 0000000000..16496b1757 --- /dev/null +++ b/browser/gopher/locale/hu-HU/aboutp.properties @@ -0,0 +1,13 @@ +oinstalled=Úgy fest, hogy az OverbiteFF sikeresen installálva lett. +ostartwith=A Gopher elindítása: +v2=Veronica-2 keresés +world=Floodgap szerverlista +blurb=A Gopher kiegészítés Mozilla Firefox/SeaMonkey-hoz +programming=Programozás +testers=Tesztelés +l10n=Honosítás +allrights=Minden jog fenntartva. +logolicense=Az Overbite kabala a Creative Commons BY-NC-ND licensz alatt jelenik meg az OverbiteFF-ben. +iconlicense=Az OverbiteFF bizonyos ikonjai és felhasználói felület-elemei a Netscape Navigator-ból és a Mozilla Project-től erednek, és a Mozilla Public License alatt jelennek meg. Az Adobe Acrobat és az Acrobat logo az Adobe Systems, Inc. védjegye. +codelicense1=Minden más eredeti tartalmat az OverbiteFF-ben a Mozilla Public License, a GNU Public License vagy a GNU Lesser Public License szerint terjesztünk. +codelicense2=Bármilyen felhasználás, ami ezen a licenszen kívül esik, szigorúan tilos. diff --git a/browser/gopher/locale/hu-HU/itypes.properties b/browser/gopher/locale/hu-HU/itypes.properties new file mode 100644 index 0000000000..815fbaace3 --- /dev/null +++ b/browser/gopher/locale/hu-HU/itypes.properties @@ -0,0 +1,25 @@ +unknown=Ismeretlen típus +telnet=Kapcsolódás a szerverhez Telneten/TN3270-en keresztül +exturl=Külső URL +unsafeurl=Nem biztonságos URL adat figyelmen kívül hagyva +backpath=Ugrás a szerver külső menüjére +preview=View inline +uplev=Up +0=Szöveges dokumentum +1=Gopher menü +2=CSO/ph/qi telefonkönyv keresés +3=Gopher hiba +4=BinHex archív +5=ZIP vagy bináris archív +6=UUencode archív +7=Alkalmazás vagy keresőmotor +8=Telnet kapcsolat +9=Bináris fájl +g=GIF kép +I=JPEG vagy más kép +s=Hangfájl +h=HTML fájl +;=Film/animációs fájl +p=PNG kép +d=PDF dokumentum +T=Telnet/TN3270 kapcsolat diff --git a/browser/gopher/locale/hu-HU/obff.properties b/browser/gopher/locale/hu-HU/obff.properties new file mode 100644 index 0000000000..85f0e6ef93 --- /dev/null +++ b/browser/gopher/locale/hu-HU/obff.properties @@ -0,0 +1,15 @@ +extensions.overbiteff.description=Gopher kiegészítés a Firefox-hoz +hurl.error.title=Nem biztonságos URL %S +hurl.error=Ez az URL átirányítást tartalmaz egy nem biztonságos címre, ezért figyelmen kívül hagytam. +hurl.warning.title=Gopher hURL átirányítás +hurl.warning=Ez a selector átirányít erre az URL-re:\n\n\t%S\n\nHa nem ismeri fel vagy bízik meg ebben az URL-ben, kattintson a Mégsem gombra, egyébként pedig az OK gombra a folytatáshoz. +search.title=Írja be a paramétereket +search=Írja be a paramétereket, amiket a távoli szerver feldolgozzon: +cso.title=Írja be a CSO/ph lekérdezést +cso=Írja be a kulcsszavakat, amikre keresni akar (vagy egy teljes CSO/ph parancsot, 'query' kezdettel).\n\nA kérést autentikáció nélkül küldöm el. +csobogus.title=Hibás CSO/ph lekérdezés +csobogus=A lekérdezés sikertelen volt, mert nem kaptam parancsot vagy kulcsszót. +baditype.title=Hibás elemtípus +baditype=Ezt az elemtípust a böngésző nem tudja közvetlenül megjeleníteni. +swapitype.title=Wrong item type? +swapitype=Usually menus are itemtype 1. Would you like the browser to fix this for you? diff --git a/browser/gopher/locale/ja-JP/aboutp.properties b/browser/gopher/locale/ja-JP/aboutp.properties new file mode 100644 index 0000000000..1b38c85be7 --- /dev/null +++ b/browser/gopher/locale/ja-JP/aboutp.properties @@ -0,0 +1,13 @@ +oinstalled=OverbiteFFのインストールが成功された。 +ostartwith=Gopherを起動: +v2=Veronica-2で検索 +world=Floodgapのサーバ一覧 +blurb=GopherのMozilla FirefoxとSeaMonkey拡張機能 +programming=開発 +testers=テスト +l10n=地域化・国際化 +allrights=無断複写・転載を禁じます。 +logolicense=オーバーバイト・マスコットはクリエイティブ・コモンズの表示-非営利-改変禁止ライセンスの下でOverbiteFFに利用されている。 +iconlicense=OverbiteFFで利用されているアイコンとユーザー・インターフェース要素の一部はNetscape NavigatorおよびMozilla計画に考案されて、Mozilla Public Licenseの下で利用されています。Adobe AcrobatとAcrobatのロゴはAdobe Systems Incorporatedの登録商標です。 +codelicense1=その他すべてのOverbiteFFのオリジナルコンテンツはMozilla Public License・GNU一般公衆利用許諾契約書・GNU劣等一般公衆利用許諾契約書の下で配布している。 +codelicense2=以上のライセンスに定めていない利用は固く禁じられる。 diff --git a/browser/gopher/locale/ja-JP/itypes.properties b/browser/gopher/locale/ja-JP/itypes.properties new file mode 100644 index 0000000000..4b8dda9839 --- /dev/null +++ b/browser/gopher/locale/ja-JP/itypes.properties @@ -0,0 +1,25 @@ +unknown=未知タイプ +telnet=Telnet/TN3270ホスト接続 +exturl=外部URL +unsafeurl=危険なURLデータを抑制した +backpath=当サーバのルート・メニューへ +preview=インライン表示する +uplev=Up +0=テキスト文書 +1=Gopherメニュー +2=CSO/ph/qi電話帳検索 +3=Gopherエラー +4=BinHexファイル +5=ZIP・その他圧縮ファイル +6=UUencodeファイル +7=アプリケーション・検索エンジン +8=Telnet接続 +9=バイナリ・ファイル +g=GIF画像 +I=JPEG・その他画像 +s=音声ファイル +h=HTMLファイル +;=動画ファイル +p=PNG画像 +d=PDF文書 +T=Telnet/TN3270接続 diff --git a/browser/gopher/locale/ja-JP/obff.properties b/browser/gopher/locale/ja-JP/obff.properties new file mode 100644 index 0000000000..f952262cd8 --- /dev/null +++ b/browser/gopher/locale/ja-JP/obff.properties @@ -0,0 +1,15 @@ +extensions.overbiteff.description=GopherのFirefox拡張機能 +hurl.error.title=危険なURL:%S +hurl.error=このURLは危険なリダイレクト先を含んでいるため抑制された。 +hurl.warning.title=Gopher hURLリダイレクト +hurl.warning=このセレクターは次のURLへリダイレクトする:\n\n\t%S\n\n以上のURLを信頼しない場合Cancelをクリック。URLを開くにはOKをクリック。 +search.title=検索条件を入力 +search=リモート・サーバのパレメータを入力: +cso.title=CSO/phクエリーを入力 +cso=検索のキーワード(もしくは'query'で始まる完全なCSO/phコマンド)を入力。\n\nあなたの要求を認証なしで送信する: +csobogus.title=無効なCSO/phクエリー +csobogus=コマンドまたはキーワードを受け付けなかったためこのクエリーを中止した。 +baditype.title=無効な項目タイプ +baditype=あなたのブラウザではこの項目タイプを直接に表示できない。 +swapitype.title=Wrong item type? +swapitype=Usually menus are itemtype 1. Would you like the browser to fix this for you? diff --git a/browser/gopher/locale/nb-NO/aboutp.properties b/browser/gopher/locale/nb-NO/aboutp.properties new file mode 100644 index 0000000000..d7224b99b0 --- /dev/null +++ b/browser/gopher/locale/nb-NO/aboutp.properties @@ -0,0 +1,13 @@ +oinstalled=OverbiteFF-installasjonen var vellykket. +ostartwith=Start Gopher med +v2=Søk med Veronica-2 +world=Floodgaps liste over servere +blurb=Gopher-utvidelse til Mozilla Firefox og SeaMonkey +programming=Programmering +testers=Testere +l10n=Lokalisering/Internasjonalisering +allrights=Alle rettigheter forbeholdes. +logolicense=Overbite maskotten fremvises i OverbiteFF under Creative Commons BY-NC-ND lisensen. +iconlicense=Visse ikoner og GUI elementer brukt i OverbiteFF stammer opprinnelig fra Netscape Navigator og Mozilla Project, og er underlagt vilkårene fra Mozilla Public License. Adobe Acrobat og Acrobat logoen er registered varemerker av Adobe Systems, Inc. +codelicense1=Alt annet av orginalt materiale i OverbiteFF er distribuert under Mozilla Public License/GNU Public License/GNU Lesser Public License. +codelicense2=Bruk utenfor denne lisensen er strengt forbudt. diff --git a/browser/gopher/locale/nb-NO/itypes.properties b/browser/gopher/locale/nb-NO/itypes.properties new file mode 100644 index 0000000000..08dceecc6e --- /dev/null +++ b/browser/gopher/locale/nb-NO/itypes.properties @@ -0,0 +1,25 @@ +unknown=Ukjent type +telnet=Tilkobling til vert gjennom Telnet/TN3270 +exturl=Ekstern URL +unsafeurl=Usikker URL-data utestengt +backpath=Gå til rotmenyen for denne server +preview=View inline +uplev=Up +0=Tekstdokument +1=Gopher-meny +2=CSO/ph/qi telefonboksøking +3=Gopher-feil +4=BinHex-arkiv +5=ZIP eller binært arkiv +6=UUkomprimert arkiv +7=Program eller søkemotor +8=Telnet tilkobling +9=Binær fil +g=GIF-bilde +I=JPEG eller annet generisk bilde +s=Lyd-fil +h=HTML-fil +;=Film/animasjons fil +p=PNG-bilde +d=PDF-dokument +T=Telnet/TN3270 tilkobling diff --git a/browser/gopher/locale/nb-NO/obff.properties b/browser/gopher/locale/nb-NO/obff.properties new file mode 100644 index 0000000000..a9572ead12 --- /dev/null +++ b/browser/gopher/locale/nb-NO/obff.properties @@ -0,0 +1,15 @@ +extensions.overbiteff.description=Gopher utvidelse til firefox +hurl.error.title=Usikker URL %S +hurl.error=Denne URL peker mot et usikker mål for videresending og har blitt utestengt. +hurl.warning.title=Gopher hURL videresending +hurl.warning=Dette elementet vil videresende deg til følgende URL:\n\n\t%S\n\nHvis du ikke gjenkjenner eller stoler på denne URLen, må du trykke Cancel. Ellers trykk OK for å fortsette. +search.title=Angi parametere +search=Angi parametere som verten skal behandle: +cso.title=Angi CSO/ph forespørsel +cso=Angi nøkkelord som skal søkes etter (eller en fulstendig CSO/ph kommando som begynner med 'query').\n\nDin forespørsel vil bli sendt uten noen signatur. +csobogus.title=Ugyldig CSO/ph forespørsel +csobogus=Denne forespørselen har blitt annulert da ingen kommando eller nøkkelord ble mottatt.. +baditype.title=Ugyldig element type +baditype=Dette elementet kan ikke vises direkte i din nettleser. +swapitype.title=Wrong item type? +swapitype=Usually menus are itemtype 1. Would you like the browser to fix this for you? diff --git a/browser/gopher/locale/nl-NL/aboutp.properties b/browser/gopher/locale/nl-NL/aboutp.properties new file mode 100644 index 0000000000..b5fb3ccebf --- /dev/null +++ b/browser/gopher/locale/nl-NL/aboutp.properties @@ -0,0 +1,13 @@ +oinstalled=OverbiteFF lijkt succesvol te zijn geïnstalleerd. +ostartwith=Start Gopher met +v2=Veronica-2 doorzoeken +world=Floodgap serverlijst +blurb=De Gopher add-on voor Mozilla Firefox en SeaMonkey +programming=Programmeren +testers=Testers +l10n=Internationalisatie/Lokalisatie +allrights=Alle rechten voorbehouden. +logolicense=De Overbite Mascotte als onderdeel van OverbiteFF valt onder de Creative Commons BY-NC-ND licentie. +iconlicense=Sommige pictogrammen en UI elementen die door OverbiteFF gebruikt worden komen van Netscape Navigator en het Mozilla Project. Deze vallen onder de voorwaarden van de Mozilla Public License. Adobe Acrobat en het Acrobat logo zijn geregistreerde handelsmerken van Adobe Systems, Inc. +codelicense1=Alle andere originele werken in OverbiteFF zijn verspreid onder de Mozilla Public License/GNU Public License/GNU Lesser Public License. +codelicense2=Gebruik buiten deze licentie is streng verboden. diff --git a/browser/gopher/locale/nl-NL/itypes.properties b/browser/gopher/locale/nl-NL/itypes.properties new file mode 100644 index 0000000000..5b9e38e484 --- /dev/null +++ b/browser/gopher/locale/nl-NL/itypes.properties @@ -0,0 +1,25 @@ +unknown=Onbekende type +telnet=Maak een verbinding met de host via Telnet/TN3270 +exturl=Externe URL +unsafeurl=Onveilige URL-data geblokkeerd +backpath=Ga naar het hoofdmenu van deze server +preview=Bekijk binnen menu +uplev=Up +0=Tekstdocument +1=Gophermenu +2=CSO/ph/qi telefoonboek +3=Gopherfout +4=BinHex-archief +5=ZIP of binair archief +6=UU-gecodeerd archief +7=Toepassing of zoekmachine +8=Telnetverbinding +9=Binair bestand +g=GIF-afbeelding +I=JPEG of andere afbeelding +s=Geluidsopname +h=HTML-bestand +;=Film/animatie +p=PNG-afbeelding +d=PDF-document +T=Telnet/TN3270-verbinding diff --git a/browser/gopher/locale/nl-NL/obff.properties b/browser/gopher/locale/nl-NL/obff.properties new file mode 100644 index 0000000000..dee53f758d --- /dev/null +++ b/browser/gopher/locale/nl-NL/obff.properties @@ -0,0 +1,15 @@ +extensions.overbiteff.description=Gopherextensie voor Firefox +hurl.error.title=Onveilige URL %S +hurl.error=Deze URL bevat een onveilige doorverwijzing en is daarom geblokkeerd. +hurl.warning.title=Gopher-hURL-doorverwijzing +hurl.warning=Deze selector zal u doorsturen naar de volgende nieuwe URL:\n\n\t%S\n\nAls u deze URL niet herkend of vertrouwd, klik dan op Annuleren. Klik anders op OK om door te gaan. +search.title=Voer zoektermen in +search=Geef de zoektermen op die de server moet verwerken: +cso.title=Voer de CS/ph zoekterm in +cso=Voer zoektermen in (of een complete CSO/ph opdracht door te beginnen met 'query').\n\nUw verzoek zal zonder authenticatie worden verstuurd. +csobogus.title=Ongeldige CSO/ph zoekterm +csobogus=De zoekopdracht is geannuleerd omdat er geen opdracht of zoekterm is ontvangen. +baditype.title=Ongeldig itemtype +baditype=Dit itemtype kan niet in uw internetbrowser worden weergegeven. +swapitype.title=Verkeerd itemtype? +swapitype=Menu's hebben meestal het itemtype 1. Wilt u dat de internetbrowser dit aanpast? diff --git a/browser/gopher/locale/pl-PL/aboutp.properties b/browser/gopher/locale/pl-PL/aboutp.properties new file mode 100644 index 0000000000..05a4bf82e3 --- /dev/null +++ b/browser/gopher/locale/pl-PL/aboutp.properties @@ -0,0 +1,13 @@ +oinstalled=OverbiteFF wydaje się być zainstalowany pomyślnie. +ostartwith=Rozpocznij gopherowanie poprzez +v2=wyszukiwarkę Veronica-2 +world=Lista serwerów na Floodgap +blurb=Rozszerzenie Gopher dla Mozilla Firefox/SeaMonkey +programming=Programowanie +testers=Testerzy +l10n=Lokalizacja +allrights=Wszelkie prawa zastrzeżone. +logolicense=Maskotka Overbite zawarta w OverbiteFF znajduje się pod licencją Creative Commons BY-NC-ND. +iconlicense=Niektóre ikony i elementy interfejsu użytkownika zastosowane w OverbiteFF mają źródło w Netscape Navigator oraz Mozilla Project, wykorzystano na zasadach Mozilla Public License. +codelicense1=Pozostałe treści OverbiteFF są rozpowszechniane na zasadach Mozilla Public License/GNU Public License/GNU Lesser Public License. +codelicense2=Użytkowanie niezgodne z licencją surowo wzbronione. diff --git a/browser/gopher/locale/pl-PL/itypes.properties b/browser/gopher/locale/pl-PL/itypes.properties new file mode 100644 index 0000000000..07f0f0fa6d --- /dev/null +++ b/browser/gopher/locale/pl-PL/itypes.properties @@ -0,0 +1,25 @@ +unknown=Nieznany rodzaj +telnet=Połącz się z hostem przez Telnet/TN3270 +exturl=Zewnętrzny URL +unsafeurl=Wstrzymano dane z niepewnego URL +backpath=Przejdź do menu głównego tego serwera +preview=View inline +uplev=Up +0=Dokument tekstowy +1=Menu gophera +2=Wyszukiwane książki telefonicznej CSO/ph/qi +3=Błąd gophera +4=Archiwum BinHex +5=Archiwum binarne lub zip +6=Archiwum UUencode +7=Aplikacja sieciowa lub wyszukiwarka +8=Połączenie Telnet +9=Plik binarny +g=Plik GIF +I=Plik JPEG lub inny standardowy obrazek +s=Plik dźwiękowy +h=Plik HTML +;=Plik wideo/animacji +p=Plik PNG +d=Dokument PDF +T=Połączenie Telnet/TN3270 diff --git a/browser/gopher/locale/pl-PL/obff.properties b/browser/gopher/locale/pl-PL/obff.properties new file mode 100644 index 0000000000..15cb155e26 --- /dev/null +++ b/browser/gopher/locale/pl-PL/obff.properties @@ -0,0 +1,15 @@ +extensions.overbiteff.description=Rozszerzenie protokołu Gopher dla Firefox +hurl.error.title=Niepewny URL %S +hurl.error=Ten URL zawiera niepewny cel przekierowania i został wstrzymany. +hurl.warning.title=Przekierowanie Gopher hURL +hurl.warning=Ten selektor przekieruje Ciebie do następującego URL:\n\n\t%S\n\nJeśli nie rozpoznajesz i nie ufasz temu URL, powinieneś anulować operację. W przeciwnym razie kliknij OK, aby kontynować. +search.title=Wprowadź parametry +search=Wprowadź parametry do przetworzenia przez zdalny serwer: +cso.title=Wpisz zapytanie CSO/ph +cso=Wprowadź słowa kluczowe do wyszukania (bądź całą komendę CSO/ph zaczynając od 'query').\n\nTwoje zapytanie będzie wysłane bez uwierzytelnienia. +csobogus.title=Niewłaściwe zapytanie CSO/ph +csobogus=Anulowano zapytanie ponieważ nie otrzymano komendy lub słowa kluczowego. +baditype.title=Niewłaściwy rodzaj elementu +baditype=Ten rodzaj elementu nie może być bezpośrednio wyświetlony na Twojej przeglądarce. +swapitype.title=Wrong item type? +swapitype=Usually menus are itemtype 1. Would you like the browser to fix this for you? diff --git a/browser/gopher/locale/ru-RU/aboutp.properties b/browser/gopher/locale/ru-RU/aboutp.properties new file mode 100644 index 0000000000..981f372be2 --- /dev/null +++ b/browser/gopher/locale/ru-RU/aboutp.properties @@ -0,0 +1,13 @@ +oinstalled=OverbiteFF успешно установлен. +ostartwith=Начните с этих серверов +v2=Поисковая система Veronica-2 +world=Каталог серверов gopher +blurb=Расширение Gopher для Mozilla Firefox/SeaMonkey +programming=Программирование +testers=Тестирование +l10n=Локализация/Интернационализация +allrights=Все права защищены. +logolicense=Overbite Mascot используется в OverbiteFF по лицензии Creative Commons BY-NC-ND. +iconlicense=Некоторые значки и элементы интерфейса, используемые в OverbiteFF, заимствованы из Netscape Navigator и проекта Mozilla и используются в соответствии с Mozilla Public License. Adobe Acrobat и логотип Acrobat являются зарегистрированными торговыми марками Adobe Systems, Inc. +codelicense1=Остальной оригинальный контент OverbiteFF распространяется в соответствии с Mozilla Public License/GNU Public License/GNU Lesser Public License. +codelicense2=Использование, противоречащее этой лицензии, строго запрещено. diff --git a/browser/gopher/locale/ru-RU/itypes.properties b/browser/gopher/locale/ru-RU/itypes.properties new file mode 100644 index 0000000000..5d6fb0ce09 --- /dev/null +++ b/browser/gopher/locale/ru-RU/itypes.properties @@ -0,0 +1,25 @@ +unknown=Неизвестный тип +telnet=Соединение с сервером Telnet/TN3270 +exturl=Внешний URL +unsafeurl=Данные небезопасного URL блокированы +backpath=Перейти к корневому меню этого сервера +preview=Показать содержимое файла +uplev=Up +0=Текстовый документ +1=Меню Gopher +2=Поиск в справочнике CSO/ph/qi +3=Ошибка +4=Архив BinHex +5=ZIP или бинарный архив +6=Архив UUencode +7=Приложение или поисковая система +8=Соединение Telnet +9=Двоичный файл +g=Изображение GIF +I=JPEG или другой стандартный графический формат +s=Звуковой файл +h=Файл HTML +;=Видеофайл/графическая анимация +p=Изображение PNG +d=Документ PDF +T=Соединение Telnet/TN3270 diff --git a/browser/gopher/locale/ru-RU/obff.properties b/browser/gopher/locale/ru-RU/obff.properties new file mode 100644 index 0000000000..07a53f6fa6 --- /dev/null +++ b/browser/gopher/locale/ru-RU/obff.properties @@ -0,0 +1,15 @@ +extensions.overbiteff.description=Расширение Gopher для Firefox +hurl.error.title=Небезопасный URL %S +hurl.error=Этот URL отклонён, поскольку содержит переадресацию на небезопасный ресурс. +hurl.warning.title=Переадресация Gopher hURL +hurl.warning=Этот селектор перенаправит вас на следующий URL:\n\n\t%S\n\nЕсли вы не знаете этот URL или не доверяете ему, нажмите Отмена. Чтобы продолжить, нажмите OK. +search.title=Ввод параметров +search=Введите параметры для обработки удалённым сервером: +cso.title=Ввод запроса CSO/ph +cso=Введите ключевые слова для поиска (или полную команду CSO/ph, начиная с 'query').\n\nВаш запрос будет отправлен без авторизации. +csobogus.title=Неверный запрос CSO/ph +csobogus=Запрос отменён, так как не получено команды или ключевого слова. +baditype.title=Неверный тип объекта +baditype=Этот тип объекта не может быть непосредственно отображён вашим браузером. +swapitype.title=Wrong item type? +swapitype=Usually menus are itemtype 1. Would you like the browser to fix this for you? diff --git a/browser/gopher/locale/tr-TR/aboutp.properties b/browser/gopher/locale/tr-TR/aboutp.properties new file mode 100644 index 0000000000..e8930e3476 --- /dev/null +++ b/browser/gopher/locale/tr-TR/aboutp.properties @@ -0,0 +1,13 @@ +oinstalled=OverbiteFF başarılı bir şekilde kurulmuştur. +ostartwith=Gopher için başlangıç sayfaları +v2=Veronica-2 ile arama +world=Floodgap'ın sunucu listesi +blurb=Mozilla Firefox/SeaMonkey için Gopher eklentisi +programming=Programlama +testers=Deneyiciler +l10n=Tercüme +allrights=Tüm hakları saklıdır. +logolicense=Overbite Maskotu OverbiteFF eklentisinde Creative Commons BY-NC-ND lisansı kapsamında bulunmaktadır. +iconlicense=OverbiteFF'de kullanılan bazı ikonların ve arayüz unsurlarının kaynakları Netscape Navigator ile Mozilla Projesidir ve bu ikonlar Mozilla Kamu Lisansı kapsamındadır. Adobe Acrobat ve Acrobat logosu Adobe Systems, Inc. şirketinin tescilli markalarıdır. +codelicense1=OverbiteFF'deki diğer tüm özgün içerik Mozilla Kamu Lisansı/GNU Genel Kamu Lisansı/GNU Daha Az Genel Kamu Lisansı kapsamında dağıtıma sunulmuştur. +codelicense2=Bu lisansların dışında kullanımı yasaktır. diff --git a/browser/gopher/locale/tr-TR/itypes.properties b/browser/gopher/locale/tr-TR/itypes.properties new file mode 100644 index 0000000000..2697d55261 --- /dev/null +++ b/browser/gopher/locale/tr-TR/itypes.properties @@ -0,0 +1,25 @@ +unknown=Bilinmeyen tip +telnet=Sunucuya Telnet/TN3270 yoluyla bağlantı +exturl=Harici URL +unsafeurl=Güvenli olmayan URL verisi silindi +backpath=Bu sunucunun ana menüsüne git +preview=View inline +uplev=Up +0=Metin döküman +1=Gopher menüsü +2=CSO/ph/qi telefon rehberi arama +3=Gopher hatası +4=BinHex arşiv +5=ZIP ya da ikili (binary) arşiv +6=UUencod'lanmış arşiv +7=Uygulama ya da arama motoru +8=Telnet bağlantısı +9=İkili (binary) dosya +g=GIF görüntü +I=JPEG ya da başka jenerik görüntü +s=Ses dosyası +h=HTML dosya +;=Film/animasyon dosyası +p=PNG görüntü +d=PDF doküman +T=Telnet/TN3270 bağlantısı diff --git a/browser/gopher/locale/tr-TR/obff.properties b/browser/gopher/locale/tr-TR/obff.properties new file mode 100644 index 0000000000..7d7af200c0 --- /dev/null +++ b/browser/gopher/locale/tr-TR/obff.properties @@ -0,0 +1,15 @@ +extensions.overbiteff.description=Firefox için Gopher eklentisi +hurl.error.title=Güvenli olmayan URL %S +hurl.error=Bu URL yönlendirme için güvenli olmayan bir hedef içerir ve silinmiştir. +hurl.warning.title=Gopher hURL yönlendirme +hurl.warning=Bu selektör sizi şu adrese (URL) yönlendirecektir:\n\n\t%S\n\nEğer bu adresi tanımıyor ya da ona güvenmiyorsanız, İptal butonuna tıklamanız önerilir. Aksi takdirde devam etmek için Tamam butonuna tıklayınız. +search.title=Parametreleri giriniz +search=Uzaktaki sunucunun işlemesi için parametreleri giriniz: +cso.title=CSO/ph sorgusu giriniz +cso=Aramak istediğiniz anahtar kelimeleri (ya da 'query' ile başlayan bir CSO/ph komutu) giriniz.\n\nSorgunuz doğruluğu kanıtlanmadan gönderilecektir. +csobogus.title=Geçersiz CSO/ph sorgusu +csobogus=Hiçbir komut ya da anahtar kelime alınamadığından bu sorgu iptal edildi. +baditype.title=Geçersiz item tipi +baditype=Bu item tipi tarayıcınızda doğrudan görüntülenemez. +swapitype.title=Wrong item type? +swapitype=Usually menus are itemtype 1. Would you like the browser to fix this for you? diff --git a/browser/gopher/moz.build b/browser/gopher/moz.build new file mode 100644 index 0000000000..e1f825353b --- /dev/null +++ b/browser/gopher/moz.build @@ -0,0 +1,16 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +JAR_MANIFESTS += ['jar.mn'] + +FINAL_TARGET_FILES.components += [ + 'components/about.js', + 'components/gopher.manifest', + 'components/protocol.js', +] + +FINAL_TARGET_FILES['defaults/preferences'] += [ + 'defaults/preferences/overbiteff.js', +] diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 11f7bf04c8..62bda97d6b 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -360,6 +360,9 @@ @RESPATH@/browser/components/nsSetDefaultBrowser.js @RESPATH@/browser/components/internaluserscripts.js @RESPATH@/browser/components/internaluserscripts.manifest +@RESPATH@/browser/components/about.js +@RESPATH@/browser/components/gopher.manifest +@RESPATH@/browser/components/protocol.js @RESPATH@/browser/components/devtools-startup.manifest @RESPATH@/browser/components/devtools-startup.js @RESPATH@/browser/components/webideCli.js @@ -590,6 +593,8 @@ @RESPATH@/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf @RESPATH@/browser/chrome/internaluserscripts.manifest @RESPATH@/browser/chrome/internaluserscripts/* +@RESPATH@/browser/chrome/gopher.manifest +@RESPATH@/browser/chrome/gopher@JAREXT@ @RESPATH@/browser/internal-userscripts/* @RESPATH@/chrome/toolkit@JAREXT@ @RESPATH@/chrome/toolkit.manifest @@ -628,6 +633,7 @@ @RESPATH@/browser/@PREF_DIR@/basilisk.js @RESPATH@/browser/@PREF_DIR@/basilisk-branding.js @RESPATH@/browser/@PREF_DIR@/internaluserscripts.js +@RESPATH@/browser/@PREF_DIR@/overbiteff.js @RESPATH@/goanna.js @RESPATH@/defaults/autoconfig/prefcalls.js @RESPATH@/browser/defaults/permissions diff --git a/browser/moz.build b/browser/moz.build index 6e339e1888..adb91d9669 100644 --- a/browser/moz.build +++ b/browser/moz.build @@ -10,6 +10,7 @@ SPHINX_TREES['browser'] = 'docs' DIRS += [ 'base', 'components', + 'gopher', 'internaluserscripts', 'locales', 'modules',