/* 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