// ==UserScript== // @name GC Tour // @namespace https://gist.github.com/DieBatzen/5814dc7368c1034470c8/ // @version 4.30 // @description Cachetour planning made easy. Pick some Caches, sort the list and print it out. Free for all users of geocaching.com! // @author Die Batzen, madd.in // @run-at document-end // @match http*://www.geocaching.com/* // @match https://www.gctour.de/map/show* // @exclude /^https?://www\.geocaching\.com/(login|jobs|careers|promotions|blog|help)/ // @updateURL https://gist.github.com/DieBatzen/5814dc7368c1034470c8/raw/gctour.version.js // @downloadURL https://gist.github.com/DieBatzen/5814dc7368c1034470c8/raw/gctour.user.js // @supportURL https://geoclub.de/forum/viewtopic.php?f=117&t=78798&start=9999 // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue // @grant GM_log // @grant GM_addStyle // @grant GM_xmlhttpRequest // @grant GM_openInTab // @grant GM_listValues // @grant unsafeWindow // @icon https://www.gctour.de/i/icon.png // @require https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js // @require https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js // @require https://raw.githubusercontent.com/eligrey/FileSaver.js/1.3.4/FileSaver.min.js // @require https://unpkg.com/leaflet@1.3.4/dist/leaflet.js // @connect gctour.de // @connect geocaching.com // @connect gist.github.com // @connect gist.githubusercontent.com // @connect nominatim.openstreetmap.org // @connect * // ==/UserScript== /***************************************************************************** * Copyright (C) 2008 - 2014 Martin Georgi, as of 2015 Die Batzen * * This is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation; either version 3 of the License, or (at your option) any later * version. * * This 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. * * To obtain a copy of the GNU General Public License, please see * *****************************************************************************/ (function() { // begin of immediately-invoked function expression --> own "GCTour namespace" "use strict"; /* globals */ let VERSION = GM_info.script.version, // will be checked once a day DEBUG_MODE = false, GCTOUR_HOST = 'https://www.gctour.de/', HTTP = window.location.protocol, // http or https GS_HOST = HTTP + '//www.geocaching.com/', GS_WEB_API = GS_HOST + 'api/proxy/web/v1/', GS_WPT_IMAGE_PATH = 'images/wpttypes/sm/', // set $ to jQuery local $ = window.jQuery, // are jQuery and UI loaded IS_JQUERY = ( (typeof $ !== "undefined") && (typeof $ === "function") && (typeof $.fn === "object") && (typeof $.ui === "object")), IS_OPERA = (IS_JQUERY && $.browser.opera) ? true : false, IS_GREASEMONKEY = (typeof GM_info.scriptHandler === "undefined") ? true : false, TOURS, CURRENT_TOUR, GS_USERINFO, ROT13_ARRAY, TIMEOUT, STICKY = GM_getValue('sticky', false), PROGRESS_BAR = {"progress" : 0, "total" : 0}, FAVSCORE = true, DELETED_STYLESHEET_RULES = [], SEND2CGEO = false, AUTOTOUR_WEBAPI = true, AUTOTOUR_MAX_CACHES = 1000, // 8000 is absolute maximum (by GS), but this slows browser down significantly! LM, // Leaflet Map for autoTour TOKEN, WPT_ARRAY = [{ wptTypeId : "2", guid : "32bc9333-5e52-4957-b0f6-5a2c8fc7b257", name : "Traditional Cache", shortname: "traditional", gsDisplayName: "Traditional Cache" }, { wptTypeId : "3", guid : "a5f6d0ad-d2f2-4011-8c14-940a9ebf3c74", name : "Multi-cache", shortname: "multi", gsDisplayName: "Multi-Cache" }, { wptTypeId : "8", guid : "40861821-1835-4e11-b666-8d41064d03fe", name : "Unknown Cache", shortname: "mystery", gsDisplayName: "Mystery Cache" }, { wptTypeId : "5", guid : "4bdd8fb2-d7bc-453f-a9c5-968563b15d24", name : "Letterbox Hybrid", shortname: "letterbox", gsDisplayName: "Letterbox Hybrid" }, { wptTypeId : "11", guid : "31d2ae3c-c358-4b5f-8dcd-2185bf472d3d", name : "Webcam Cache", shortname: "webcam", gsDisplayName: "Webcam Cache" }, { wptTypeId : "4", guid : "294d4360-ac86-4c83-84dd-8113ef678d7e", name : "Virtual Cache", shortname: "virtual", gsDisplayName: "Virtual Cache" }, { wptTypeId : "1858", guid : "0544fa55-772d-4e5c-96a9-36a51ebcf5c9", name : "Wherigo Cache", shortname: "wherigo", gsDisplayName: "Wherigo Cache" }, { wptTypeId : "137", guid : "c66f5cf3-9523-4549-b8dd-759cd2f18db8", name : "Earthcache", shortname: "earth", gsDisplayName: "EarthCache" }, { wptTypeId : "6", guid : "69eb8534-b718-4b35-ae3c-a856a55b0874", name : "Event Cache", // includes all event cache types shortname: "event", gsDisplayName: "Event Cache" }, { wptTypeId : "13", guid : "57150806-bc1a-42d6-9cf0-538d171a2d22", name : "Cache In Trash Out Event", shortname: "cito", gsDisplayName: "Cache In Trash Out® Event Cache" }, { wptTypeId : "453", guid : "69eb8535-b718-4b35-ae3c-a856a55b0874", name : "Mega-Event Cache", shortname: "mega", gsDisplayName: "Mega-Event Cache" }, { wptTypeId : "7005", guid : "51420629-5739-4945-8bdd-ccfd434c0ead", name : "Giga-Event Cache", shortname: "giga", gsDisplayName: "Giga-Event Cache" }, { wptTypeId: "3653", guid : "3ea6533d-bb52-42fe-b2d2-79a3424d4728", name: "Community Celebration Event", shortname: "celebration", gsDisplayName: "Community Celebration Event" }, { wptTypeId: "3774", guid : "af820035-787a-47af-b52b-becc8b0c0c88", name: "Geocaching HQ Celebration", shortname: "hq_celebration", gsDisplayName: "Geocaching HQ Celebration" }, { wptTypeId: "4738", guid : "bc2f3df2-1aab-4601-b2ff-b5091f6c02e3", name: "Geocaching HQ Block Party", shortname: "blockparty", gsDisplayName: "Geocaching HQ Block Party" // to be checked }, { wptTypeId: "3773", guid : "416f2494-dc17-4b6a-9bab-1a29dd292d8c", name: "Geocaching HQ", shortname: "hq", gsDisplayName: "Geocaching HQ" }, { wptTypeId: "1304", guid : "72e69af2-7986-4990-afd9-bc16cbbb4ce3", name: "GPS Adventures Exhibit", shortname: "gpsa", gsDisplayName: "GPS Adventures Exhibit" // to be checked }, { wptTypeId: "12", guid : "8f6dd7bc-ff39-4997-bd2e-225a0d2adf9d", name: "Locationless (Reverse) Cache", shortname: "locationless", gsDisplayName: "Locationless Cache" }, { wptTypeId: "9", guid : "2555690d-b2bc-4b55-b5ac-0cb704c0b768", name: "Project APE Cache", shortname: "ape", gsDisplayName: "Project A.P.E. Cache" } ], SIZES_ARRAY = [{ sizeTypeId : "micro", name : "Micro", newSearchId : 2 }, { sizeTypeId : "small", name : "Small", newSearchId : 8 }, { sizeTypeId : "regular", name : "Regular", newSearchId : 3 }, { sizeTypeId : "large", name : "Large", newSearchId : 4 }, { sizeTypeId : "other", name : "Other", newSearchId : 6 }, { sizeTypeId : "not_chosen", name : "Not chosen", newSearchId : 1 }, { sizeTypeId : "virtual", name : "Virtual", newSearchId : 5 } ], // https://www.geocaching.com/about/icons.aspx ATTRIBUTES_ARRAY = [ // Attribute: [GS id, image name, description] ['1', 'dogs', 'Dogs'], ['2', 'fee', 'Access/parking fee'], ['3', 'rappelling', 'Climbing gear required'], ['4', 'boat', 'Boat required'], ['5', 'scuba', 'Scuba gear required'], ['6', 'kids', 'Recommended for kids'], ['7', 'onehour', 'Takes less than an hour'], ['8', 'scenic', 'Scenic view'], ['9', 'hiking', 'Significant hike'], ['10', 'climbing', 'Difficult climb'], ['11', 'wading', 'May require wading'], ['12', 'swimming', 'May require swimming'], ['13', 'available', 'Available 24/7'], ['14', 'night', 'Recommended at night'], ['15', 'winter', 'Available in winter'], ['17', 'poisonoak', 'Poisonous plants'], ['18', 'dangerousanimals', 'Dangerous animals'], ['19', 'ticks', 'Ticks'], ['20', 'mine', 'Abandoned mine'], ['21', 'cliff', 'Cliffs/falling rocks'], ['22', 'hunting', 'Hunting area'], ['23', 'danger', 'Dangerous area'], ['24', 'wheelchair', 'Wheelchair accessible'], ['25', 'parking', 'Parking nearby'], ['26', 'public', 'Public transportation nearby'], ['27', 'water', 'Drinking water nearby'], ['28', 'restrooms', 'Public restrooms nearby'], ['29', 'phone', 'Telephone nearby'], ['30', 'picnic', 'Picnic tables nearby'], ['31', 'camping', 'Camping nearby'], ['32', 'bicycles', 'Bicycles'], ['33', 'motorcycles', 'Motorcycles'], ['34', 'quads', 'Quads'], ['35', 'jeeps', 'Off-road vehicles'], ['36', 'snowmobiles', 'Snowmobiles'], ['37', 'horses', 'Horses'], ['38', 'campfires', 'Campfires'], ['39', 'thorn', 'Thorns'], ['40', 'stealth', 'Stealth required'], ['41', 'stroller', 'Stroller accessible'], ['42', 'firstaid', 'Needs maintenance'], ['43', 'cow', 'Livestock nearby'], ['44', 'flashlight', 'Flashlight required'], ['45', 'landf', 'Lost and Found tour'], ['46', 'rv', 'Trucks/RVs'], ['47', 'field_puzzle', 'Field puzzle'], ['48', 'UV', 'UV light required'], ['49', 'snowshoes', 'May require snowshoes'], ['50', 'skiis', 'May require cross country skis'], ['51', 's-tool', 'Special tool required'], ['52', 'nightcache', 'Night cache'], ['53', 'parkngrab', 'Park and grab'], ['54', 'AbandonedBuilding', 'Abandoned structure'], ['55', 'hike_short', 'Short hike (less than 1km)'], ['56', 'hike_med', 'Medium hike (1 km-10 km)'], ['57', 'hike_long', 'Long hike (more than 10km)'], ['58', 'fuel', 'Fuel nearby'], ['59', 'food', 'Food nearby'], ['60', 'wirelessbeacon', 'Wireless beacon'], ['61', 'partnership', 'Partnership cache'], ['62', 'seasonal', 'Seasonal access'], ['63', 'touristOK', 'Recommended for tourists'], ['64', 'treeclimbing', 'Tree climbing required'], ['65', 'frontyard', 'Yard (private residence)'], ['66', 'teamwork', 'Teamwork cache'], ['67', 'geotour', 'GeoTour'], ['69', 'bonuscache', 'Bonus cache'], ['70', 'powertrail', 'Power trail'], ['71', 'challengecache', 'Challenge cache'], ['72', 'hqsolutionchecker', 'Geocaching.com solution checker'] ]; /* // TEST Anfang // test3 jQuery(function($) { alert("3. jQuery: " + $.fn.jquery); }); // test2 if (typeof unsafeWindow.jQuery !== "undefined") { unsafeWindow.jQuery(function($) { alert("2. unsafeWindow.jQuery: " + $.fn.jquery); }); } else { alert("2. unsafeWindow.jQuery not available"); } // test1 alert("1. $: " + $.fn.jquery); // TEST ENDE */ /* greasemonkey settings and functions */ // debug output functions function toLog(typ, msg) { if (DEBUG_MODE) { if (console && console[typ] && console.group && console.groupEnd) { if (typ !== 'time') console.group('GCTour'); console[typ](msg); if (typ !== 'time') console.groupEnd(); } else { GM_log(typ + ": " + msg.toString()); } } } function log(msg) { toLog("log", msg); } function debug(msg) { toLog("debug", msg); } function warn(msg) { toLog("warn", msg); } function error(msg) { toLog("error", msg); } function info(msg) { toLog("info", msg); } function table(msg) { toLog("table", msg); } function log_exception(ex) { toLog("exception", ex); } function log_timeStart(msg) { toLog("time", "time for "+msg); } function log_timeEnd(msg) { toLog("timeEnd", "time for "+msg); } // wrapper for properly alerting objects function alertObject(obj) { alert(JSON.stringify(obj, null, 4)); }; // wrapper functions for persistence function saveValue(name, value) { GM_setValue(name, JSON.stringify(value)); } function loadValue(name, defaultValue) { //debug("loadValue: '" + name + "', with default '" + defaultValue + "' (typeof " + (typeof defaultValue) + ")"); var result = GM_getValue(name, ""); //debug("loadValue: result -> '" + result.substr(0, 20) + "...'"); try { return result != "" ? JSON.parse(result) : defaultValue; } catch (e) { // fallback eval debug("loadValue: FALLBACK :-("); return eval(result); } } // GM_xmlhttpRequest response info function responseInfo(r) { debug([ "", "finalUrl: \t\t" + (r.finalUrl || "-"), "status: \t\t" + (r.status || "-"), "statusText: \t" + (r.statusText || "-"), "readyState: \t" + (r.readyState || "-"), "responseHeaders: " + (r.responseHeaders.replaceAll('\r\n',";") || "-"), "responseText: \t" + (r.responseText || "-") ].join("\n")); } // set jquery and ui (function() { var str = ""; str += "jQuery und UI geladen = " + IS_JQUERY; if (IS_JQUERY) { str += "\n\tjQuery Version = " + $.fn.jquery; str += "\n\tjQueryUI Version = " + $.ui.version; } // str += "\n\tisunsafeWindow.jQuery = " + isjQueryWindow; // str += "\n\tunsafeWindow.jQuery Version = " + ((isjQueryWindow) ? unsafeWindow.jQuery.fn.jquery : ""); // debug(str); // init gctour object $.gctour = $.gctour || {}; // init language object $.gctour.i18n = $.gctour.i18n || {}; // set default Language $.gctour.defaultLang = 'en'; // init current language = default language $.gctour.currentLang = $.gctour.defaultLang; // jquery ui dialog (default setting) $.gctour.dialog = $.gctour.dialog || {}; // default dialogs (http://api.jqueryui.com/dialog/) $.extend($.gctour.dialog, { buttons: { 'OK': { text: 'OK', disabled: false, click: function() { $(this).dialog("close"); } }, 'Schliessen': { text: 'Schliessen', disabled: false, icons: { primary: 'ui-icon-closethick' }, click: function() { $(this).dialog("close"); } }, 'Abbrechen': { text: 'Abbrechen', disabled: false, click: function() { $(this).dialog("close"); } } }, /* * Standard Optionen für ein Dialog */ basis: function() { return ({ autoOpen: false, resizable: true, closeOnEscape: true, modal: true, closeText: $.gctour.lang('btn.Schliessen') || 'Schliessen', show: 'drop', // blind, drop, scale buttons: { 'Schliessen': this.buttons.Schliessen }, width: 700, height: 500, minWidth: 300, minHeight: 200, maxWidth: 1000, maxHeight: 700, title: 'GCTour', dialogClass: 'gct gct_dialog', open: function(event, ui) { //$(".ui-dialog-titlebar-close").hide(); // $(this).dialog( "widget" ).find(".ui-dialog-titlebar-close").hide(); // x oben rechts ausblenden //$(".ui-widget-overlay").wrap('
'); // wrap für bessere Trennung zu gc.com }, beforeClose: function(event, ui) { //if ( $(".ui-widget-overlay").parent().hasClass( "gct" ) ) { // $(".ui-widget-overlay").unwrap(); //} }, close: function(event, ui) { $(this).dialog("destroy"); // diesen Dialog killen, weil immer ein neuer erstellt wird } }); }, /* * Info Optionen für ein Dialog */ info: function() { return ({ autoOpen: true, resizable: true, closeOnEscape: true, modal: true, closeText: $.gctour.lang('general.close'), show: true, // true, false, 'blind', 'drop', 'scale' hide: true, height: 'auto', title: 'GCTour Info', dialogClass: 'gct gct_dialog', open: function(event, ui) { addJqUiTheme(GM_getValue('theme', 'smoothness')); // remove interfering rules from GS stylesheet "coreCSS" (present on (old) dashboard page and others) var sheet = getStyleSheet("coreCSS"); if(typeof sheet !== "undefined") { DELETED_STYLESHEET_RULES = deleteStyleSheetRules(sheet,/.ui-|select/); debug(DELETED_STYLESHEET_RULES.length + ' rules in stylesheet "coresCSS" temporarily removed'); } }, close: function(event, ui) { // remove jqui theme $("head link#gct-ui-theme-link").remove(); // restore deleted stylesheet rules (if necessary) var sheet = getStyleSheet("coreCSS"); if(typeof sheet !== "undefined") { for (var i=0; iTour erfolgreich hochgeladen! Der Webcode lautet:
', 'tourUploaded2': '

Die Onlineabfrage kann unter ' + GCTOUR_HOST + 'tour/xWEBCODEx geschehen.

', 'tourUploadPMO': 'PM Only Caches (nicht zu verarbeiten)', 'tourUploadRetracted': 'Caches mit ungültigem GC Code (nicht zu verarbeiten)' }, 'addOwnWaypoint': 'eigenen Wegpunkt hinzufügen', 'sortAlphabetically': 'alphabetisch sortieren' }, 'cacheList': { 'logYourVisit': 'logge deinen Besuch', 'moveToList': 'in andere Tour verschieben', 'removeFromList': 'aus Tour entfernen' } }, 'settings': { 'caption': 'Einstellungen', 'language': { 'header': 'Sprache', 'select': 'Sprache wählen' }, 'printview': { 'header': 'Druckansicht', 'printMinimal': 'Minimierte Druckansicht', 'printMinimalDesc': 'Beinhaltet nur noch Hint und Spoiler zu jedem Geocache.', 'logCount': 'Anzahl der Logs in Druckansicht', 'logCounts': ['keine', 'alle', 'anzeigen'], 'fontSize': 'Schriftgröße', 'decryptHints': 'Hints entschlüsseln', 'decryptHintsDesc': 'Die Hinweise werden schon mittels Rot13 in der Druckansicht entschlüsselt.', 'editDescription': 'Beschreibung editierbar', 'editDescriptionDesc': 'Die Beschreibung lässt sich komplett nach eigenem Belieben anpassen.', 'showSpoiler': 'Spoiler Bilder anzeigen', 'showSpoilerDesc': 'Es werden die Spoiler mitgedruckt.', 'additionalWaypoints': 'Eigene Wegpunkte anzeigen', 'additionalWaypointsDesc': 'In der Druckansicht findet sich eine Tabelle mit allen "eigenen Wegpunkten".', 'additionalWaypoints2': 'Eigene Wegpunkte auf Titelseite einsortieren', 'additionalWaypoints2Desc': 'Eigene Wegpunkte werden auf der Titelseite in die Cache-Tabelle einsortiert. Ansonsten wird eine eigene Tabelle angelegt.', 'loggedVisits': 'Log-Counter anzeigen', 'loggedVisitsDesc': 'Eine Übersicht wie oft der Geocache schon gefunden wurde.', 'pageBreak': 'Seitenumbruch nach Geocache', 'pageBreakDesc': 'Es wird nach jedem Geocache eine neue Seite angefangen. Sieht man erst beim Ausdrucken.', 'pageBreakAfterMap': 'Seitenumbruch nach Übersichtskarte', 'pageBreakAfterMapDesc': 'Es wird ein Seitenumbruch nach der Übersichtseite hinzugefügt, um das Deckblatt abzuheben.', 'frontPage': 'Titelseite', 'frontPageDesc': 'Es wird eine Titelseite erzeugt mit allen Geocaches, Index und Platz für Notizen.', 'outlineMap': 'Übersichtskarte für alle Caches', 'outlineMapDesc': 'Auf der Titelseite wird eine Karte mit allen Geocaches in der Tour angezeigt.', 'outlineMapSingle': 'Übersichtskarte für jeden Cache', 'outlineMapSingleDesc': 'Unter jedem Geocache erscheint eine Karte mit seinen "Additional Waypoints".', 'showCacheDetails': 'Cache-Listings und eigene Wegpunkte drucken', 'showCacheDetailsDesc': 'Alle Geocache-Listings und eigene Wegpunkte der Tour werden mitgedruckt (wenn deaktiviert, wird nur die Titelseite gedruckt).', 'printCacheTableD': 'Spalten in Cachetabelle auf der Titelseite auswählen', 'printCacheTableDDesc': 'Auf der Titelseite können hier Spalten der Cachetabelle ausgewählt werden. Nur ausgewählte Spalten werden gedruckt.
' }, 'map': { 'header': 'Karte', 'type': 'Standard Kartentyp', 'types': { 'OSM Mapnik': 'mapnik', 'OSM DE': 'osmde', 'OSM Fahrrad': 'osmaC', 'OSM Outdoors': 'osmaO', 'OSM ÖPNV': 'osmaP', 'Topo Deutschland': 'oda', 'Google Karte': 'roadmap', 'Google Satellit': 'satellite', 'Google Hybrid': 'hybrid', 'Google Gelände': 'terrain' }, 'size': 'Standard Kartengröße', 'geocacheid': 'Geocache Code anzeigen', 'geocacheidDesc': 'Es wird immer der GCCode (z.B. GC0815) mit auf der Karte angezeigt.', 'geocachename': 'Geocache Namen anzeigen', 'geocachenameDesc': 'Der Name eines Geocaches wird zusätzlich mit eingeblendet.', 'geocacheindex': 'Geocache Index anzeigen', 'geocacheindexDesc': 'Die Postion innerhalb der Tour wird mit angezeigt.', 'awpts': 'Additional Waypoints anzeigen', 'awptsDesc': 'Wenn aktiviert, dann werden die "Additional Waypoints" eines Geocaches mit angezeigt.', 'awpt_name': 'Additional Waypoints Namen einblenden', 'awpt_nameDesc': 'Der Name eines "Additional Waypoints" wird mit angezeigt.', 'awpt_lookup': 'Additional Waypoints Lookup einblenden', 'awpt_lookupDesc': 'Der Lookupcode eines "Additional Waypoints" wird mit angezeigt.', 'owpts': 'Eigene Wegpunkte einblenden', 'owptsDesc': 'Wenn du "Eigene Wegpunkte" mit in deiner Tour hast, so werden diese auch mit auf der Karte angezeigt.', 'owpt_name': 'Namen eigener Wegpunkte anzeigen', 'owpt_nameDesc': 'Zusätzlich kann man sich noch den Namen zu jedem Wegpunkt anzeigen lassen.' }, 'gpx': { 'html': 'Beschreibung mit HTML', 'htmlDesc': 'Manche Geräte/Programme haben Probleme beim Anzeigen eines Geocaches mit HTML-Formatierung. Wenn du nur noch kryptische Beschreibungen siehst, dann bitte diese Option deaktivieren.', 'wpts': 'Additional-Waypoints exportieren', 'wptsDesc': 'Additional-Waypoints werden als extra Wegpunkt mit in die GPX exportiert. Damit hat man jeden Parkplatz direkt auf dem Gerät.', 'attributesToLog': 'Cache-Attribute als erster Logeintrag', 'attributesToLogDesc': 'Cache Attribute werden zusätzlich als erstes Log eingetragen.', 'stripGC': 'Entferne "GC" in GC-Code', 'stripGCDesc': 'Alte Geräte haben Probleme mit Wegpunkten, deren Namen länger als 8 Zeichen sind. Wenn du so ein altes Garmin hast, dann bitte diese Option anwählen!', 'maxLogCount': 'Max. Anzahl der Logs', 'prefixFavScore': 'Zeige den Prozentwert der Favoritenpunkte vor dem Cachenamen', 'prefixFavScoreDesc': 'Im Geocaching-Menü des GPSr wird vor dem Cachenamen der Prozentwert der Favoritenpunkte angezeigt (z.B. "8%GC10000 - A New Beginning"). Damit lässt sich leicht erkennen, wie ein Cache bewertet wurde.' }, 'theme': { 'select': 'Theme wählen' }, 'exportimport': { 'export': 'Export der GCTour-Einstellungen (inklusive aller Touren)', 'import': 'Import der GCTour-Einstellungen (inklusive aller Touren)' } }, 'autoTour': { 'wait': 'Bitte warten - autoTour wird erzeugt!', 'radius': 'Radius', 'center': 'Mittelpunkt', 'refresh': 'Vorschau aktualisieren', 'cacheCounts': 'Geocaches', 'maxCaches': 'Geocaches: ###NHITS### | Maximum: '+AUTOTOUR_MAX_CACHES+'
Die ersten '+AUTOTOUR_MAX_CACHES+' werden gespeichert.', 'duration': 'Dauer', 'filterLabel': 'Filter', 'filter': { 'type': 'Typ', 'size': 'Größe', 'difficulty': 'Schwierigkeit', 'terrain': 'Gelände', 'special': { 'caption': 'Spezial', 'pm': { 'all': 'Alle', 'basic': 'Keine PM only', 'premium': 'PM only' }, 'notfound': 'Nicht gefunden', 'isActive': 'Aktiv', 'minFavorites': 'Mindestzahl Favoriten' } } }, 'dlg': { 'newVersion': { 'caption': 'Neue Version verfügbar', 'content': 'Es gibt eine neue Version von GCTour.\nZum update gehen? \n\n', //ohne Anwendung 'changelog': 'Neue GCTour-Version ' + VERSION + ' installiert. Übersicht der Änderungen: ' }, 'error': { 'content': '  Leider ist ein Fehler aufgetreten!
' + 'Versuch es einfach noch einmal oder suche nach einem Update!

' } }, 'notifications': { 'addgeocache': { 'success': { 'caption': '{0} wurde hinzugefügt!', 'content': '{0} enthält jetzt auch {1}.' }, 'contains': { 'caption': '{0} wurde nicht hinzugefügt!', 'content': '{0} enthält {1} schon.' } } }, 'units': { 'km': 'Kilometer', 'mi': 'Meilen' }, 'send2cgeo': { 'title': 'an c:geo senden', 'noWP': 'ohne eigene Wegpunkte', 'usage': '
  • c:geo auf dem Mobilgerät starten und in eine Cacheliste wechseln
  • ' + '
  • Menü → Importieren → Importiere von send2cgeo
  • ' + '
  • Die Tour (ohne eigene Wegpunkte) wird automatisch in die ausgewählte Liste geladen
  • ' + '
  • c:geo wartet noch 3 Minuten, um weitere Caches herunterzuladen
  • ', 'overview': 'Übersicht', 'setup': { 'header': 'Setup', 'registerBrowser': 'Hier klicken um den Browser für Send2cgeo zu registrieren', 'desc1': '
  • c:geo auf dem Androidgerät starten, dann Menu → Einstellungen → Dienste → Send to c:geo
  • ' + '
  • Registrierung anfordern wählen, es öffnet sich ein Fenster mit einer fünfstelligen PIN
  • ', 'desc2': 'PIN hier eingeben:', 'desc3': 'PIN senden und damit Gerät hinzufügen' }, 'register': 'Browser noch nicht für Send2cgeo registriert - bitte zum "Setup" Tab wechseln und den Browser registrieren.', 'senderror': 'Ein Fehler ist aufgetreten, bitte später noch einmal versuchen.' }, 'marker': { 'coord': 'Koordinaten', 'content': 'Inhalt', 'contentHint': 'wird in Druckansicht angezeigt', 'type': 'Typ' }, 'update': { 'dialog': '

    Es ist eine neue Version von GCTour verfügbar.

    Du verwendest Version ###VERSION_OLD###, die aktuellste Version ist ###VERSION_NEW###.

    ', 'upToDate': 'GCTour ' + VERSION + ' ist aktuell!' }, 'printview': { 'found': 'Fund', 'note': 'Notiz', 'marker': 'Eigene Wegpunkte', 'removeMap': 'Karte entfernen', 'zoomMap': 'Diese Karte in einem neuem Tab öffnen.', 'dontPrintHint': 'Hinweis:
    Elemente in einem solchen Kasten werden nicht mit gedruckt!', 'reloadMap': 'Karte neu laden', 'print': 'Druck starten', 'mapHeight': 'Höhe', 'printWidth': 'Breite' }, 'cache': { 'addToTour': 'Zur Tour hinzufügen', 'directPrint': 'Drucke diesen Geocache', 'moveCoords': 'Verschiebe die Koordinaten', 'movedCoords': 'Die Koordinaten zu diesem Geocache wurden verschoben!', 'moveCoordsHelp': 'Hier hast du die Möglichkeit die original Koordinaten dieses Geocaches durch neue zu ersetzen. Diese werden dann in der Druckansicht, wie auch in der GPX verwendet. Praktisch bei der Lösung eines Mysteries.', 'deleteCoords': 'Koordinaten löschen', 'originalCoords': 'Originale Koordinaten', 'newCoords': 'Neue Koordinaten', 'addToCurrentTour': 'Zur aktuellen Tour hinzufügen', 'addToNewTour': 'Zu neuer Tour hinzufügen', 'shown': 'Angezeigte Caches', 'marked': 'Markierte Caches', 'all': 'Alle Caches' }, 'tour': { 'newDialog': 'Bitte gib einen Namen für die neue Tour ein ...', 'copy': 'Tour kopieren', 'copyNameAppendix': 'Kopie', 'delete': 'diese Tour löschen', 'deleteDialog': 'Soll die Tour wirklich gelöscht werden?', 'empty': 'Die Tour ist leer.' } }; $.gctour.i18n.en = { 'name': 'English', 'general': { 'save': 'Save', 'copy': 'copy', 'cancel': 'Cancel', 'close': 'Close', 'edit': 'Edit', 'rename': 'Rename', 'delete': 'delete', 'load': 'load', 'install': 'Install', 'findMe': 'Find me!', 'exampleCoords': 'e.g. N49° 26.082 E7° 46.587 or 49.434701 7.776446', 'notLoggedIn': 'You must be on a geocaching.com page and logged in there.', 'pleaseWait': 'Please wait - loading data ...' }, 'container': { 'toolbar': { 'newList': 'New tour', 'openTour': 'Load a tour', 'downloadTour': { 'caption': 'Download Tour', 'webcodeDownloadHelp': 'Please enter here the webcode you receive from your friend and click on "Download tour".', 'webcodeerror': 'The choosen webcode does not exist!', 'webcodesuccess': ' was successfully loaded!', 'webcodeOld': '\n !!ATTENTION!!\nThis webcode is connected with an old tour. To get all benefits of GCTour 2.0 you must upload this tour again.' }, 'showSettings': 'Show settings', 'saveSettings': 'Backup tours and settings', 'homepage': 'GCTour Home' }, 'tourHeader': { 'sendToGps': 'Send to GPSr', 'downloadGpx': 'Download GPX', 'saveAsBookmarklist': { 'title': 'Save as bookmark list (PMO)', 'caption': 'Save tour as bookmark list', 'success': 'Tour saved as bookmark list', 'up-to-date': 'The bookmark list for this tour is up-to-date', 'duplicate': 'A bookmark list for this tour already exists', 'added': 'Added to bookmark list', 'removed': 'Removed from bookmark list' }, 'makeMap': { 'caption': 'View on map', 'wait': 'Testing availablity of this map' }, 'upload': { 'caption': 'Upload Tour', 'tourUploaded1': '
    Uploading tour was successful! Webcode:
    ', 'tourUploaded2': '

    You can view the tour at ' + GCTOUR_HOST + 'tour/xWEBCODEx.

    ', 'tourUploadPMO': 'Skipped PM only Caches', 'tourUploadRetracted': 'Skipped caches with invalid GC code' }, 'addOwnWaypoint': 'Add own waypoint', 'sortAlphabetically': 'Sort alphabetically' }, 'cacheList': { 'logYourVisit': 'Log your visit', 'moveToList': 'Move to another tour', 'removeFromList': 'Remove from tour' } }, 'settings': { 'caption': 'Settings', 'language': { 'header': 'Language', 'select': 'Select language' }, 'printview': { 'header': 'Printview', 'printMinimal': 'Minimal printview', 'printMinimalDesc': 'This contains only the hint and spoiler of a geocache.', 'logCount': 'Number of logs in printview', 'logCounts': ['none', 'all', 'show'], 'fontSize': 'Font size', 'fontSizes': ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'], 'decryptHints': 'Decrypt hints', 'decryptHintsDesc': 'Hints will be already decrypted in the printout.', 'editDescription': 'Description editable', 'editDescriptionDesc': 'The description can be edited in the way you want it.', 'showSpoiler': 'Display spoiler', 'showSpoilerDesc': 'Spoiler images will be on the printout.', 'additionalWaypoints': 'Show additional waypoints', 'additionalWaypointsDesc': 'The printview will contain a table with all "Additional waypoints" from a geocache.', 'additionalWaypoints2': 'Add own waypoints to cache table', 'additionalWaypoints2Desc': 'Own waypoints will be added to the cache table on front page. Otherwise an extra table will be added.', 'loggedVisits': 'Show log counter', 'loggedVisitsDesc': 'This will show the "Find counts" overview.', 'pageBreak': 'Page break after cache', 'pageBreakDesc': 'After each geocache there will be a page break. Visiable after printing.', 'pageBreakAfterMap': 'Page break after map', 'pageBreakAfterMapDesc': 'It will be a page break after the overview to separate it from the geocaches.', 'frontPage': 'Front page', 'frontPageDesc': 'An overview will be generated containing the complete list of geocaches including index and space to take notes. ', 'outlineMap': 'Outline map for all caches', 'outlineMapDesc': 'The overview will contain a map with all geocaches.', 'outlineMapSingle': 'Outline map for every cache', 'outlineMapSingleDesc': 'After each geocache a map containing the geocache and its "Additional waypoints" will be shown.', 'showCacheDetails': 'Print cache listings and own waypoints', 'showCacheDetailsDesc': 'All geocache listings and own waypoints will be printed (if not set just the front page will be printed).', 'printCacheTableD': 'Select cache table columns on front page', 'printCacheTableDDesc': 'Cache table columns can be selected on front page. Only selected columns will be printed.
    ' }, 'map': { 'header': 'Map', 'type': 'Default map type', 'types': { 'OSM Mapnik': 'mapnik', 'OSM German style': 'osmde', 'OSM Cycle': 'osmaC', 'OSM Outdoors': 'osmaO', 'OSM Public Transport': 'osmaP', 'Topo Germany': 'oda', 'Google Map': 'roadmap', 'Google Satellite': 'satellite', 'Google Hybrid': 'hybrid', 'Google Terrain': 'terrain' }, 'size': 'Default map size', 'sizes': ['large', 'medium', 'small'], 'geocacheid': 'Show geocache id', 'geocacheidDesc': 'The GCCode (eg. GC0815) will be shown on the map.', 'geocacheindex': 'Show geocache index', 'geocacheindexDesc': 'The position of each waypoint in the current tour will be shown on the map.', 'geocachename': 'Show geocache name', 'geocachenameDesc': 'The name of an geocache will be shown on the map.', 'awpts': 'Display addtional waypoints', 'awptsDesc': 'If enabled, additional waypoints will be shown on the map.', 'awpt_name': 'Show name of the additional waypoints', 'awpt_nameDesc': 'The name of the additional waypoints will be shown on the map.', 'awpt_lookup': 'Show lookup code of additional waypoints', 'awpt_lookupDesc': 'The lookup code of the additional waypoints will be shown on the map.', 'owpts': 'Display own waypoints', 'owptsDesc': 'Own waypoints in the current tour will be shown on the map.', 'owpt_name': 'Show name of own waypoints', 'owpt_nameDesc': 'Display the name of your own waypoints' }, 'gpx': { 'header': 'GPX', 'html': 'Description with HTML', 'htmlDesc': 'Some programs/GPSr have problems to show geocaches when their description is HTML formatted. If you only see scrabbled descriptions then please disable this option.', 'wpts': 'Export additional waypoints', 'wptsDesc': 'Additional waypoints will be exported as extra waypoint to the GPX. You will see every parking place on your unit.', 'attributesToLog': 'Create log with cache attributes', 'attributesToLogDesc': 'Cache attributes are also included as a first log.', 'stripGC': 'Strip "GC" in GC-Code', 'stripGCDesc': 'Older GPSr still have problems with waypoints having names longer than 8 characters. Please use this option if you own such an unit.', 'maxLogCount': 'max number of logs', 'prefixFavScore': 'Show favorite score in front of cache name', 'prefixFavScoreDesc': 'When in Geocaching menu of GPSr, the favorite score is shown in front of the cache name (e.g. "8%GC10000 - A New Beginning"). Thereby it\'s easy to see how a cache has been rated.' }, 'theme': { 'header': 'Themes', 'select': 'Select Theme' }, 'exportimport': { 'header': 'Export/Import', 'export': 'Export of GCTour settings (including all tours)', 'import': 'Import of GCTour settings (including all tours)' } }, 'autoTour': { 'title': 'autoTour', 'wait': 'Please wait - generating autoTour!', 'radius': 'Radius', 'center': 'Center', 'refresh': 'Update preview', 'cacheCounts': 'Geocaches', 'maxCaches': 'Geocaches: ###NHITS### | Maximum: '+AUTOTOUR_MAX_CACHES+'
    First '+AUTOTOUR_MAX_CACHES+' will be stored.', 'duration': 'Duration', 'filterLabel': 'Filters', 'filter': { 'type': 'Type', 'size': 'Size', 'difficulty': 'Difficulty', 'terrain': 'Terrain', 'special': { 'caption': 'Special', 'pm': { 'all': 'All', 'basic': 'No PM only', 'premium': 'PM only' }, 'notfound': 'I haven\'t found ', 'isActive': 'is Active', 'minFavorites': 'min. Favorites' } } }, 'dlg': { 'newVersion': { 'caption': 'New version available', 'content': 'There is a new version of GCTour.\nDo you want to update? \n\n', 'changelog': 'New GCTour version ' + VERSION + ' installed. Overview of changes: ' }, 'error': { 'content': '  I\'m sorry but an error occurs.
    ' + 'Please just try again, or look for an update!

    ' } }, 'notifications': { 'addgeocache': { 'success': { 'caption': '{0} added successfully!', 'content': '{0} now also contains {1}.' }, 'contains': { 'caption': '{0} was not added!', 'content': '{0} contains {1}.' } } }, 'units': { 'km': 'Kilometer', 'mi': 'Miles' }, 'send2cgeo': { 'title': 'Send to c:geo', 'noWP': 'no own waypoints', 'usage': '
  • Start c:geo on your device and go to a list of saved caches
  • ' + '
  • Select Menu → Import → Import from send2cgeo
  • ' + '
  • The tour (without own waypoints) will automatically be downloaded from geocaching.com to the list of saved caches
  • ' + '
  • c:geo will continue to wait for more caches to be downloaded for 3 minutes
  • ', 'overview': 'Overview', 'setup': { 'header': 'Setup', 'registerBrowser': 'Click to register this browser for Send2cgeo', 'desc1': '
  • Run c:geo on your android device and select Menu → Settings → Services → Send to c:geo
  • ' + '
  • Select Request Registration, you will get an info window showing a five digit PIN
  • ', 'desc2': 'Enter PIN here:', 'desc3': 'Send PIN and add device' }, 'register': 'Browser is not registered for Send2cgeo yet - please switch to "Setup" tab and register your browser.', 'senderror': 'An error occurred, please try again later.' }, 'marker': { 'coord': 'Coordinates', 'content': 'Content', 'contentHint': 'will be shown in printview', 'type': 'Type' }, 'update': { 'dialog': '

    There is a new version of GCTour available for installation.

    You currently have installed version ###VERSION_OLD###, the latest version is ###VERSION_NEW###.

    ', 'upToDate': 'GCTour ' + VERSION + ' is up to date!' }, 'printview': { 'found': 'Found', 'note': 'Note', 'marker': 'Own waypoints', 'removeMap': 'Remove map', 'zoomMap': 'Open this map in a new tab.', 'dontPrintHint': 'Information:
    Elements in such a box will not be printed!', 'reloadMap': 'Reload map', 'print': 'Start printing', 'mapHeight': 'Height', 'printWidth': 'Width' }, 'cache': { 'addToTour': 'Add to tour', 'directPrint': 'Print this geocache', 'moveCoords': 'Move the coordinates', 'movedCoords': 'The coordinates to this geocaches are moved.', 'moveCoordsHelp': 'You have the possibility to change the original coordinates of this geocache. These will then be used in printview and also in the GPX file. This is quiet handy if you solve a mystery.', 'deleteCoords': 'Delete coordinates', 'originalCoords': 'Original coordinates', 'newCoords': 'New coordinates', 'addToCurrentTour': 'Add to current tour', 'addToNewTour': 'Add to new tour', 'shown': 'Displayed geocaches', 'marked': 'Marked geocaches', 'all': 'All caches' }, 'tour': { 'newDialog': 'Please enter a name for the new tour ...', 'copy': 'Copy tour', 'copyNameAppendix': 'Copy', 'delete': 'Delete this tour', 'deleteDialog': 'Are you sure to delete this tour?', 'empty': 'The tour is empty.' } }; $.gctour.i18n.fr = { 'name': 'Français', 'general': { 'save': 'Enregistrer', 'copy': 'dupliquer', 'cancel': 'Abandonner', 'close': 'Fermer', 'edit': 'Editer', 'rename': 'Renommer', 'delete': 'supprimer', 'load': 'charger', 'install': 'Installer', 'findMe': 'Localisez-moi!', 'exampleCoords': 'p. ex. N49° 26.082 E7° 46.587 ou 49.434701 7.776446', 'notLoggedIn': 'Vous devez être connecté à geocaching.com, merci de vous connecter.', 'pleaseWait': 'Veuillez patienter...' }, 'container': { 'toolbar': { 'newList': 'Nouveau tour', 'openTour': 'Ouvrir un Tour', 'downloadTour': { 'caption': 'Télécharger un Tour', 'webcodeDownloadHelp': 'Entrer ici le webcode que vous avez reçu et cliquer sur "Télécharger le Tour".', 'webcodeerror': 'Le webcode saisi est inexistant!', 'webcodesuccess': ' a été chargé avec succès!', 'webcodeOld': '\n !!ATTENTION!!\nCe webcode corrrespond à un ancien tour. Pour profiter pleinement de GCTour 2.0 vous devez soumettre de nouveau ce Tour.' }, 'showSettings': 'Configurer' }, 'tourHeader': { 'sendToGps': 'Transférer vers le GPSr', 'downloadGpx': 'Télécharger le GPX', 'makeMap': { 'caption': 'Voir sur la carte', 'wait': 'Vérification de la disponibilité et création de la carte... ' }, 'upload': { 'caption': 'Soumettre un Tour', 'tourUploaded1': '
    Le Tour a été correctement transféré! Webcode:
    ', 'tourUploaded2': '

    Vous pouvez visualiser ce Tour sur ' + GCTOUR_HOST + 'tour/xWEBCODEx.

    ' }, 'addOwnWaypoint': 'Ajouter un Waypoint personnel', 'sortAlphabetically': 'Trier alphabétiquement' }, 'cacheList': { 'logYourVisit': 'Loguer votre visite', 'removeFromList': 'Supprimer du tour' } }, 'settings': { 'caption': 'Configuration', 'language': { 'header': 'Langue', 'select': 'Choisir langue' }, 'printview': { 'header': 'Version imprimable', 'printMinimal': 'Version imprimable minimaliste', 'printMinimalDesc': 'Ne contient que l\'indice et le spoiler de la cache.', 'logCount': 'Nombre de logs à inclure dans la version imprimable', 'logCounts': ['aucun', 'tous', 'afficher'], 'fontSize': 'Taille des caractères', 'decryptHints': 'Decryptage des hints', 'decryptHintsDesc': 'Les indices seront décryptés dans la version imprimable.', 'editDescription': 'Description éditable', 'editDescriptionDesc': 'La description est éditable comme bon vous semble.', 'showSpoiler': 'Affichage des spoilers', 'showSpoilerDesc': 'Les images Spoiler seront visibles dans la version imprimables.', 'additionalWaypoints': 'Affichage des Waypoints additionnels', 'additionalWaypointsDesc': 'La version imprimable contiendra un tableau avec tous les "Waypoints additionnels" de la cache.', 'loggedVisits': 'Affichage du nombre de logs', 'loggedVisitsDesc': 'Affiche un récapitulatif des "Trouvé(s)".', 'pageBreak': 'Saut de page entre les caches', 'pageBreakDesc': 'Il y aura un saut de page après chaque cache. Visible seulement à l\'impression.', 'pageBreakAfterMap': 'Saut de page après la carte', 'pageBreakAfterMapDesc': 'Il y aura un saut de page après la vue globale du Tour pour la séparer des pages de caches qui suivent.', 'frontPage': 'Page d\'accueil', 'frontPageDesc': 'Une vue d\'ensemble sera générée et incluera un index avec des cases dédiées à la prise de notes.', 'outlineMap': 'Vue d\'ensemble de toutes les caches du Tour', 'outlineMapDesc': 'La vue d\'ensemble incluera une carte avec toutes les caches.', 'outlineMapSingle': 'Vue d\'ensemble pour chaque cache', 'outlineMapSingleDesc': 'Après chaque cache, une carte indiquant l\'emplacement de la cache et de ses Waypoints additionnels sera affichée.' }, 'map': { 'header': 'Carte', 'type': 'Type de carte par défaut', 'size': 'Taille de carte par défaut', 'geocacheid': 'Afficher l\'Id de la cache sur la carte', 'geocacheidDesc': 'Les codes GC (eg. GC1S5ZE) seront affichés sur la carte.', 'geocacheindex': 'Afficher les Waypoints des caches sur la vue générale', 'geocacheindexDesc': 'Les Waypoints seront affichés sur la carte.', 'geocachename': 'Afficher le nom des caches sur la vue générale', 'geocachenameDesc': 'Les noms des caches seront affichés sur la carte.', 'awpts': 'Afficher les Waypoints', 'awptsDesc': 'Si cette option est cochée les Waypoints associées aux caches seront affichés sur la carte.', 'awpt_name': 'Afficher les noms des Waypoints additionnels', 'awpt_nameDesc': 'Les noms des Waypoints additionnels seront affichés sur la carte.', 'awpt_lookup': 'Afficher les codes lookup des Waypoints additionnels', 'awpt_lookupDesc': 'Les codes lookup des Waypoints seront affichés sur la carte.', 'owpts': 'Afficher les Waypoints personnels', 'owptsDesc': 'Les Waypoints personnels seront visibles sur la carte.', 'owpt_name': 'Afficher le nom des Waypoints personnels', 'owpt_nameDesc': 'Affiche le nom des Waypoints personnels sur la carte' }, 'gpx': { 'html': 'Description des caches au format HTML', 'htmlDesc': 'Certains programmes/GPSr ont des problèmes pour afficher les descriptions au format HTML. Si vous ne voyez qu\'une description tronquée de la cache, désactivez cette option.', 'wpts': 'Exporter les Waypoints additionnels', 'wptsDesc': 'Les Waypoints additionnels seront exportés vers votres GPS. Les parkings conseillés seront visibles sur votre GPS.', 'attributesToLog': 'Créer connecter avec les attributs du cache', 'attributesToLogDesc': 'Attributs de mise en cache sont également enregistrés comme un premier signe.', 'stripGC': 'Tronquer le préfixe "GC" dans le GC-Code', 'stripGCDesc': 'Les anciens GPSr ont parfois des problèmes avec les noms de Waypoints de plus de 8 caractères. Dans ce cas cochez cette option.', 'maxLogCount': 'nombre maximum de journaux' }, 'theme': { 'select': 'Choisir Theme' } }, 'autoTour': { 'wait': 'Veuillez patienter pendant la génération automatique du Tour ...', 'radius': 'Rayon', 'center': 'Centre', 'refresh': 'Actualiser l\'aperçu', 'cacheCounts': 'Géocaches', 'duration': 'Durée', 'filterLabel': 'Filtres', 'filter': { 'type': 'Type', 'size': 'Taille', 'difficulty': 'Difficulté', 'terrain': 'Terrain', 'special': { 'caption': 'Spécial' } } }, 'dlg': { 'newVersion': { 'caption': 'Nouvelle version disponible', 'content': 'Une nouvelle version de GCTour est disponible.\n Voulez-vous mettre à jour? \n\n' }, 'error': { 'content': '  Désolé une erreur est survenue.
    ' + 'Réessayez SVP, ou vérifier les mises à jour du script!

    ' } }, 'notifications': { 'addgeocache': { 'success': { 'caption': '{0} a été ajouté', 'content': '{0} contient désormais aussi {1}.' }, 'contains': { 'caption': '{0} n\'a pas été ajouté', 'content': '{0} contient {1}.' } } }, 'units': { 'km': 'Kilomètre', 'mi': 'Miles' }, 'send2cgeo': { 'title': 'Transférer vers le c:geo' }, 'marker': { 'coord': 'Coordonnées', 'content': 'Description', 'contentHint': 'sera visble dans la version imprimable' }, 'update': { 'dialog': '

    Une nouvelle version de GCTour est disponible.

    Version installée: ###VERSION_OLD###, version la plus récente disponible: ###VERSION_NEW###.

    ', 'upToDate': 'GCTour ' + VERSION + ' est à jour!' }, 'printview': { 'found': 'Trouvée', 'note': 'Note', 'marker': 'Waypoint personnel', 'removeMap': 'Supprimer la carte', 'zoomMap': 'Ouvrir la carte dans un nouvel onglet.', 'dontPrintHint': 'Information:
    Les éléménts ayant cette apparence ne seront pas imprimés!', 'print': 'Lancez l\'impression' }, 'cache': { 'addToTour': 'Ajouter au tour', 'directPrint': 'Imprimer cette cache', 'moveCoords': 'Ajuster les coordonnées', 'movedCoords': 'Les coordonnées de cette cache ont été ajustées.', 'moveCoordsHelp': 'Vous avez la possibilité d\'ajuster les coordonnées de cette cache. Ces coordonnées seront utilisées dans la version imprimable et dans le fichier GPX . Très utile pour la saisie des solutions des caches Mystery.', 'deleteCoords': 'Supprimer les coordonnées', 'originalCoords': 'Coordonnées initiales', 'newCoords': 'Nouvelles coordonnées', 'addToCurrentTour': 'Ajouter au tour actuel', 'addToNewTour': 'Ajouter à un nouveau tour', 'shown': 'Caches affichées', 'marked': 'Caches marquées', 'all': 'Tous caches' }, 'tour': { 'newDialog': 'Veuillez saisir un nom pour ce nouveau tour ...', 'copy': 'Dupliquer le tour', 'copyNameAppendix': 'Copie', 'delete': 'Supprimer ce tour', 'deleteDialog': 'Etes-vous sûrs de vouloir supprimer ce tour?', 'empty': 'Le tour est vide.' } }; $.gctour.i18n.nl = { 'name': 'Nederlands', 'general': { 'save': 'Bewaren', 'copy': 'kopiëren', 'cancel': 'Annuleren', 'close': 'Sluiten', 'edit': 'Bewerken', 'rename': 'Hernoem', 'delete': 'verwijderen', 'load': 'laden', 'install': 'Installeren', 'findMe': 'Vind me!', 'exampleCoords': 'bv. N49° 26.082 E7° 46.587 of 49.434701 7.776446', 'notLoggedIn': 'U dient ingelogd te zijn, gelieve in te loggen.', 'pleaseWait': 'Even geduld - gegevens worden geladen ...' }, 'container': { 'toolbar': { 'newList': 'Nieuwe toer', 'openTour': 'Een toer laden', 'downloadTour': { 'caption': 'Toer downloaden', 'webcodeDownloadHelp': 'Gelieve de ontvangen webcode in te vullen en klik op "Toer downloaden".', 'webcodeerror': 'De gekozen webcode bestaat niet!', 'webcodesuccess': ' is succesvol geladen!', 'webcodeOld': '\n !!AANDACHT!!\nDeze webcode bevat een oude toer. Om alle voordelen van GCTour 2.0 te benutten moet deze toer opnieuw worden geüpload worden.' }, 'showSettings': 'Instellingen tonen' }, 'tourHeader': { 'sendToGps': 'Naar GPSr versturen', 'downloadGpx': 'GPX downloaden', 'makeMap': { 'caption': 'Bekijk op de kaart', 'wait': 'Beschikbaarheid kaart wordt getest' }, 'upload': { 'caption': 'Toer uploaden', 'tourUploaded1': '
    Uploaden toer was succesvol! Webcode:
    ', 'tourUploaded2': '

    Je kan de toer bekijken op ' + GCTOUR_HOST + 'tour/xWEBCODEx.

    ', }, 'addOwnWaypoint': 'Eigen waypoint toevoegen', 'sortAlphabetically': 'Alfabetisch sorteren' }, 'cacheList': { 'logYourVisit': 'Log je bezoek', 'removeFromList': 'Van toer verwijderen' } }, 'settings': { 'caption': 'Instellingen', 'language': { 'header': 'Taal', 'select': 'Taal kiezen' }, 'printview': { 'header': 'Afdrukweergave', 'printMinimal': 'Minimale afdrukweergave', 'printMinimalDesc': 'Dit bevat enkel de hint en spoiler van een geocache.', 'logCount': 'Aantal logs in afdrukweergave', 'logCounts': ['geen', 'alle', 'tonen'], 'fontSize': 'Fontgrootte', 'decryptHints': 'Decodeer hints', 'decryptHintsDesc': 'Hints worden gedecodeerd bij het afdrukken.', 'editDescription': 'Beschrijving wijzigbaar', 'editDescriptionDesc': 'De beschrijving van de geocache kan aangepast worden.', 'showSpoiler': 'Spoiler tonen', 'showSpoilerDesc': 'Spoilers worden afgedrukt.', 'additionalWaypoints': 'Additional waypoints tonen', 'additionalWaypointsDesc': 'De afdrukweergave zal een tabel met de "additional waypoints" van een geocache bevatten.', 'loggedVisits': 'Log teller tonen', 'loggedVisitsDesc': 'Dit toont een "Find Counts" overzicht.', 'pageBreak': 'Pagina einde achter cache', 'pageBreakDesc': 'Bij het afdrukken komt achter elke geocache een nieuwe pagina.', 'pageBreakAfterMap': 'Pagina einde achter kaart', 'pageBreakAfterMapDesc': 'Er komt een nieuwe pagina tussen het overzicht en de geocaches.', 'frontPage': 'Frontpagina', 'frontPageDesc': 'Een overzicht wordt gemaakt met de volledige lijst van de geocaches met een index en plaats voor notities.', 'outlineMap': 'Kaart maken voor alle geocaches', 'outlineMapDesc': 'Het overzicht zal een kaart met alle geocaches bevatten.', 'outlineMapSingle': 'Kaart maken voor elke cache afzonderlijk', 'outlineMapSingleDesc': 'Na iedere geocache komt een kaart met de geocache en de additional waypoints.' }, 'map': { 'header': 'Kaart', 'type': 'Standaard kaarttype', 'size': 'Standaard kaartgrootte', 'geocacheid': 'Toon geocache id', 'geocacheidDesc': 'De GCCode (eg. GC2NTTG) wordt getoond op de kaart.', 'geocacheindex': 'Toon geocache index', 'geocacheindexDesc': 'De volgorde binnen de toer wordt getoond op de kaart.', 'geocachename': 'Toon geocache naam', 'geocachenameDesc': 'De naam van de geocache wordt getoond op de kaart.', 'awpts': 'Toon additional waypoints', 'awptsDesc': 'Additional waypoints worden getoond op de kaart.', 'awpt_name': 'Toon naam additional waypoints', 'awpt_nameDesc': 'De naam van het additional waypoint wordt getoond op de kaart.', 'awpt_lookup': 'Toon lookup code additional waypoints', 'awpt_lookupDesc': 'De lookup code van het additional waypoints wordt getoond op de kaart.', 'owpts': 'Toon eigen waypoints', 'owptsDesc': 'Eigen waypoints worden getoond op de kaart.', 'owpt_name': 'Toon naam eigen waypoints', 'owpt_nameDesc': 'De naam van het eigen waypoint wordt getoond op de kaart.' }, 'gpx': { 'html': 'Beschrijving met HTML', 'htmlDesc': 'Sommige programma\'s en GPS toestellen hebben problemen met geocache beschrijvingen in HTML. Indien dit het geval is, kan je best deze optie afzetten.', 'wpts': 'Exporteer additional waypoints', 'wptsDesc': 'Additional waypoints worden geëxporteerd als extra waypoint naar GPX. Alle paarkeerplaatsen zullen zichtbaar zijn op je toestel.', 'attributesToLog': 'Maken te loggen met cache attributen', 'attributesToLogDesc': 'Cache attributen worden ook geregistreerd als een eerste teken.', 'stripGC': '"GC" in GC-Code verwijderen', 'stripGCDesc': 'Oudere GPS toestellen kunnen problemen hebben met waypoints waarvan de naam langer is dan 8 tekens. Gebruik deze optie indien dit het geval is.', 'maxLogCount': 'Max aantal logs' }, 'theme': { 'select': 'Theme kiezen' } }, 'autoTour': { 'wait': 'Even geduld – autoTour wordt aangemaakt!', 'radius': 'Radius', 'center': 'Middelpunt', 'refresh': 'Vernieuw voorbeeld', 'cacheCounts': 'Geocaches', 'duration': 'Duur', 'filterLabel': 'Filter', 'filter': { 'type': 'Type', 'size': 'Grootte', 'difficulty': 'Moeilijkheid', 'terrain': 'Terrein', 'special': { 'caption': 'Speciaal' } } }, 'dlg': { 'newVersion': { 'caption': 'Nieuwe versie beschikbaar', 'content': 'Er is een nieuwe versie van GCTour beschikbaar.\nWil je upgraden? \n\n' }, 'error': { 'content': '  Spijtig genoeg is er een fout gebeurd.
    ' + 'Probeer het opnieuw proberen, of kijk voor update!

    ' } }, 'notifications': { 'addgeocache': { 'success': { 'caption': '{0} werd toegevoegd', 'content': '{0} bevat nu {1}.' }, 'contains': { 'caption': '{0} werd niet toegevoegd', 'content': '{0} bevat {1} reeds.' } } }, 'units': { 'km': 'Kilometer', 'mi': 'Miles' }, 'send2cgeo': { 'title': 'Naar c:geo versturen' }, 'marker': { 'coord': 'Coördinaten', 'content': 'Inhoud', 'contentHint': 'zal getoond worden in afdrukweergave' }, 'update': { 'dialog': '

    Er is een nieuwe versie van GCTour beschikbaar voor installatie.

    Versie ###VERSION_OLD### is momenteel geïnstalleerd, de recentste versie is ###VERSION_NEW###.

    ', 'upToDate': 'GCTour ' + VERSION + ' is op dit moment!' }, 'printview': { 'found': 'Gevonden', 'note': 'Note', 'marker': 'Eigen waypoint', 'removeMap': 'Kaart verwijderen', 'zoomMap': 'Open deze kaart in een nieuwe tab.', 'dontPrintHint': 'Ter info:
    Gegevens in dit kader worden niet afgedrukt!', 'print': 'Begin met afdrukken' }, 'cache': { 'addToTour': 'Aan toer toevoegen', 'directPrint': 'Deze geocache afdrukken', 'moveCoords': 'Verplaats de coördinaten', 'movedCoords': 'De coördinaten voor deze geocache zijn verplaatst.', 'moveCoordsHelp': 'Je kan de originele coördinaten van deze geocache verplaatsen. Deze worden dan gebruikt in de afdrukweergave en in het GPX bestand. Dit kan handig zijn bij een opgeloste mystery.', 'deleteCoords': 'Verwijderen coördinaten', 'originalCoords': 'Originele coördinaten', 'newCoords': 'Nieuwe coördinaten', 'addToCurrentTour': 'aan huidige toer', 'addToNewTour': 'aan nieuwe toer', 'shown': 'Getoonde geocaches', 'marked': 'Gemarkeerde geocaches', 'all': 'Alle caches' }, 'tour': { 'newDialog': 'Gelieve de naam van de nieuwe toer in te vullen ...', 'copy': 'Toer kopiëren', 'copyNameAppendix': 'Kopie', 'delete': 'Deze toer wissen', 'deleteDialog': 'Weet je zeker dat je deze toer wil verwijderen?', 'empty': 'De toer is leeg.' } }; $.gctour.i18n.pt = { 'name': 'Português', 'general': { 'save': 'Guardar', 'copy': 'copiar', 'cancel': 'Cancelar', 'close': 'Fechar', 'edit': 'Editar', 'rename': 'Renomear', 'delete': 'apagar', 'load': 'carregar', 'install': 'Instalar', 'findMe': 'Encontra-me!', 'exampleCoords': 'p.ex. N49° 26.082 E7° 46.587 ou 49.434701 7.776446', 'notLoggedIn': 'Você precisa estar logado, faça o login.', 'pleaseWait': 'Por favor aguarde - a carregar conteúdo ...' }, 'container': { 'toolbar': { 'newList': 'Nova Rota', 'openTour': 'Carregar uma Rota', 'downloadTour': { 'caption': 'Transferir Rota', 'webcodeDownloadHelp': 'Por favor introduza aqui o código que recebeu e clique em "Transferir Rota".', 'webcodeerror': 'O Código escolhido não existe!', 'webcodesuccess': ' foi carregada!', 'webcodeOld': '\n !!ATENÇÃO!!\nEste código está conectado com uma rota antiga. Para obter todos os benefícios do GCTour 2.0, tem de enviar a rota novamente.' }, 'showSettings': 'Mostrar Configurações' }, 'tourHeader': { 'sendToGps': 'Enviar para o GPSr', 'downloadGpx': 'Transferir GPX', 'makeMap': { 'caption': 'Visualizar no mapa', 'wait': 'A testar disponibilidade deste mapa' }, 'upload': { 'caption': 'Enviar rota', 'tourUploaded1': '
    Rota enviada com sucesso! Código:
    ', 'tourUploaded2': '

    Pode ver a rota em ' + GCTOUR_HOST + 'tour/xWEBCODEx.

    ', }, 'addOwnWaypoint': 'Adicionar o seu Waypoint', 'sortAlphabetically': 'Ordenar alfabeticamente' }, 'cacheList': { 'logYourVisit': 'Registe a sua visita', 'removeFromList': 'Remover da lista' } }, 'settings': { 'caption': 'Configurações', 'language': { 'header': 'Idioma', 'select': 'Escolha idioma' }, 'printview': { 'header': 'Modo de impressão', 'printMinimal': 'Modo de Impressão mínimo', 'printMinimalDesc': 'Contém apenas a dica e o spoiler da geocache.', 'logCount': 'Número de logs no modo de impressão', 'logCounts': ['nenhum', 'tudo', 'mostrar'], 'fontSize': 'Tamanho da letra', 'decryptHints': 'Decifrar dicas', 'decryptHintsDesc': 'As dicas vão estar decifradas no modo de impressão.', 'editDescription': 'Descrição editável', 'editDescriptionDesc': 'A descrição pode ser editada da forma como quiser.', 'showSpoiler': 'Mostrar spoiler', 'showSpoilerDesc': 'Imagens de spoiler vão estar no modo de impressão.', 'additionalWaypoints': 'Mostrar Waypoints Adicionais', 'additionalWaypointsDesc': 'O modo de impressão vai conter uma tabela com todos os "Waypoints Adicionais" de uma geocache.', 'loggedVisits': 'Mostrar contador de log', 'loggedVisitsDesc': 'Vai mostrar um resumo do "Contador de Visitas".', 'pageBreak': 'Espaço na pagina depois da cache', 'pageBreakDesc': 'Depois de cada geocache vai existir uma espaçamento. Visível depois da impressão.', 'pageBreakAfterMap': 'Espaço na página depois do mapa', 'pageBreakAfterMapDesc': 'Vai existir um espaçamento depois do resumo para separar as geocaches.', 'frontPage': 'Primeira página', 'frontPageDesc': 'Um resumo vai ser gerado incluindo uma lista completa de todas as geocaches com um índice e um espaço para colocar notas.', 'outlineMap': 'Mapa com todas as caches', 'outlineMapDesc': 'O resumo vai conter um mapa com todas as geocaches.', 'outlineMapSingle': 'Mapa para todas as caches', 'outlineMapSingleDesc': 'Depois de cada geocache está um mapa contendo a geocache e os seus "Waypoints Adicionais".' }, 'map': { 'header': 'Mapa', 'type': 'Tipo de Mapa padrão', 'size': 'Tamanho de Mapa padrão', 'geocacheid': 'Mostrar id da Geocache', 'geocacheidDesc': 'O código GCCode (eg. GC0815) estará visivel no mapa.', 'geocacheindex': 'Mostrar indíce da Geocache', 'geocacheindexDesc': 'A posição de cada waypoint estará visível na rota seleccionada.', 'geocachename': 'Mostrar nome da Geocache', 'geocachenameDesc': 'O nome da geocache estará visivel.', 'awpts': 'Mostrar Waypoints Adicionais', 'awptsDesc': 'Se seleccionada, os Waypoints-Adicionais vão estar visíveis.', 'awpt_name': 'Mostrar o nome dos Waypoints Adicionais', 'awpt_nameDesc': 'O nome dos Waypoints-Adicionais vão estar no mapa.', 'awpt_lookup': 'Mostrar código dos Waypoints Adicionais', 'awpt_lookupDesc': 'Os códigos dos Waypoints-Adicionais vão estar visíveis.', 'owpts': 'Mostrar os nossos waypoints', 'owptsDesc': 'Se tem Waypoints seus na rota seleccionada e se esta opção estiver marcada, vão estar visíveis no mapa.', 'owpt_name': 'Mostrar o nome dos nossos waypoints', 'owpt_nameDesc': 'Mostrar o nome dos seus Waypoints' }, 'gpx': { 'html': 'Descrição com HTML', 'htmlDesc': 'Alguns programas/GPSr tem problemas em mostrar as geocaches se a descrição estiver no formato HTML. Se a descrição estiver confusa, desactive este opção.', 'wpts': 'Exportar waypoints adicionais', 'wptsDesc': 'Os waypoints-adicionais vão ser exportados como waypoint extra no GPX. Irá ver cada lugar de estacionamento na sua unidade.', 'attributesToLog': 'Criar login com atributos de cache', 'attributesToLogDesc': 'Atributos de cache também são registrados como um primeiro sinal.', 'stripGC': 'Remover "GC" no GC-Code', 'stripGCDesc': 'GPSr antigos tem problemas com os waypoints com nome maior que 8 caracteres. Use esta opção se tem uma unidade destas.', 'maxLogCount': 'Número máximo de logs' }, 'theme': { 'select': 'Escolha Theme' } }, 'autoTour': { 'title': 'autoRota', 'wait': 'Por favor aguarde - criando a autoRota!', 'radius': 'Raio', 'center': 'Centro', 'refresh': 'Atualizar Visualização', 'cacheCounts': 'Geocaches', 'duration': 'Duração', 'filterLabel': 'Filtros', 'filter': { 'type': 'Typ', 'size': 'Rozmiar', 'difficulty': 'Trudność', 'terrain': 'Teren', 'special': { 'caption': 'Specjalne' } } }, 'dlg': { 'newVersion': { 'caption': 'Nova versão disponível', 'content': 'Existe uma nova versão de GCTour.\nDeseja actualizar? \n\n' }, 'error': { 'content': '  Lamento mas ocorreu um erro.
    ' + 'Por favor tente outra vez, ou procure por uma atualização!

    ' } }, 'notifications': { 'addgeocache': { 'success': { 'caption': '{0} foi adicionada!', 'content': '{0} agora inclui {1}.' }, 'contains': { 'caption': '{0} não foi adicionada', 'content': '{0} contém {1} já.' } } }, 'units': { 'km': 'Quilometros', 'mi': 'Milhas' }, 'send2cgeo': { 'title': 'Enviar para o c:geo' }, 'marker': { 'coord': 'Coordenadas', 'content': 'Conteúdo', 'contentHint': 'estará visivel no modo de impressão', 'type': 'Tipo' }, 'update': { 'dialog': '

    Existe uma nova versão de GCTour disponível para instalar.

    Tem a versão ###VERSION_OLD### instalada, a última versão é ###VERSION_NEW###.

    ', 'upToDate': 'GCTour ' + VERSION + ' está atualmente!' }, 'printview': { 'found': 'Encontrada', 'note': 'Nota', 'marker': 'Waypoint próprio', 'removeMap': 'Remover mapa', 'zoomMap': 'Abrir este mapa num novo separador.', 'dontPrintHint': 'Informação:
    Elementos na caixa não vão ser impressos!', 'print': 'Iniciar a impressão' }, 'cache': { 'addToTour': 'Adicionar à rota', 'directPrint': 'Imprimir esta Geocache', 'moveCoords': 'Mover as coordenadas', 'movedCoords': 'As coordenadas desta geocache foram mudadas.', 'moveCoordsHelp': 'Tens a oportunidade de mudar as coordenadas originais desta geocache. Serão usadas no modo de impressão e também no ficheiro GPX. É util se resolver o enigma.', 'deleteCoords': 'Coordenadas para deletar', 'originalCoords': 'Coordenadas Originais', 'newCoords': 'Novas Coordenadas', 'addToCurrentTour': 'para a rota seleccionada', 'addToNewTour': 'para uma nova rota', 'shown': 'Geocaches visíveis', 'marked': 'Geocaches marcados', 'all': 'Tudo Caches' }, 'tour': { 'newDialog': 'Introduza um nome para a nova rota ...', 'copy': 'Copiar rota', 'copyNameAppendix': 'Cópia', 'delete': 'Apagar esta rota', 'deleteDialog': 'Deseja mesmo remover esta rota?', 'empty': 'A lista está vazia.' } }; // init translations (function() { /*$.each($.gctour.i18n, function(l, o) { console.table(o); });*/ /* return translate from [language][str] is language or str undefined = return "" */ $.gctour.lang = function(str) { var i18n = $.gctour.i18n, cur = $.gctour.currentLang, def = $.gctour.defaultLang, i, arr, trans, cur_trans, def_trans; // try to get current and default translation cur_trans = i18n[cur] || false; def_trans = i18n[def] || false; arr = str.split('.'); for (i = 0; i < arr.length; i++) { cur_trans = cur_trans ? cur_trans[arr[i]] : undefined; def_trans = def_trans ? def_trans[arr[i]] : undefined; } // use default language as fallback trans = (cur_trans !== undefined) ? cur_trans : (def_trans !== undefined) ? def_trans : ((DEBUG_MODE === true) ? "MISSING TRANSLATION" : ""); /* // debug info current language if (!i18n[cur]) { debug("ERROR: language '" + cur + "' is undefined"); } else if (cur_trans === undefined) { debug("ERROR: active language (" + cur + "), search '" + str + "' is undefined"); } // debug info default language if (!i18n[def]) { debug("ERROR: language '" + def + "' is undefined"); } else if (def_trans === undefined) { debug("ERROR: default language (" + def + "), search '" + str + "' is undefined"); } */ return trans; }; })(); /* styles: CSS Container, run before init() */ function initStyle() { // adding styles GM_addStyle(("" + "/* GCTour - Container */\n" + "" + "#gctourButtonWrapper {" + " height: 32px !important;" + " padding: 0 !important;" + " position: fixed !important;" + " top: 30px !important;" + " width: 35px !important;" + " background-color: #fff;" + " z-index: 10000 !important;" + " border: 1px solid #333;" + " border-width: 1px 1px 1px 0;" + " border-radius: 0 5px 5px 0;" + " -moz-user-select: none;" + "}" + "" + "#gctourButtonWrapper img {" + " position: relative;" + " top: 8px;" + " left: 8px;" + " vertical-align: top;" + "}" + "" + "#gctourContainer {" + " background-color: #fff;" + " overflow: hidden;" + " left: -210px;" + " padding: 0 !important;" + " position: fixed !important;" + " top: 15px !important;" + " width: 200px;" + " z-index: 10001 !important;" + " border: 1px solid #333;" + " border-left: 0px;" + " border-radius: 0 5px 5px 0;" + " font-size: 12px;" + " font-family: Arial;" + " line-height: 1.5;" + "}" + "" + "#gctourContainer .cachelist {" + " width: 100%;" + " margin: 0;" + " padding:0;" + " font-size:80%;" + " list-style-type:none;" + "}" + "" + "#gctourContainer .cachelist li {" + " color:#000;" + " margin:0.5em;" + " padding:3px;" + " width:120px;" + " min-height:44px;" + " list-style-position:inside;" + " border:1pt dashed gray;" + " background-color:#FFF;" + " -moz-background-clip:border;" + " -moz-background-inline-policy:continuous;" + " -moz-background-origin:padding;" + " -moz-border-radius:8px 0 8px 0;" + " border-radius:8px 0 8px 0;" + " box-sizing:content-box;" + "}" + "" + "#gctourContainer img.imgShadow {" + " -moz-box-shadow: 0 0 4px 2px rgba(0, 0, 0, 0.2);" + " box-shadow: 0 0 4px 2px rgba(0, 0, 0, 0.2);" + " background-color: lightgray;" + "}" + "" + "#gctourContainer img.tourImage {" + " cursor: pointer;" + " margin: 0 2px 0 2px;" + "}" + "" + "/* Styling the placeholder for when the user starts dragging an item */\n" + "" + "#gctourContainer li.ui-sortable-placeholder {" + " min-height:50px;" + " max-height:80px;" + " width: 90%;" + " background-color: rgba(0, 0, 0, 0.03);" + "}" + "/* GCTour - Grand */\n" + "" + ".gctour-grand-default {" + " /* http://www.colorzilla.com/gradient-editor/#a7cfef+0,c9dded+3,ffffff+10;gctour-grand-default" + " * http://css3please.com/" + " */" + " background: rgb(167,207,239); /* Old browsers */" + " background: -moz-linear-gradient(top, rgba(167,207,239,1) 0%, rgba(201,221,237,1) 3px, rgba(255,255,255,1) 10px); /* FF3.6+ */" + " background: -webkit-linear-gradient(top, rgba(167,207,239,1) 0%,rgba(201,221,237,1) 3px,rgba(255,255,255,1) 10px); /* Chrome10+,Safari5.1+ */" + " background: -o-linear-gradient(top, rgba(167,207,239,1) 0%,rgba(201,221,237,1) 3px,rgba(255,255,255,1) 10px); /* Opera 11.10+ */" + " background: linear-gradient(top, rgba(167,207,239,1) 0%,rgba(201,221,237,1) 3px,rgba(255,255,255,1) 10px); /* W3C */" + "}" + "" + ".gctour-grand-hover {" + " /* http://www.colorzilla.com/gradient-editor/#ffad32+0,ffd699+3,ffffff+10;gctour-grand-hover */" + " background: rgb(255,173,50); /* Old browsers */" + " background: -moz-linear-gradient(top, rgba(255,173,50,1) 0%, rgba(255,214,153,1) 3px, rgba(255,255,255,1) 10px); /* FF3.6+ */" + " background: -webkit-linear-gradient(top, rgba(255,173,50,1) 0%,rgba(255,214,153,1) 3px,rgba(255,255,255,1) 10px); /* Chrome10+,Safari5.1+ */" + " background: -o-linear-gradient(top, rgba(255,173,50,1) 0%,rgba(255,214,153,1) 3px,rgba(255,255,255,1) 10px); /* Opera 11.10+ */" + " background: linear-gradient(top, rgba(255,173,50,1) 0%,rgba(255,214,153,1) 3px,rgba(255,255,255,1) 10px); /* W3C */" + "}" + "" + ".gctour-grand-highlight {" + " /* http://www.colorzilla.com/gradient-editor/#ffe000+0,ffee7f+3,ffffff+10;gctour-grand-highlight */" + " background: rgb(255,224,0); /* Old browsers */" + " background: -moz-linear-gradient(top, rgba(255,224,0,1) 0%, rgba(255,238,127,1) 3px, rgba(255,255,255,1) 10px); /* FF3.6+ */" + " background: -webkit-linear-gradient(top, rgba(255,224,0,1) 0%,rgba(255,238,127,1) 3px,rgba(255,255,255,1) 10px); /* Chrome10+,Safari5.1+ */" + " background: -o-linear-gradient(top, rgba(255,224,0,1) 0%,rgba(255,238,127,1) 3px,rgba(255,255,255,1) 10px); /* Opera 11.10+ */" + " background: linear-gradient(top, rgba(255,224,0,1) 0%,rgba(255,238,127,1) 3px,rgba(255,255,255,1) 10px); /* W3C */" + "}" + "" + ".gctour-grand-active {" + " /* Grün http://www.colorzilla.com/gradient-editor/#3dff32+0,9eff99+3,ffffff+10;gctour-grand-active */" + " background: rgb(61,255,50); /* Old browsers */" + " background: -moz-linear-gradient(top, rgba(61,255,50,1) 0%, rgba(158,255,153,1) 3px, rgba(255,255,255,1) 10px); /* FF3.6+ */" + " background: -webkit-linear-gradient(top, rgba(61,255,50,1) 0%,rgba(158,255,153,1) 3px,rgba(255,255,255,1) 10px); /* Chrome10+,Safari5.1+ */" + " background: linear-gradient(top, rgba(61,255,50,1) 0%,rgba(158,255,153,1) 3px,rgba(255,255,255,1) 10px); /* W3C */$$$$" + " background: -o-linear-gradient(top, rgba(61,255,50,1) 0%,rgba(158,255,153,1) 3px,rgba(255,255,255,1) 10px); /* Opera 11.10+ */" + "}" + "" + ".gctour-grand-error {" + " /* http://www.colorzilla.com/gradient-editor/#ff3232+0,ff9999+3,ffffff+10;gctour-grand-error */" + " background: rgb(255,50,50); /* Old browsers */" + " background: -moz-linear-gradient(top, rgba(255,50,50,1) 0%, rgba(255,153,153,1) 3px, rgba(255,255,255,1) 10px); /* FF3.6+ */" + " background: -webkit-linear-gradient(top, rgba(255,50,50,1) 0%,rgba(255,153,153,1) 3px,rgba(255,255,255,1) 10px); /* Chrome10+,Safari5.1+ */" + " background: -o-linear-gradient(top, rgba(255,50,50,1) 0%,rgba(255,153,153,1) 3px,rgba(255,255,255,1) 10px); /* Opera 11.10+ */" + " background: linear-gradient(top, rgba(255,50,50,1) 0%,rgba(255,153,153,1) 3px,rgba(255,255,255,1) 10px); /* W3C */" + "}" + "" + "/* GCTour Slider */\n" + "" + ".gct_scrollbar {" + " background-color:pink;" + " height: 20px;" + " left: 0;" + " position: absolute;" + " top: 0;" + " width: 100%;" + "}" + "" + ".gct_scroller{" + " background-color:lime;" + " height: 20px;" + " left: 0;" + " position: absolute;" + " top: 0;" + " width: 20px; " + "}" + "" + "" + "/* GCTour Pop-Up */\n" + "" + ".gct_popup{" + " position:absolute;" + " z-index:10; " + " width:172px;" + " height:102px;" + " text-align:center;" + " color:#FF0000;" + " font: 14px Verdana, Arial, Helvetica, sans-serif;" + " background-color:lime;" + " border-radius: 5px;" + "}" + "" + ".gct_popup_header{" + " border-radius: 5px 5px 0px 0px;" + "}" + "" + ".dialogMask {" + " background-image:url(##dialogMaskImage##);" + " height:100%;" + " left:0;" + " opacity:0.7;" + " position:fixed;" + " top:0;" + " width:100%;" + " z-index:1100;" + "}" + "" + ".dialogBody {" + " -moz-border-radius:5px;" + " border-radius:5px;" + " background:none repeat scroll 0 0 #fff;" + " border:1px solid #333333;" + " color:#333333;" + " cursor:default;" + " font-family:Arial;" + " font-size:12px;" + " left:50%;" + " margin-left:-250px;" + " margin-top:20px;" + " padding:0 0 1em;" + " position:fixed;" + " text-align:left;" + " top:0;" + " width:625px;" + " z-index:2001;" + " max-height:85%;" + " min-height:440px;" + " overflow:auto;" + "}" + "" + ".dialogBody p {" + " font-size:12px;" + " font-weight:normal;" + " margin:1em 0;" + "}" + "" + ".dialogBody button {" + " background: none no-repeat scroll 4px center #eeeeee;" + " border: 1px outset #666666" + "}" + "" + ".dialogBody button:hover {" + " background-color: #f9f9f9;" + "}" + "" + "/* autoTour */\n" + "" + ".dialogBody select {" + " width: auto;" + " display: initial;" + " padding: initial;" + " -moz-appearance: menulist;" + " -webkit-appearance: menulist;" + "}" + "" + ".dialogBody label {" + " text-transform: none;" + " display: inline;" + "}" + "" + ".header h1 {" + " background-color:#B2D4F3;" + " background-repeat:repeat-x;" + " font-size:110% !important;" + " font-family:Helvetica Neue,Arial,Helvetica,sans-serif;" + " margin-bottom:0.2em;" + " margin-top:0;" + " padding:0.5em;" + " -moz-border-radius: 5px;" + " border-radius: 5px;" + " color:#333333;" + " background-image:url(##tabBgImage##)" + "}" + "" + "/*" + ".dialogBody h1 {" + " background-color:#7A7A7A;" + " border-bottom:1px solid #333333;" + " font-size:110%;" + " font-family:Helvetica Neue,Arial,Helvetica,sans-serif;" + " margin-bottom:0.2em;" + " padding:0.5em;" + " -moz-border-radius:5px;" + " border-radius:5px;" + " color:#fff;" + "}" + "*/" + "" + ".dialogHistory {" + " border:1px inset #999999;" + " margin:0 1em 1em;" + " padding-bottom: 1em;" + " max-height: 200px;" + " overflow-y:auto;" + " width:518px;" + " padding-left:1em;" + "}" + "" + ".dialogHistory ul {" + " margin-left:2em;" + "}" + "" + ".dialogHistory li {" + " list-style-type:circle;" + "}" + "" + ".dialogFooter input {" + " -moz-border-radius:3px;" + " border-radius:3px;" + " background:none no-repeat scroll 4px center #EEEEEE;" + " border:1px outset #666666;" + " cursor:pointer;" + " float:right;" + " margin-left:0.5em;" + " padding:3px 5px 5px 20px;" + " min-width:100px;" + " font-size: 12px;" + "}" + "" + ".dialogFooter input:hover {" + " background-color:#f9f9f9;" + "}" + "" + ".dialogContent {" + " padding:0 10px 0 10px;" + "}" + "" + ".dialogMin {" + " min-height:0 !important" + "}" + "" + "" + "/* neuer Dialog-Style mit jQuery-ui + gcTour Header (.gct_dialog) */\n" + "" + ".gct_dialog {" + " font-size: 100% !important;" + " font-family: Arial !important;" + " z-index: 1100 !important;" + "}" + ".gct_dialog .ui-widget {" + "}" + ".gct_dialog.ui-dialog {" + " padding: 0;" + "}" + ".gct_dialog.ui-dialog .ui-widget-header {" + " border: 0;" + "}" + ".gct_dialog.ui-dialog .ui-dialog-titlebar {" + " padding: 0.2em 0.1em;" + //" background: -moz-linear-gradient(center top, #A7CFEF 0%, #C9DDED 3px, #FFFFFF 10px) repeat scroll 0 0 transparent;" + " color: #000;" + "}" + ".gct_dialog.ui-dialog .ui-dialog-title {" + " padding-top: 4px;" + " text-align: left;" + " padding-left: 120px;" + " width: 75%;" + " background: url(##gctourLogo##) 2px 2px no-repeat;" + "}" + ".gct_dialog.ui-dialog .ui-dialog-buttonpane {" + " padding: 0 0.4em 0 0.4em;" + "}" + ".gct_dialog .ui-button-text-only .ui-button-text {" + " padding: 0.2em 0.8em;" + "}" + ".gct_dialog .ui-progressbar .ui-progressbar-value {" + " margin: 0;" + "}" + ".gct_dialog .progressbar-label {" + " width: 80%;" + " text-align: center;" + "}" + "" + "/* jqui settings dialog */\n" + "" + "div.gct_dialog select {" + " width: auto;" + " display: initial;" + " padding: initial;" + " -moz-appearance: menulist;" + " -webkit-appearance: menulist;" + "}" + "div.gct_dialog label {" + " text-transform: none;" + " font-size: 100%;" + "}" + "div.gct_dialog input[type='radio'] {" + " display: initial;" + "}" + "" + "#dialogDetails {" + " height:364px;" + " padding:3px;" + " overflow:auto;" + " background-color:#eff4f9;" + " border:1px solid #C0CEE3;" + " -moz-border-radius: 0 5px 5px 0;" + " border-radius: 0 5px 5px 0;" + " width:424px;" + " position: absolute;" + " right: 10px;" + "}" + "" + ".dialogList {" + " margin:0;" + " padding:0;" + "}" + ".dialogList li {" + " font-size:10px;" + " padding:3px;" + " clear:both;" + " list-style-type: none;" + "}" + "" + ".activeTour, .gct_sortable-placeholder {" + " border: 1px solid #C0CEE3;" + " -moz-border-radius: 5px 0 0 5px;" + " border-radius: 5px 0 0 5px;" + " background-color: #eff4f9;" + " padding: 1px;" + "}" + ".gct_sortable-placeholder {" + " background-color: rgba(0, 0, 0, 0.03);" + " height: 3em;" + "}" + "" + "#dialogListContainer {" + " height:374px;" + " overflow:auto;" + " width:146px;" + " position: absolute;" + " left: 10px;" + "}" + "" + "#dialogListContainer a{" + " text-decoration:underline;" + "}" + "" + ".unselectable {" + " -o-user-select: none;" + " -webkit-user-select: none;" + " -moz-user-select: -none;" + " -khtml-user-select: none;" + " user-select: none;" + "}" + "" + "#cacheList .counter {" + " position:absolute;" + " right:4px;" + " bottom: 0;" + " z-index:0;" + " overflow:hidden;" + " font: normal 24px arial,sans-serif;" + " color: #d5d5d5;" + " text-align:right;" + " text-shadow: 1px 1px 1px #C0C0C0;" + " vertical-align: text-bottom;" + " background-color: transparent;" + " margin-right:0;" + " margin-bottom:0;" + " padding: 0;" + "}" + "" + "#gctour-notification-box {" + " position: fixed;" + " right: 4px;" + " bottom: 2%;" + " width: 220px;" + " height: auto;" + " max-height: 96%;" + " overflow: hidden;" + " overflow-y: auto;" + " list-style-type: none;" + " margin: 0;" + " padding: 0;" + " z-index: 1102;" + "}" + "" + "#gctour-notification-box li {" + " overflow: hidden;" + " background-image: url('" + $.gctour.img.bg + "');" + " background-repeat: repeat-x;" + " background-attachment: scroll;" + " background-position: left top;" + " box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);" + " width: 220px;" + " cursor: pointer;" + "}" + "" + ".gctour-notification-green {" + " background-color: lightgreen;" + " color: #000000;" + " border: 1px solid #50C24E;" + " text-shadow: 0 1px 0 #FFFFFF;" + "}" + "" + ".gctour-notification-red {" + " background-color: red;" + " border: 1px solid #8B0000;" + " color: #FFFFFF;" + " text-shadow: 0 1px 0 #000000;" + "}" + "" + ".gctour-notification-blue {" + " background-color: #57B7E2;" + " border: 1px solid #0B90C4;" + " color: #000000;" + " text-shadow: 0 1px 0 #FFFFFF;" + "}" + "" + ".gctour-notification-yellow {" + " background-color: #FFFC00;" + " border: 1px solid #FFC237;" + " color: #000000;" + " text-shadow: 0 1px 0 #FFFFFF;" + "}" + "" + "/* jquery ui overwrite */\n" + "" + ".ui-button-icon-only .ui-icon {" + " margin-top: -8px !important;" + " margin-left: -8px !important;" + "}" + "" + ".gct .ui-widget-content {" + " background: #FFFFFF;" + " /* border: 0; */" + "}" + "" + ".gct .ui-widget-content a {" + " color: #00447c;" + " text-decoration: underline;" + "}" + "" + ".ui-button-text-only .ui-button-text {" + " padding: .2em .6em;" + "}" + "" + "input.ui-button {" + " padding: .2em .6em;" + "}" + "" + ".ui-dialog .ui-dialog-buttonpane {" + " margin-top: 0;" + "}" + "" + "/* Handling of Groundspeak's stylesheets: different sites use different stylesheets */\n" + "" + ".gctour-input-checkbox {" + " position: relative !important;" + " opacity: 1 !important;" + " width: 14px !important;" + " height: 14px !important;" + "}" + "" + ".gctour-input-text {" + " padding: unset !important;" + " font-size: 1em !important;" + " font-family: inherit !important;" + " border: 1px solid #ccc !important;" + " border-radius: 3px !important;" + " height: auto !important;" + " line-height: inherit !important;" + "}" + "" + ".gctour-label {" + " display: unset !important;" + "}" + "" + ".gctour-small {" + " font-size: 0.6875rem !important;" + "}" + "" + "/* send2cgeo */\n" + "" + "#gctour_send2cgeo_progressbar {" + " margin: 2px 0;" + "}" + "" + ".hide {" + " display: none;" + "}" + ".ui-progressbar {" + " position: relative;" + " width: 60%;" + "}" + "" + ".ui-progressbar-value {" + "}" + ".progress-label {" + " position: absolute;" + " width: 100%;" + " text-align: center;" + " top: 4px;" + " font-weight: bold;" + "}" + "div.gct_send2cgeo ol li {" + " padding: 2px;" + "}" + "div.gct_send2cgeo ul {" + " list-style-type: disc;" + "}" + "div.gct_send2cgeo ul, ol {" + " padding-left: 1.5em;" + " margin-bottom: 0.5em;" + " margin-left: 1.5em;" + "}" + "div.gct_send2cgeo a {" + " text-decoration: underline;" + "}" + "") .replace("##gctourLogo##", $.gctour.img.gctourLogo) .replace("##dialogMaskImage##", $.gctour.img.dialogMask) .replace("##tabBgImage##", $.gctour.img.tabBg)); } /* utilities */ // Read all GET URL variables and return them as an associative array. function getUrlVars(url) { var vars = [], hash; var hashes = url.slice(url.indexOf('?') + 1).split('&'); for (var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; } function createElement(type, attributes) { var node = document.createElement(type); for (const attr in attributes) { if (Object.hasOwn(attributes, attr)) { node.setAttribute(attr, attributes[attr]); } } return node; } function append(thisElement, toThis) { return toThis.appendChild(thisElement); } function fillTemplate(mapping, template) { var j, dummy; for (j = 0; j < mapping.length; j++) { template = template.replaceAll("###" + mapping[j][0] + "###", mapping[j][1]); } dummy = createElement('div'); dummy.innerHTML = template; return dummy.firstChild; } // rot13.js from gc.com function createROT13array() { var A = 0, C = [], D = "abcdefghijklmnopqrstuvwxyz", B = D.length; for (A = 0; A < B; A++) { C[D.charAt(A)] = D.charAt((A + 13) % 26); } for (A = 0; A < B; A++) { C[D.charAt(A).toUpperCase()] = D.charAt((A + 13) % 26).toUpperCase(); } return C; } function convertROT13Char(A) { return (A >= "A" && A <= "Z" || A >= "a" && A <= "z" ? ROT13_ARRAY[A] : A); } function convertROT13String(C) { var A = 0, B = C.length, D = ""; if (!ROT13_ARRAY) { ROT13_ARRAY = createROT13array(); } for (A = 0; A < B; A++) { D += convertROT13Char(C.charAt(A)); } return D; } function convertROTStringWithBrackets(C) { var F = "", D = "", E = true, A = 0, B = C.length; if (!ROT13_ARRAY) { ROT13_ARRAY = createROT13array(); } for (A = 0; A < B; A++) { F = C.charAt(A); if (A < (B - 4)) { if (C.toLowerCase().substr(A, 4) == "
    ") { D += "
    "; A += 3; continue; } } if (F == "[" || F == "<") { E = false; } else { if (F == "]" || F == ">") { E = true; } else { if ((F === " ") || (F === "&dhbg;")) {} else { if (E) { F = convertROT13Char(F); } } } } D += F; } return D; } // Replace all &,< and > with their HTML tag; additionally replace
    by
    (may cause problems on Garmin units) function escapeHTML(htmlString) { return (!htmlString) ? "" : htmlString.replace(/]*>/gi, '
    ').replace(/&/g, '&').replace(//g, '>'); } // strip all ASCII control codes (range 0-31) from a string, except LF and CR function stripASCIIcodes(s) { return s.split('').filter(function(x) { var n = x.charCodeAt(0); return n==10 || n==13 || n>31; // keep LF and CR }).join(''); } function xsdDateTime(date) { function pad(n) { var s = n.toString(); return (s.length < 2) ? '0' + s : s; } var yyyy = date.getFullYear(), mm1 = pad(date.getMonth() + 1), dd = pad(date.getDate()), hh = pad(date.getHours()), mm2 = pad(date.getMinutes()), ss = pad(date.getSeconds()); return yyyy + '-' + mm1 + '-' + dd + 'T' + hh + ':' + mm2 + ':' + ss + 'Z'; } // GET, POST, PUT, DELETE function promiseRequest(method, url, headers, data, progressbar=false) { log(["---PROMISEREQUEST---", "\tmethod: " + method, "\turl: " + url, "\theaders: " + JSON.stringify(headers), "\tdata: " + data, "---PROMISEREQUEST---" ].join("\n")); // return a promise return new Promise(function(resolve, reject) { GM_xmlhttpRequest({ method : method, url : url, headers : headers, data : data, timeout: 0, // infinity onload : function(result) { if (progressbar) updateProgressBar(); responseInfo(result); if (result.status >= 200 && result.status < 300) { // ok resolve(result); } else { // error //reject(' error: ' + result.status + ', message: ' + result.statusText + ', error message: ' + errMess); reject(result.responseText); } }, ontimeout : function() { let l = new URL(url); reject(' timeout detected: "no answer from ' + l.origin + '"'); }, onerror : function(result) { // network error responseInfo(result); reject(' error: ' + result.status + ', message: ' + result.statusText); } }); }); } // observe body until elem is available, then run function func once function waitForElementThenRun(elem, func, timeout) { // fine, elem is already available; no need to observe, run func immediately if ($(elem).length>0) { func(); return } timeout = timeout || 10; // default timeout after 10s timeout *= 1000; const t0 = Date.now(); log_timeStart('waitForElementThenRun() - '+elem); let cb = function(_mutationsList, observer) { // ensure that observing stops after at latest timeout [ms] if (Date.now() - t0 > timeout) { log_timeEnd('waitForElementThenRun() - '+elem); log(elem + ' not found for ' + timeout + 's'); observer.disconnect(); } if ($(elem).length>0) { log_timeEnd('waitForElementThenRun() - '+elem); observer.disconnect(); func(); } } // observe body for changes of child nodes let target = $('body')[0]; let config = { childList: true, subtree: true, attributes: true }; let observer = new MutationObserver(cb); if (target) observer.observe(target, config); } // inspiration: dojo.date.difference (http://jsfiddle.net/fr4Na/) function DateDiff(date1, date2, einheit) { var ms = date1.getTime() - date2.getTime(); // milliseconds var diff; switch (einheit) { case "second": diff = ms / 1000; break; case "minute": diff = ms / 60000; // 1000 * 60 break; case "hour": diff = ms / 3600000; // 1000 * 60 * 60 break; case "day": diff = ms / 86400000; // 1000 * 60 * 60 * 24 break; case "week": diff = ms / 604800000; // 1000 * 60 * 60 * 24 * 7 break; default: diff = ms; break; } return diff; } function dateFormatConversion(format) { return format.replace(/yy/g,'y').replace(/M/g,'m').replace(/mmm/,'M'); /* GS dateformat to jqui datepicker dateformat: https://www.geocaching.com/account/settings/preferences#SelectedDateFormat http://api.jqueryui.com/datepicker/#utility-parseDate GS --> jqui: d-->d,dd-->dd,M-->m,MM-->mm,MMM-->M,yy-->y,yyyy-->yy "d. M. yyyy" : "d. m. yy", 3. 1. 2017 "d.M.yyyy" : "d.m.yy", 3.1.2017 "d.MM.yyyy" : "d.mm.yy", 3.01.2017 "d/M/yy" : "d/m/y", 3/1/17 "d/M/yyyy" : "d/m/yy", 3/1/2017 "d/MM/yyyy" : "d/mm/yy", 3/01/2017 "dd MMM yy" : "dd M y", 03 Jan 17 "dd.MM.yy" : "dd.mm.y", 03.01.17 "dd.MM.yyyy" : "dd.mm.yy", 03.01.2017 "dd.MM.yyyy." : "dd.mm.yy.", 03.01.2017. "dd.MMM.yyyy" : "dd.M.yy", 03.Jan.2017 "dd/MM/yy" : "dd/mm/y", 03/01/17 "dd/MM/yyyy" : "dd/mm/yy", 03/01/2017 "dd/MMM/yyyy" : "dd/M/yy", 03/Jan/2017 "dd-MM-yy" : "dd-mm-y", 03-01-17 "dd-MM-yyyy" : "dd-mm-yy", 03-01-2017 "d-M-yyyy" : "d-m-yy", 3-1-2017 "M/d/yyyy" : "m/d/yy", 1/3/2017 "MM/dd/yyyy" : "mm/dd/yy", 01/03/2017 "MMM/dd/yyyy" : "M/dd/yy", Jan/03/2017 "yyyy.MM.dd." : "yy.mm.dd.", 2017.01.03. "yyyy/MM/dd" : "yy/mm/dd", 2017/01/03 "yyyy-MM-dd" : "yy-mm-dd" 2017-01-03 */ } async function parseDate(date_string) { var gs_date_format = GS_USERINFO.dateFormat, jqui_date_format = dateFormatConversion(gs_date_format), date, debugStr = "date to parse: '" + date_string + "'\nGS format: '" + gs_date_format + "'\njqui format: '" + jqui_date_format; try { date = $.datepicker.parseDate(jqui_date_format, date_string); debug(debugStr + "'\nParsed date: '" + date + "'"); } catch (e) { var err = 'Date format mismatch in fn parseDate - "' + e + '"
      date format: ' + gs_date_format + '
      date to parse: ' + date_string; if (gs_date_format === 'undefined') { // most probably third-party cookies are not accepted by Firefox err += '

    Bitte Firefox-Einstellungen prüfen: Cookies von Drittanbietern müssen akzeptiert werden.'; err += '
    Please check Firefox settings: third-party cookies need to be accepted.'; } throw err; } return date; } async function formatDate(date) { var gs_date_format = GS_USERINFO.dateFormat, jqui_date_format = dateFormatConversion(gs_date_format); try { var date_string = $.datepicker.formatDate(jqui_date_format, date); debug("date to format: '" + date + "'\nGS format: '" + gs_date_format + "'\njqui format: '" + jqui_date_format + "'\nDatestring: '" + date_string + "'"); } catch(e) { throw 'Date format mismatch in fn formatDate - "' + e + '"
      date to format: ' + date + '
      GS format: ' + gs_date_format; } return date_string; } /* geo utilities*/ /** Orientiert an Geodesy representation conversion functions (c) Chris Veness 2002-2011 **/ var Geo = {}; // Geo namespace, representing static class /** * Interpretiert einen String als Gradzahl. Diese Funktion verarbeitet alle 3 möglichen Formate (d, dm, dms) * Limitiert auf eine Komponente pro Aufruf. * * @param {String} dmsStr: Koordinaten String * @returns {Number} deg: Degrees */ Geo.parseDMS = function(dmsStr) { // entferne alle nicht Zahlen (Regex:[^\d.\s]) und teile den String an den verbleibenden Leerzeichen (Regex:[^0-9.,]) var dms = dmsStr.replace(/[^\d.\s]/g, ' ').trim().split(/[^0-9.,]+/); var deg; // wenn nix mehr übrig bleibt -> keine Koordinate if (dms == '') { return NaN; } // Anhand der Länge von dms wird ermittelt im welchem Format die Koordinaten vorliegen switch (dms.length) { case 3: // interpret 3-part result as d/m/s deg = dms[0] / 1 + dms[1] / 60 + dms[2] / 3600; break; case 2: // interpret 2-part result as d/m deg = dms[0] / 1 + dms[1] / 60; break; case 1: // just d (possibly decimal) or non-separated dddmmss deg = dms[0]; break; default: return NaN; } // anschließend negiere Wert wenn der String ein S oder W beinhaltet if (/^-|^[WS]/i.test(dmsStr.trim())) { deg = -deg; } return deg; }; /** * Konvertiert dezimal Gradzahlen zu dem festgelgegten Format ('d', 'dm', 'dms') - Vorangestellt N/S * * @param {Number} deg: Degrees * @param {String} [format=dms]: Return value as 'd', 'dm', 'dms' * @param {Number} [dp=0|2|4]: No of decimal places to use - default 0 for dms, 2 for dm, 4 for d * @returns {String} Deg/min/seconds */ Geo.toLat = function(deg, format) { var lat = Geo.toDMS(deg, format); return lat == '' ? '' : (deg < 0 ? 'S' : 'N') + " " + lat.slice(1); // erste '0' abschneiden für Lat }; /** * Konvertiert dezimal Gradzahlen zu dem festgelgegten Format ('d', 'dm', 'dms') - Vorangestellt E/W * * @param {Number} deg: Degrees * @param {String} [format=dms]: Return value as 'd', 'dm', 'dms' * @returns {String} Deg/min/seconds */ Geo.toLon = function(deg, format) { var lon = Geo.toDMS(deg, format); return lon == '' ? '' : (deg < 0 ? 'W' : 'E') + " " + lon; }; /** * Konvertiert dezimal Gradzahlen in das "deg°"(d), "deg° min" (dm) oder "deg°min'sec''"(dms) Format * * @private * @param {Number} deg: Degrees * @param {String} [format=dm]: Return Format 'd', 'dm', 'dms' * @returns {String} Koordinaten String in dem festgelegten Format * @throws {TypeError} wenn deg ein Object ist */ Geo.toDMS = function(deg, format) { if (typeof deg == 'object') { throw new TypeError('Geo.toDMS - deg is an object'); } if (isNaN(deg)) { return 'NaN'; } // give up here if we can't make a number from deg // default value of format = dm if (typeof format == 'undefined') { format = 'dm'; } deg = Math.abs(deg); // (unsigned result ready for appending NS|WE) var dms, d, m, s, min, sec, tmpD, tmpM; switch (format) { case 'd': d = deg.toFixed(8); // round degrees tmpD = d; if (d < 100) { tmpD = '0' + tmpD; } // pad with leading zeros if (d < 10) { tmpD = '0' + tmpD; } dms = tmpD; // add ° symbol break; case 'dm': min = (deg * 60).toFixed(8); // convert degrees to minutes & round d = Math.floor(min / 60); // get component deg/min m = (min % 60).toFixed(3); // pad with trailing zeros tmpD = d; tmpM = m; if (d < 100) { tmpD = '0' + tmpD; } // pad with leading zeros if (d < 10) { tmpD = '0' + tmpD; } if (m < 10) { tmpM = '0' + tmpM; } dms = tmpD + '\u00B0' + tmpM; // add ° symbol break; case 'dms': sec = (deg * 3600).toFixed(0); // convert degrees to seconds & round d = Math.floor(sec / 3600); // get component deg/min/sec m = Math.floor(sec / 60) % 60; s = (sec % 60).toFixed(0); // pad with trailing zeros if (d < 100) { d = '0' + d; } // pad with leading zeros if (d < 10) { d = '0' + d; } if (m < 10) { m = '0' + m; } if (s < 10) { s = '0' + s; } dms = d + '\u00B0' + m + '\u2032' + s + '\u2033'; // add °, ', " symbols break; } return dms; }; /** * Erzeugt einen Punkt mit den gegebenen Latitude und Longitude * @constructor * @param {Number} lat: latitude in numeric degrees * @param {Number} lon: longitude in numeric degrees */ function LatLon(lat, lon) { // only accept numbers or valid numeric strings this._lat = typeof(lat) == 'number' ? lat : typeof(lat) == 'string' && lat.trim() != '' ? +lat : NaN; this._lon = typeof(lon) == 'number' ? lon : typeof(lon) == 'string' && lon.trim() != '' ? +lon : NaN; } /** * Gibt einen String mit "lat() lon()" von diesem Punkt zurück * * @param {String} [format]: Return value als 'd', 'dm', 'dms' * @returns {String} Space-separated latitude/longitude * */ LatLon.prototype.toString = function(format) { if (typeof format == 'undefined') { format = 'dm'; } if (isNaN(this._lat) || isNaN(this._lon)) { return '-,-'; } return Geo.toLat(this._lat, format) + ' ' + Geo.toLon(this._lon, format); }; /** * Interpretiert eine Koordinaten Eingabe des Formats "N51° 12.123 E010° 23.123" oder "51.123 10.123" bzw. benutzt Geocoding API um die Koordinaten zu finden. * * @param {String} coord_string: Koordinaten in einem Format * @param {Boolean} [force_Geocoding=false]: Wenn gesetzt sucht die Methode bei nicht numerischer Eingabe mittels Geocoding nach den Koordinaten * @returns {LatLon} Koordinaten Object */ async function parseCoordinates(coord_string, force_Geocoding) { // entferne alle "," in Koordinaten String if (typeof coord_string == "string") { coord_string = coord_string.replace(/,/g, "."); } var lat, lon; // regex for N51° 12.123 E12° 34.123 var regex_coord_ns = new RegExp(/(N|S)\s*(\d{0,2})\s*°\s*(\d{0,2}[\.,]\d+)/); var regex_coord_ew = new RegExp(/(E|W)\s*(\d{0,3})\s*°\s*(\d{0,2}[\.,]\d+)/); //regex for 51.123 12.123 var regex_coord_dec = new RegExp(/(-{0,1}\d{0,2}[\.,]\d+)\s*(-{0,1}\d{0,3}[\.,]\d+)/); var result_coord_ns = regex_coord_ns.exec(coord_string); var result_coord_ew = regex_coord_ew.exec(coord_string); var result_coord_dec = regex_coord_dec.exec(coord_string); // Koordinate ist keins der beiden numerischen Formate if (!(result_coord_ns && result_coord_ew) && !result_coord_dec) { // ... now only a geocoding service can help ... if (force_Geocoding) { // search in OSM data var response = await promiseRequest('GET', "https://nominatim.openstreetmap.org/search?format=json&limit=1&q=" + coord_string); var geocoding_obj = JSON.parse(response.responseText); if (geocoding_obj.length === 0) { // no result found return false; } lat = geocoding_obj[0].lat; lon = geocoding_obj[0].lon; return new LatLon(lat, lon); } else { return false; } } else if (result_coord_ns && result_coord_ew) { // result_coord_ns[0] = "N51° 12.123" // result_coord_ew[0] = "E010° 23.123" lat = Geo.parseDMS(result_coord_ns[0]); lon = Geo.parseDMS(result_coord_ew[0]); return new LatLon(lat, lon); } else { // result enthält beide Teile der Koordinate lat = Geo.parseDMS(result_coord_dec[1]); lon = Geo.parseDMS(result_coord_dec[2]); return new LatLon(lat, lon); } } function distanceBetween(lat1, lon1, lat2, lon2) { var R = 6371000; // meters (change this constant to get miles) var dLat = (lat2 - lat1) * Math.PI / 180; var dLon = (lon2 - lon1) * Math.PI / 180; var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) * Math.sin(dLon / 2) * Math.sin(dLon / 2); var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); var d = R * c; return d; } /* helpers */ // for map page: return center and radius var getMapCenterAndRadius = function() { var newMap = false; if (location.pathname === '/play/map') { newMap = true; } var ret = {}; if (newMap) { var search = location.search.substring(1); var params = JSON.parse('{"' + search.replace(/&/g, '","').replace(/=/g,'":"') + '"}', function(key, value) { return key === "" ? value : decodeURIComponent(value) }); ret.center = {}; ret.center.lat = params.lat; ret.center.lng = params.lng; // https://gis.stackexchange.com/questions/7430/what-ratio-scales-do-google-maps-zoom-levels-correspond-to#answer-127949 var metersPerPx = 156543.03392*Math.cos(params.lat/180*Math.PI )/Math.pow(2, params.zoom); var $map =$('div.app-main'); var dim = Math.min($map.width(), $map.height()); ret.radius = (metersPerPx*(dim/2)/1000).toFixed(3); // km } else { // old map var googleMap = unsafeWindow.MapSettings ? unsafeWindow.MapSettings.Map : undefined, bounds; ret.center = ""; ret.radius = ""; if (typeof(googleMap) !== "undefined") { bounds = googleMap.getBounds(); ret.center = googleMap.getCenter(); ret.radius = Math.floor( distanceBetween( ret.center.lat, ret.center.lng, bounds.getNorthEast().lat, bounds.getNorthEast().lng - (bounds.getNorthEast().lng - bounds.getSouthWest().lng) / 2)) / 1000; } } return ret; }; // is string json, isJSON(response.responseText) // fn from js-Framework prototype v1.7 var isJSON = function(str) { if (str.length === 0) { return false; } str = str.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@') .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']') .replace(/(?:^|:|,)(?:\s*\[)+/g, ''); return (/^[\],:{}\s]*$/).test(str); }; // is String a GCCode ? // begin with 'GC' + 1 to 6 chars, current is 5 (01.2017) // return Boolean var isGCCode = function(gccode) { return (/^\s*(GC[0-9A-Z]{1,6})\s*$/).test(gccode); }; // find GCID (GCCode) in String // first 'GC' + 1 to 6 chars in a string, current is 5 (01.2017) // return String // example: http://jsfiddle.net/NUFGq/15/ var findGCCodeFromString = function(str) { if (!str || str.length === 0) { return false; } var treffer = str.match(/\bGC([0-9A-Z]{1,6})\b/) || []; return (treffer[0] || ""); }; // converts GS geocache code string of format GCxxxx to its cache ID function gCCode2ID(wp) { // in GS waypoints the letters I,L,O,S,U are missing; // therefore, for the base-31 conversion, a shift of letters is required first function shiftLettersInGCCode(wp) { let char36 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; let char31 = "0123456789ABCDEFGHJKMNPQRTVWXYZ"; wp = wp.split(''); // string to char array let i, c; for (i=0; i parseInt('FFFF',31)) // max. occurring hex value in GC waypoints id = id - 411120; // [65536,...] else id = parseInt(wp,16); // [0,65535] return id; } // retrieve stylesheet from document function getStyleSheet(name) { for (var i = 0; i < document.styleSheets.length; i++) { var sheet = document.styleSheets[i]; if (sheet.href && sheet.href.includes(name)) { return sheet; } } } // delete stylesheet rules by pattern function deleteStyleSheetRules(sheet, pattern) { var length = sheet.cssRules.length; var deletedRules = []; for (var i = 0; i < length; i++) { var rule = sheet.cssRules[i]; if (pattern.test(rule.cssText)) { deletedRules.push(rule.cssText); sheet.deleteRule(i); i -= 1; length -= 1; } } return deletedRules; } /* initialize */ // init core variables function initCore() { debug("initCore()"); // setting up the language $.gctour.currentLang = GM_getValue('language', $.gctour.defaultLang); // getting all tours TOURS = loadValue('tours', []); // go get the current tour from the tour list var currentTourId = GM_getValue('currentTour', -1); CURRENT_TOUR = getTourById(currentTourId); // oh - there is no current tour!? create one! if (!CURRENT_TOUR) { CURRENT_TOUR = {}; CURRENT_TOUR.id = getNewTourId(); CURRENT_TOUR.name = "Tour " + CURRENT_TOUR.id; CURRENT_TOUR.geocaches = []; TOURS.push(CURRENT_TOUR); log("found no currentTour! Creating new one: " + CURRENT_TOUR.id + " ; " + CURRENT_TOUR.name); saveCurrentTour(); } } function init() { debug("init()"); // set Styles (GM_addStyle) initStyle(); // add global styles var head = document.getElementsByTagName('head')[0], style = document.createElement('style'); style.type = 'text/css'; head.appendChild(style); // initialize tour list under main navigation initComponents(); // update the complete gui if the tab gets focus and handle resizing $(window).on({ 'focus' : function() { updateTour(); }, 'resize' : function() { handleResize(); } }); // process "add to GCTour" link from GCTOUR_HOST if (document.URL.search("webcode") >= 0) { document.title = "GCTour"; document.getElementsByTagName('body')[0].innerHTML = "
    "; downloadTour(document.URL.split("webcode/")[1]); return; } // process autoTour: loop through results on old search page and save autoTour if (GM_getValue('tq_url')) { processAutoTour(); } // maps // old (browse) map: /map/default.aspx if (document.URL.search(GS_HOST+"map") >= 0) { var $header = $("a[href*='account/messagecenter']"); if ($header.filter('.gclh_message-center').length > 0) // GCLH replaced the header $header = $header.filter('.gclh_message-center').parent().parent(); else $header = $header.first().parent().parent(); // autoTour button $("
    ", { "css" : { 'overflow' : "hidden", 'border-radius' : 5, 'background-color' : "#FFF", 'border' : "2px solid #999", 'cursor' : 'pointer', 'float' : 'right' }, "html" : $("

    ", { "css" : { 'padding' : 0 }, click : function(e) { var gooMap = getMapCenterAndRadius(); showAutoTourDialog(gooMap.center, gooMap.radius); }, "html" : $("", { "title": "map to autoTour", "src" : $.gctour.img.mapToAutoTour, "width" : "70px" }) }) .hover( function() { $(this).css({ 'backgroundColor' : 'orange' }); }, function() { $(this).css({ //'backgroundColor' : '#B2D4F3' 'backgroundColor' : '#FFF' }); }) }).prependTo($header); // add to tour in cache pop-up; // setTimeout is necessary since GCLH2 changes this template, too setTimeout(function() { $('#cacheDetailsTemplate').text( function(index, text) { var tmpAddToTour = '{{#if $ctx.userIsLoggedIn() }}' + '' + '' + $.gctour.lang('cache.addToTour') + '' + ''; return text.replace(/\{\{\#if \$ctx.userIsLoggedIn\(\) \}\}/g, tmpAddToTour); } ); }, 0); var add2tour = function() { setTimeout(function() { var gccode = $('#gmCacheInfo div[class*="code"]:visible:first').text().trim(); var name = $("#gmCacheInfo a[href*='cache_details.aspx']:visible:first").text().trim(); var guid = getUrlVars($("#gmCacheInfo a[href*='/seek/log.aspx?guid']:visible:first").attr("href"))["guid"]; var imageUrl = $("#gmCacheInfo img[src*='images/mapicons/']:visible:first").attr("src") || $("#gmCacheInfo img[src*='" + GS_WPT_IMAGE_PATH + "']:visible:first").attr("src"); var cacheTypeImage = imageUrl.split('/').pop(); debug("map add2tour: gccode:'" + gccode + "' name:'" + name + "' image:'" + cacheTypeImage + "' guid:'" + guid + "'"); addGeocache(gccode, guid, name, cacheTypeImage)(); saveCurrentTourRefreshGUI(); }, 0); }; // workaround for Violentmonkey in Firefox if "exportFunction" does not exist // (see https://github.com/violentmonkey/violentmonkey/issues/168#issuecomment-321573665) // nonetheless, this doesn't work for Chrome/Violentmonkey if (typeof exportFunction !== 'function') { exportFunction = function(func, scope, options) { if (options && options.defineAs) { scope[options.defineAs] = func; } return func; }; } exportFunction(add2tour, unsafeWindow, { defineAs : "add2tour" }); // make GS scrollbar in search section work setTimeout(function() { // show working scrollbar $('div#scrollbar').css('overflow',''); // remove non-working scrollbar $('div#scroller').next().remove(); },0); } // new (search) map: /play/map if (document.URL.search("/play/map") >= 0) { var addAutoTourButton = function() { let $li = $("
  • ", { "css": { 'height': 26, 'overflow': "hidden", 'border-radius': 5, 'background-color': "#FFF", 'border': "2px solid #999", 'cursor': 'pointer' }, "html": $("

    ", { click: function(e) { let map = getMapCenterAndRadius(); showAutoTourDialog(map.center, map.radius); }, "css": { 'margin-top': '0px', 'margin-bottom': '0px' }, "html": $("", { "id": "autoTourButton", "title": "map to autoTour", "src": $.gctour.img.mapToAutoTour, "width": "70px" }) }) .hover( function() { $(this).css({'backgroundColor': 'orange'}); }, function() { $(this).css({'backgroundColor': '#FFF'}); } ) }); let $autoTourAnchor = $("li a.message-center").parent(); // GCLH2 replaces site header, therefore another anchor is necessary // (we need to wait until GCLH2 header is ready) setTimeout(function() { // add button only once (due to timeout check must be here) if ($('#autoTourButton')[0]) return; if ($('gclh_nav').length>0) { if ($("li.messagecenterheaderwidget").length>0) { // message center $autoTourAnchor = $("li.messagecenterheaderwidget"); // necessary style adaptation for GCLH2 header $autoTourAnchor.css("margin-left", "0px"); } // message center removed by GCLH else if ($("li.li-user").length>0) { // user section $autoTourAnchor = $("li.li-user"); $autoTourAnchor.css("margin-left", "9px"); } // necessary style adaptations for GCLH2 header $('img',$li).css("margin-bottom", "6px"); // autoTour image $li.css('height',"29px"); // autoTour li $autoTourAnchor.next().css("margin-left", "0px"); // dashboard link } $li.insertBefore($autoTourAnchor); },1000); } // add cache to tour from cache details in sidebar var add2tour_cacheDetails = function() { let gccode = $('span.cache-metadata-code:first').text().trim(); let name = $('div.header-top-left h1').text().trim(); let guid = undefined; // must be present, but not really needed let type = $('p.status-and-type'); $('span.status', type).remove(); // remove status (if present): Premium, Disabled, ... type = type.text().trim(); let cacheTypeImage; let ind = WPT_ARRAY.findIndex(obj => obj.gsDisplayName == type); cacheTypeImage = WPT_ARRAY[ind].wptTypeId + '.gif'; debug("add2tour_cacheDetails: gccode:'" + gccode + "' name:'" + name + "' image:'" + cacheTypeImage + "' guid:'" + guid + "'"); addGeocache(gccode, guid, name, cacheTypeImage)(); saveCurrentTourRefreshGUI(); }; // add cache to tour from search list in sidebar var add2tour_searchList = function(cacheitem) { let guid = undefined; let name = cacheitem.name; let gccode = cacheitem.code; let type = cacheitem.geocacheType; let cacheTypeImage; let ind = WPT_ARRAY.findIndex(obj => obj.wptTypeId == type); cacheTypeImage = WPT_ARRAY[ind].wptTypeId + '.gif'; //debug("add2tour_searchList: gccode:'" + gccode + "' name:'" + name + "' image:'" + cacheTypeImage + "' guid:'" + guid + "'"); addGeocache(gccode, guid, name, cacheTypeImage)(); } var searchButtonIsActive = function() { if ($('button[data-event-label="Select Search toggle"]').parent().hasClass('active')) return true; else return false; } var addAllCachesFromSearchList = async function(newTour) { if (newTour && !newTourFunction()()) { return; // exit on cancel } addProgressbar(); try { // BM lists need special treatment if (document.URL.search("/map/lists/") >= 0) { // get all caches from bm list let bmId = window.location.href.split('/').pop(); let bml = new Bookmarklist(bmId); var gcs = await bml.getGeocaches(); gcs = gcs.data; for (let i=0; i 0) { nResults = Number(pagination_label.text().split(" ")[1].replace(/\D/g, '')); } else { // just 1 results page, therefore no pagination_label nResults = $('div.sidebar-content li').length; } if (caches.length !== nResults) { // results are from box search instead of radius search, thus perform an additional box search debug('results are from box search, perform one'); // width and height of GS map let $map = $('div.app-main'), pxwidth = $map.width(), pxheight = $map.height(), // upper left and lower right corner for box search map = L.map('map', { center: [center.lat, center.lng], zoom: zoom }), // upper left corner of GS map nw = map.containerPointToLatLng(L.point(-pxwidth / 2, -pxheight / 2)), // lower right corner of GS map se = map.containerPointToLatLng(L.point(pxwidth / 2, pxheight / 2)); map.remove(); let box = '&box=' + nw.lat + ',' + nw.lng + ',' + se.lat + ',' + se.lng; url += box; response = await promiseRequest('GET', url); caches = JSON.parse(response.responseText).results; } for (let i=0; i' + '' + '' + $.gctour.lang('cache.addToTour') + '' + '' + '

  • '; // observer callback for checking existence of autoTour anchor and sidebar; // furthermore, add add2tour buttons if they're missing let cb_body = function() { //debug('wait for autoTour anchor and sidebar, check if add2tour buttons are present'); if ($("li a.message-center").length===0 || $('div#sidebar').length===0 || $('button#addAll2CurrentTourButton').length > 0) { return; } // add autoTour button addAutoTourButton(); // start observing sidebar for switches between search list and cache details view // (but keep body observer running to ensure that add2tour buttons are present) let target_sidebar = $('div#sidebar')[0]; let config_sidebar = { childList: true, subtree: true }; if (target_sidebar) observer_sidebar.observe(target_sidebar, config_sidebar); } // observer callback when sidebar switches between search list and cache details view let cb_sidebar = function() { // debug('sidebar observer'); if ($('div#geocache-list').length > 0) { // list view // buttons to add all caches to current or new tour if ($('button#addAll2CurrentTourButton').length === 0 && searchButtonIsActive()) { // only add when necessary and only if search button is active let addAll2CurrentTourButton = ''; let addAll2NewTourButton = ''; let divAddAll2TourButtons = '
    ' + addAll2NewTourButton + addAll2CurrentTourButton + '
    '; if ($('div.geocache-action-bar').length === 1) { $('div.geocache-action-bar').first().after(divAddAll2TourButtons); } else { // GCLH2 optionally adds additional buttons $('div.geocache-action-bar').last().append(divAddAll2TourButtons); } $('button#addAll2CurrentTourButton').on('click', function() { addAllCachesFromSearchList(false); }); $('button#addAll2NewTourButton').on('click', function() { addAllCachesFromSearchList(true); }); // ensure that add2tour buttons are visible in search list } else if (searchButtonIsActive()) { $('button#addAll2NewTourButton').css('display','block'); $('button#addAll2CurrentTourButton').css('display','block'); } } else if ($('div.has-active-cache').length > 0 ) { // cache details view if ($('button#add2TourButton').length === 0) { // only add once // add "add2tour" button $('div.cache-preview-action-menu ul').prepend(add2TourButton); $('button#add2TourButton').on('click', function(e) { add2tour_cacheDetails(); }); } // hide add2tour buttons in bm list view } else if (!searchButtonIsActive()) { // bm list view $('button#addAll2NewTourButton').css('display','none'); $('button#addAll2CurrentTourButton').css('display','none'); } } // create observer instances linked to callback functions let observer_body = new MutationObserver(cb_body); let observer_sidebar = new MutationObserver(cb_sidebar); // ATTENTION: the order matters here // observe body for changes of child nodes to ensure that required anchors exist: // 1)
  • : autoTour button // 2)