cgeo / send2cgeo Goto Github PK
View Code? Open in Web Editor NEWScript for Mozilla Firefox and Google Chrome browser to send geocaches directly from your browser to c:geo on your phone.
Home Page: http://www.cgeo.org/send2cgeo.html
Script for Mozilla Firefox and Google Chrome browser to send geocaches directly from your browser to c:geo on your phone.
Home Page: http://www.cgeo.org/send2cgeo.html
I've created a small addon for Firefox and Chrome. It make use of an extensions API called "page action" - basically it's an icon that when clicked will send cache do send2cgeo on supported websites.
I saw that there was attempts in the past to create such addon but it all settled on a userscript, but IMHO is some cases it might be easier to have a dedicated addon (like better support for browser APIs, no need to install Greasmonkey/Tampermonkey just for this script).
You can check it at https://github.com/prmtl/send2cgeo_addon. I've used c:geo icons and attached an information next to it that they came from c:geo and are licensed under Apache 2.0.
I would love to see your feedback.
It would be good to self-host the Send2cgeo API, it would just need an option in the c:geo app and script to set a custom url
I sent a fix for the missing button on Opencaching.de some time ago which has been merged into the master
branch in February.
During a discussion inside the Opencaching.de forum I got aware of the fact that I still has not been pushed to the release
branch to fix the existing installations. Is there a special reason why this has not been done until today?
From @jeancaffou on September 13, 2013 22:16
This is a feature request for send2cgeo:
The "Import from web" could run as a service in the background and fetch/refresh caches from send2cgeo automatically in the last used list where caches from send2cgeo were imported to.
This way we could have quick and seamless import of caches from the browser to the device.
There should of course be an option for this in the settings, so that cgeo wouldn't use too much mobile data for users with high data costs.
Copied from original issue: cgeo/cgeo#3273
Send2cgeo gives error:
https://send2.cgeo.org/add.html?cache=GC7TDHN werkt even niet, of de pagina kan verhuisd zijn naar een nieuw webadres.
translated: does not work now or the page is moved to a new webaddress
New chrome version
Google Chrome is up-to-date
Versie 74.0.3729.157 (Officiële build) (64-bits)
Example cache: https://www.geocaching.com/geocache/GC5Z8KY_sb7-la-grotte-secrete-sentier-botanique?guid=5b31e712-f921-4122-8914-03bcfa47221c
Environment
Firefox 57.0
Tampermonkey 4.5.5633
Send2cgeo V0.4
Possibly related to recent website changes
If geocaching.com on german or an other language the link for s2cg don't added to the details template in the old map
Maybe wie have to work with a mutation observer.
From @Bananeweizen on October 25, 2012 16:7
Greasemonkey scripts can have an icon. We currently use the high resolution image of the send2cgeo website which looks not that well in the addons list. Therefore we should have a 32x32 logo somewhere on the server and afterwards have the script point to that new image.
Copied from original issue: cgeo/cgeo#2116
From @JavaJens on August 2, 2013 12:32
Hi,
is there a reason why there is no Firefox AddOn?
The idea I have is to remove the need for Greasemonkey, as I find this to be cumbersome for novice users.
It would be fairly simple to do this, 5 lines with the AddOn builder and page-mod.
Though, one possible issue I see with this is the update mechanism, as for each change of the script the addon would need to be updated as well, but then Firefox would update the app automatically.
Furthermore I have one off-topic question, is the server side code for send2cgeo publicly available as well?
Looking forward for feedback.
Copied from original issue: cgeo/cgeo#3094
When the script is active then the click on a cache icon has no result.
Without the script it shows the cache info.
From @simrebel on June 17, 2015 19:47
I would like to have send2cgeo to work on project-gc.com
Copied from original issue: cgeo/cgeo#5040
"Browser not registrated" should be "Browser not registered".
"Registrated!" should be "Registered."
typo in "you can set a name fot it" (for)
typo in "was succesfully added" (missing "s" in successfully)
Transfering issue to the right repository:
In cgeo/cgeo#7105 users reported, that when using send2cgeo on geocaching.com the "Success" message is either not shown or (tested myself) is opening as full page (URL: https://send2.cgeo.org/add.html?cache=GCxxxx) instead.
I also tested a one year old version of the send2cgeo script (0.40) with the same result. So it looks, this issue is caused by a changed behavior of the website.
Can someone enlighten me, whether master
has a stable condition to merge it to release
to trigger update on user side?
I have seen some commits, some issues, but missing the time to get the conclusion right now.
From @Lineflyer on June 11, 2015 10:10
I just recognized that we did not yet officially publish the send2cgeo script for OC.
While thinking about how to do that, I had the idea that there might be no need to have to seperate scripts but just one which triggers for both websites. Is that technically possible?
Having a combined script would minimize the effort (one version handling, one send2cgeo.html page on the website, etc.).
Copied from original issue: cgeo/cgeo#5025
Moved from cgeo/cgeo#5242
If I use
https://www.geocaching.com/geocache
instead of
http://www.geocaching.com/geocache
The Userscript is not triggered and I don't see the send2cgeo Button in Cache-Details.
Easy Fix: Add
// @include https://www.geocaching.com/geocache/*
in line 10 :)
Hi there,
I no longer see the send2cgeo button on a cache page.
I'm running Chrome 79.0.3945.130
TamperMonkey v4.9
send2cgeo 0.46
From @triakcz on August 22, 2012 17:56
Hi,
today I had realised that it will be great when send2cgeo could be able to clean queue, by "magic button". I have two testing phones. And I had sent about hundred of caches via send2cgeo to one of them some time ago (about 4 days). When clicking import from web on the other one phone ... it was downloading the same hundred of caches and after them new added caches. There should be a possibility to clean that queue, because it is really time consument and sometimes uneccessarry to download caches to all users phones.
How this should be solved ? And how send2cgeo works ? What is the structure of queue storage ?
Copied from original issue: cgeo/cgeo#1985
There is a completely new structure in the sidebar than in the old map implementation.
Address: https://www.geocaching.com/play/map
sendtogeo not posssible on geocache pages no tab click visible
in chrome and firefox
From a facebook discussion: If both our script and the one from project-gc are installed, then the send2 button is sometimes missing. I can reproduce it.
The script doesn't display the send2cgeo-button on the opencaching viewcache page (ff, 47.0.1).
Send2cgeo is not even executed if I visit the opencaching.de viewcache page (but Greasemonkey is active and the script is installed).
OC had supported https since Feb. 2016 but I thinks that's not the resason & only another problem?
See the report at the opencaching-forum: http://forum.opencaching.de/index.php?topic=4392.msg58927#msg58927
I think it's because there is no "Send to GPS" button, so the s2cgeo button isn't added.
I do not use send2cgeo so often. And if I do not use it for longer time period, the browser registration is lost. I have to register my browser and phone again.
Is there any reason for having so short expiration time for 'browser_code' cookie? Only one month. Would it be possible to extend the expiration period of the cookie to one year or so? Thanks!
From @triakcz on October 19, 2011 13:17
Hi, It'll be great when cgeo can load many caches on one click, it could be implemented same way as waypoint download from geocaching.com search results. If it is possible to add button there It'll be useful. Thanks I'm not so good in javascript so I had tryed but I can't do that.
Copied from original issue: cgeo/cgeo#689
Duplicating @bockyPT 's issue in the main cgeo repo cgeo/cgeo#6146 in case it's an issue with the script:
- On my PC I added a bunch of caches to the "send2cgeo" import queue;
- On my Android 6 phone I tried to import them to a list;
It imported a lot of caches correctly, but is now stuck on cache GC11CPZ - maybe it's related to its name starting with a "#"?
Every cache should be properly imported.
2016.11.05
Yes
Browser: Chrome 54.0.2840.71 m (64-bit)
Extension: Tampermonkey 4.1.10 with Send to c:geo 0.37
Phone: Xiaomi Redmi 3S Prime running Android 6.0.1 MMB29M (MIUI 8 Global 6.9.8 Beta)
A user contacting us on support is reporting, that with Firefox version >=57 Greasemonkey needs to change their code to get compatible.
This seems to come along with some rare not backward compatible changes.
No idea if send2cgeo is affected. Can someone check?
https://arewewebextensionsyet.com/
http://www.greasespot.net/2017/09/greasemonkey-4-announcement.html
The new list page https://www.geocaching.com/plan/lists is not supported by s2cg
An implementation like GCTor would be nice.
There are three links from the send2cgeo homepage to the repo, 2 of them pointing to master, one to release. I guess they should all point to release?
Why is the script source duplicated in the root directory and the "chrome-extension" sub directory? I totally don't know which one to edit now. If the one in chrome-extension is deprecated, it should be deleted. If it needs to be there for building a chrome extension, then it should also be deleted, but a small ant script be added to copy it from the root directory.
send2cgeo says: “Device 'MirDesir??e' was successfully added to browser […].”
I’d have expected an é, not two question marks ☺
From @Lineflyer on August 9, 2012 19:30
From support mail:
For the send2cgeo – Userscript it is necessary to accept cookies. If the cookies are deleted (so in my case) I have to reconnect/reregistrate my browser and phone on your homepage before I use the script on the GC-homepage. The Greasemonkey-Project allows you to store some data in the browser (also after restart), so that you don’t need cookies!
Copied from original issue: cgeo/cgeo#1946
From @SnarkBoojum on October 10, 2014 15:13
I was using send2cgeo since a while, with everything working perfectly. Then I discovered I could have the site in english... and that half-broke send2cgeo: I still have the "send to c:geo" in each cache page, but not anymore on the short description mini-page when I click on a cache on the map.
I also checked that going back to english fixes the problem, and going to german makes it reappear, so it's really an i18n issue.
Copied from original issue: cgeo/cgeo#4411
From @CU8ER on August 10, 2013 19:48
Add send to c:geo script to Google store and Mozilla store.
It would be nice to add this script to these stores... it would be update automatically, users could write their reviewes, etc... mainly no problem with installing
for example GC little help is in the Google store too
Copied from original issue: cgeo/cgeo#3130
From @odl on March 25, 2012 9:15
as in latest nightly version searching/storing OC caches started to work fine, I'd like to ask for adding opencaching.pl site to official send2cgeo script. I modified it already myself for my own use and it works.. however I'm not much familiar with js (I only read few articles for gaining enough knowledge to make this work with opencaching.pl) so I believe there is a better way to do it. this is just my (so far working for both services) example..:
// ==UserScript==
// @name sendToCgeo
// @namespace http://send2.cgeo.org/
// @description Add Send to c:geo button to geocaching.com
// @include http://opencaching.pl/*
// @include http://www.geocaching.com/seek/cache_details*
// @include http://www.geocaching.com/map/beta*
// @version 0.24
// ==/UserScript==
// Inserts javascript that will be called by the s2cgeo button
var s = document.createElement('script');
s.type = 'text/javascript';
s.innerHTML = 'function s2cgeo(code) {'
+ 'window.open(\'http://send2.cgeo.org/add.html?cache=\'+code,'
+ '\'cgeo\',\'height=50,width=50\'); }';
document.getElementsByTagName("head")[0].appendChild(s);
var map = document.getElementById('cacheDetailsTemplate');
var d = document.getElementById('Download');
var op = document.getElementById('viewcache-baseinfo');
if( map != null )
{
var html = 'Log Visit</span></a> <br /> '
+ '<a href="javascript:s2cgeo(\'${cache.gc}\');" '
+ 'class="lnk">'
+ '<img src="/images/sendtogps/sendtogps_icon.png" '
+ 'align="absmiddle" border="0"> '
+ '<span>Send to c:geo</span></a>';
map.innerHTML = map.innerHTML.replace('Log Visit</span></a>', html);
}
else if( d != null )
{
var m = d.children;
var last = m.item(m.length-1);
var GCElement = document.getElementById('ctl00_ContentBody_CoordInfoLinkControl1_uxCoordInfoCode');
var GCCode = GCElement.innerHTML;
var html = '| <input type="button" '
+ 'name="ctl00$ContentBody$btnSendTocgeo" '
+ 'value="Send to c:geo" '
+ 'onclick="s2cgeo(\''+GCCode+'\'); '
+ 'return false;" '
+ 'id="ctl00_ContentBody_btnSendTocgeo" />';
last.innerHTML = last.innerHTML + html;
}
else if( op != null)
{
var n = op.children;
var last = n.item(n.length-1);
var OPhtml = op.innerHTML;
var OPElement = OPhtml.match("wp=(.*?)&");
var OPCode = OPElement[1];
var html = '<div class="send-to-gps"><input type="button" '
+ 'name="ctl00$ContentBody$btnSendTocgeo" '
+ 'value="Send to c:geo" '
+ 'onclick="s2cgeo(\''+OPCode+'\'); '
+ 'return false;" '
+ 'id="ctl00_ContentBody_btnSendTocgeo" style="BACKGROUND: rgb(234,239,247); '
+ 'BORDER-RIGHT: #005e9d 2px outset; BORDER-TOP: #000000 1px outset; '
+ 'FONT-WEIGHT: bold; FONT-SIZE: 8pt; PADDING-BOTTOM: 2px; '
+ 'BORDER-LEFT: #000000 1px outset; PADDING-TOP: 2px; '
+ 'BORDER-BOTTOM: #005e9d 2px outset; FONT-FAMILY: verdana" /></div>';
last.innerHTML = last.innerHTML + html;
}
Copied from original issue: cgeo/cgeo#1334
It gives me this error in chrome console:
ERROR: Execution of script 'Send to c:geo' failed! Cannot read property 'children' of undefined
I temporarily fixed it by manually setting the variable premium to false (I deleted the block of code checking the status of membership)
Today I learned via an OC.DE discussion that at least OC.PL has a native send2cgeo functionality. We should therefore remove the PL script. Is there any good way to phase out a userscript? I'm thinking of
From @Lineflyer on June 22, 2015 13:17
Taken from #5007:
Reason:
With the new webpage we link directly to mater on cgeo/cgeo repository.
Having a separate repository for send2cgeo would allow
So, here would be my proposal:
@updateURL
and @downloadURL
in script on master
release
master
master
into release
Will this work?
Who could support this by creating the new repo (this won't work easy with UI only).
Copied from original issue: cgeo/cgeo#5057
Would it make sense to have a small gradle build script, that puts the current as version number? Similar to our app versioning scheme? That way we can "assemble" the script the same way we assemble all other components, and the version number surely is adapted without us forgetting it.
If you have enable "Skip found caches" it worked, but send also found Caches. If you disable "Skip found caches" it will be nothing send.
https://www.geocaching.com/play/search
When third-party cookies are disabled, then an exception for https://send2.cgeo.org needs to be added ; that should be documented somewhere (and probably with instructions for the various browers on how to do that).
I've installed the send2cgeo script on chrome (Version 79.0.3945.130) and registered browser and smartphone successfully. Script-Icon shows a running state during a visit of cache details. But I can't find any button or functionallity for "send2cgeo". If a cache is choosen on map, script (Version 0.46) seems to be not running.
From @rsudev on November 26, 2014 19:52
As the website removed the button which is our anchor point, the send2cgeo button is no longer shown (cross-check other oc-nodes as well!)
Copied from original issue: cgeo/cgeo#4498
It would be great if there would be a web interface where you could enter manually a list of GC-codes (separated by comma or one code per line) that will be sent via send2cgeo to the c:geo app.
This way it would be easy to import external lists (e.g. created with the "Map Compare" tool of project-gc) into c:geo.
Thx,
Marcus
From @rsudev on January 14, 2013 7:13
As we now can download oc.de caches directly, an adaption of send2cgeo for opencaching.de would be a good idea (as was mentioned in #1334)
Copied from original issue: cgeo/cgeo#2396
@downloadurl and @updateURL need to be updated to target the new github repo (on release branch) directly.
http://www.cgeo.org/send2cgeo
on Firefox 65.0.1 (64bit)
registration window not displaying
Text message "Your Connection is not secure"
(tried to provide a screenshot - hope you can see)
webpage displays fine under Edge
Windows 10 Home
version 1809
OS Build 17763.292
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.