Steiracaching http://www.geocache.at/opflsoftforum/ |
|
Greasemonkeyscript MyGeoPlace + Modifikation http://www.geocache.at/opflsoftforum/viewtopic.php?f=13&t=757 |
Seite 1 von 1 |
Autor: | Pr3ach3rman [ Dienstag 2. Juni 2009, 10:01 ] | ||
Betreff des Beitrags: | Greasemonkeyscript MyGeoPlace + Modifikation | ||
Das Script MyGeoPlace ermöglicht es zusätzlich zu den Home Koordinaten weitere Locations anzulegen und stellt dann Links für die Nearest Suche zur Verfügung. Da das original Skript keine Links für die Map anbot hier noch eine kleine Veränderung. Einfach die Zeile 23 im Script durch folgende ersetzten. Code: links += '<a href="http://www.geocaching.com/map/default.aspx?lat=' + item[0] + '&lon=' + item[1] + '" style="float:right;"><img src="http://www.geocaching.com/images/menu/map_it.gif" style="border-width:0px; align:top; height:22px; width:20px;"></a> <a href="http://www.geocaching.com/seek/nearest.aspx?lat=' + item[0] + '&lon=' + item[1] + '">' + item[2] + '</a> (<a href="http://www.geocaching.com/seek/nearest.aspx?lat=' + item[0] + '&lon=' + item[1] + '&f=1">unfound</a>) <br clear="all">';
Modifiziert sieht das dann so aus wie beim beiliegenden Bild
|
Autor: | LoCo [ Dienstag 2. Juni 2009, 10:51 ] |
Betreff des Beitrags: | |
ah, so etwas hab ich mir schon lange gewünscht! ![]() THX |
Autor: | hynz [ Mittwoch 3. Juni 2009, 09:57 ] |
Betreff des Beitrags: | Re: Greasemonkeyscript MyGeoPlace + Modifikation |
Pr3ach3rman hat geschrieben: Das Script MyGeoPlace ermöglicht es zusätzlich zu den Home Koordinaten weitere Locations anzulegen und stellt dann Links für die Nearest Suche zur Verfügung.
Sehr nett. Danke. Ich musste uebrigens Zeile 24 und nicht 23 ersetzten. |
Autor: | tomnold [ Mittwoch 3. Juni 2009, 12:01 ] |
Betreff des Beitrags: | |
Klingt blöd is aber so: Wie kann ich Zeile XX ersetzen? |
Autor: | hynz [ Mittwoch 3. Juni 2009, 16:21 ] |
Betreff des Beitrags: | |
tomnold hat geschrieben: Klingt blöd is aber so:
Wie kann ich Zeile XX ersetzen? Das Script befindet sich nach der Installation im Ordner Code: C:\Dokumente und Einstellungen\<user>\Anwendungsdaten\Mozilla\Firefox\Profiles\<brubbel>.default\gm_scripts\mygeoplace oder so aehnlich und heisst Code: mygeoplace.user.js
Das script mit einem Texteditor oeffnen. In Zeile xx gehen (Der Editor darf keinen Zeilenumbruch machen!) Diese Zeile loeschen. Copy und Paste der "richtigen" Zeile von Pr3ach3rman Speichern des Scripts. Firefox sollte waehrend des Speicherns besser geschlossen sein. HTH |
Autor: | tomnold [ Donnerstag 4. Juni 2009, 21:13 ] |
Betreff des Beitrags: | |
Oh, danke, hab ich schon gecheckt... Pfad am MAC: Users/USERNAME/Library/Application Support/Firefox/Profiles/XYZ.default/gm_scrips/mygeoplace USERNAME und XYZ sind Variablen! |
Autor: | Pr3ach3rman [ Donnerstag 4. Juni 2009, 21:25 ] |
Betreff des Beitrags: | |
Anscheinend ist es doch nicht so einfach wie meinereiner dachte. Wenn Rechtsklick auf den Greasemonkeyaffen und Benutzerskripte verwalten nix hilft dann am besten die Windows Suchfunktion benutzen und mygeoplace.user.js suchen. Interessanterweise ist es bei mir trotzdem noch immer die Zeile 23. Ich benutze übrigens UltraEdit dafür. Möglicherweise hab ich aber mehr bearbeitet als nötig war und deshalb eine Zeile eingespart! Die zu bearbeitende Zeile beginnt jedenfalls mit "links"! |
Autor: | Pr3ach3rman [ Donnerstag 4. Juni 2009, 21:27 ] |
Betreff des Beitrags: | |
Für alle die lieber einfach den gesamten Source ersetzen, voila: Code: // ==UserScript==
// @name MyGeoPlace // @namespace http://home.fabian.cz/143-nearest-caches-from-my-places // @description This script adds new places for searching nearest caches to your Geocaching.com home. See screenshots on http://home.fabian.cz/143-nearest-caches-from-my-places // @include http://geocaching.com/my/* // @include http://www.geocaching.com/my/* // @version 0.1 // @author Lukas Vana (Fabiancz), THC geoTeam // @e-mail fabiancz@geoteam.info // ==/UserScript== GM_registerMenuCommand("MyGeoPlace: new place", newPoint); GM_registerMenuCommand("MyGeoPlace: remove place", removePoint); GM_registerMenuCommand("MyGeoPlace: check for update", checkForUpdate); var CurrentVersion = "0.1"; var lnkprofile, title; lnkprofile = document.getElementById('lbSearchOptions'); if (lnkprofile) { var coords = GM_getValue('coords'); coords = coords.split('#'); var links = ''; for (x in coords) { if(coords[x].search(',') != -1) { var item = coords[x].split(','); links += '<a href="http://www.geocaching.com/map/default.aspx?lat=' + item[0] + '&lon=' + item[1] + '" style="float:right;"><img src="http://www.geocaching.com/images/menu/map_it.gif" style="border-width:0px; align:top; height:22px; width:20px;"></a> <a href="http://www.geocaching.com/seek/nearest.aspx?lat=' + item[0] + '&lon=' + item[1] + '">' + item[2] + '</a> (<a href="http://www.geocaching.com/seek/nearest.aspx?lat=' + item[0] + '&lon=' + item[1] + '&f=1">unfound</a>) <br clear="all">'; } } title = document.createElement('div'); title.innerHTML = '<br/><strong>Nearest from my places' + '</strong><p style="padding: 2px; margin: 0;">' + links + '</p></div>'; lnkprofile.parentNode.insertBefore(title, lnkprofile.nextSibling); } function newPoint() { var coords = GM_getValue('coords', ''); var newCoords = window.prompt("New coordinates:\nFormat: latitude,longitude,name\nExample: 49.95,14.3154,Home", ""); var coordsValidation = newCoords.split(','); if(!isNaN(coordsValidation[0]) && !isNaN(coordsValidation[1]) && coordsValidation[2]!='') { GM_setValue('coords', coords + '#' + newCoords); window.location.href = window.location.href; } else { alert('Bad format'); } } function removePoint() { var coords = GM_getValue('coords', ''); var textCoords = ''; coords = coords.split('#'); for (x in coords) { if(coords[x].search(',') != -1) { var item = coords[x].split(','); textCoords += x + ': ' + item[2] + '(' + item[0] + ',' + item[1] + ")\n"; } } var coordForDel = window.prompt(textCoords + "\nCoordinate ID to delete:", ""); var newCoords = ''; for (y in coords) { if(y != coordForDel && coords[y]!='') newCoords += '#' + coords[y]; } GM_setValue('coords', newCoords); window.location.href = window.location.href; } function checkForUpdate() { GM_xmlhttpRequest({ method: 'GET', url: 'http://home.fabian.cz/userscripts/myGeoPlaces.version.txt', headers: { 'User-agent': 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14', 'Accept': 'text/plain,text/html,text/xml', }, onload: function(responseDetails) { NewVersion = responseDetails.responseText; if ( NewVersion != CurrentVersion ) { alert('This version of the MyGeoPlace script is outdated.'); if(confirm('Would you like to update the script now?')) { window.location="http://home.fabian.cz/userscripts/myGeoPlaces.user.js"; } } else { alert('There are no new updates for the MyGeoPlace script available.'); } } }) } |
Autor: | Pr3ach3rman [ Donnerstag 4. Juni 2009, 21:30 ] |
Betreff des Beitrags: | |
übrigens, mir ist klar dass ich grad (genaugenommen 2 mal) die Ingrid gemacht habe! |
Autor: | Lord Harry [ Donnerstag 4. Juni 2009, 22:07 ] |
Betreff des Beitrags: | |
Pr3ach3rman hat geschrieben: übrigens, mir ist klar dass ich grad (genaugenommen 2 mal) die Ingrid gemacht habe!
bin gespannt wann´s das erste mal "die c..... gemacht" heisst ![]() |
Autor: | hynz [ Freitag 5. Juni 2009, 09:41 ] |
Betreff des Beitrags: | |
Pr3ach3rman hat geschrieben: Wenn Rechtsklick auf den Greasemonkeyaffen und Benutzerskripte verwalten nix hilft
Peinlich ![]() Unwichtig: In meinem Editor (Editpad) bleibt es die 24. Zeile. Kann es sein, dass deiner mit 0 zu zaehlen beginnt? |
Autor: | Pr3ach3rman [ Freitag 5. Juni 2009, 10:29 ] |
Betreff des Beitrags: | |
Nö, fängt mit 1 an und die 23 hab ich bearbeitet. Möglicherweise hab ich aber beim rumbasteln eine Leerzeile gelöscht. Keine Ahnung...hauptsache es läuft ![]() |
Autor: | Lord Harry [ Donnerstag 30. Juli 2009, 10:04 ] |
Betreff des Beitrags: | |
Hallo... hab eine frage, geht jetzt nicht um mygeoplace sondern um das gc-vote... das ding wil nach einem update dass man sich registriert...? hat das wer von euch schon ge`macht? lh |
Autor: | Pr3ach3rman [ Donnerstag 30. Juli 2009, 11:09 ] |
Betreff des Beitrags: | |
Ja, hab ich gemacht. Geht aber schnell und unbürokratisch. Anscheinend gabs zuvor zuviele Schummler ![]() |
Autor: | Lord Harry [ Donnerstag 30. Juli 2009, 11:52 ] |
Betreff des Beitrags: | |
ah ok, danke! |
Seite 1 von 1 | Alle Zeiten sind UTC + 1 Stunde |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |