Initial commit

This commit is contained in:
2025-04-13 20:31:36 +02:00
commit 2c76744b44
5 changed files with 103 additions and 0 deletions

32
GeoCoord/geocoord.user.js Normal file
View File

@@ -0,0 +1,32 @@
/* global $: true */
/* global unsafeWindow: true */
// ==UserScript==
// @name Geocaching.com + GeoCoord
// @namespace geocoord
// @version 1.0
// @author Michel ten Voorde (michel@tenvoorde.org)
// @description Add link to www.geocoord.nl on geocache pages
// @include http://www.geocaching.com/*
// @include https://www.geocaching.com/*
// @exclude https://www.geocaching.com/profile/profilecontent.html
// ==/UserScript==
(function() {
'use strict';
var geocoordURL = 'https://www.geocoord.nl/forum/index.php?action=search2&search=';
var path = window.location.pathname;
var gccode = $('#ctl00_ContentBody_CoordInfoLinkControl1_uxCoordInfoCode').html();
if (window.top == window.self &&
( (path.match(/^\/geocache\/.*/) !== null) ||
(path.match(/^\/seek\/cache_details\.aspx.*/) !== null))) {
$('#ctl00_ContentBody_GeoNav_logButton').after('<a id="linkToGeoCoord" class="btn btn-primary" style="margin-top: 14px; background-color: #17a2b8" href="' + geocoordURL + gccode + '">GeoCoord</a>');
}
}());