www-apps/pmwiki - cookbook - totalcounter
[anomen-overlay.git] / www-client / opera / userjs / gc_my_finds.user.js
blobe621aed6e671f1619d85369e56fd6afdc0aaf3dc
1 // ==UserScript==
2 // @name                Create MyFinds list
3 // @namespace           http://geokeeper.sf.net/userjs
4 // @description         Create UUID/date list of found caches
5 // @include             http://www.geocaching.com/my/logs.aspx?txt=1
6 // ==/UserScript==
8 //(function () {
10  var onetimeout = 3000;
11  var retrytimeout = 10000; 
12  var o=''; 
13  var a=document.getElementsByTagName('A'); 
14  var i; 
15  for (i=0;i<a.length;i++) 
16  {
17   var e=a[i]; 
18   if (e.href.indexOf('http://www.geocaching.com/seek/cache_details.aspx?guid=') >= 0) 
19   {
20    var z=e.parentNode.previousSibling; 
21    //if (! (''+z.parentNode.innerHTML).match('Czech Republic')) {continue;} 
22    if (z.tagName != 'TD') {z = z.previousSibling}; 
23    if (z.tagName != 'TD') {continue;} 
24    var d = z.innerHTML.match(/^ *([0-9][0-9]*)\/([0-9][0-9]*)\/(200[0-9]) *$/); 
25    z=z.previousSibling; 
26    if (z.tagName != 'TD') {z = z.previousSibling}; 
27    if (z.tagName != 'TD') {continue;} z=z.childNodes[0]; 
28    if (! (''+z.alt).match(/^(Found|Webcam|Attended)/)) {continue;} 
29    d = d[3]+'-'+d[1].replace(/^.$/,'0'+d[1])+'-'+d[2].replace(/^.$/,'0'+d[2]); 
30    var h = (''+e.href).match(/guid=([-a-fA-F0-9]*)/); 
31    if (! h) {continue}; o=o+h[1]+';'+d+'<br />'; 
32   }
33  } 
34  document.getElementById("geocaching").innerHTML=o;
36 // var s=document.createElement('SPAN'); 
38 // var d = window.open().document; 
39 // d.write(); 
40 /// d.close(); 
41 // /d.title='My Url Finds'; 
42 // d.body.innerHTML=o; 
44 //})();