2 // @name Flickr More Group Links
3 // @namespace http://6v8.gamboni.org/
4 // @description Add more links to browse a group pool (random photos, leech, etc..)
6 // @identifier http://6v8.gamboni.org/IMG/js/flickrmoregrouplinks.user.user.js
8 // @creator Pierre Andrews (mortimer.pa@free.fr)
9 // @include http://*flickr.com/groups/*
10 // @exclude http://*flickr.com/groups/
11 // @exclude http://*flickr.com/groups
14 // --------------------------------------------------------------------
16 // This is a Greasemonkey user script.
18 // To install, you need Greasemonkey: http://greasemonkey.mozdev.org/
19 // Then restart Firefox and revisit this script.
20 // Under Tools, there will be a new menu item to "Install User Script".
21 // Accept the default configuration and install.
23 // --------------------------------------------------------------------
24 // Copyright (C) 2006 Pierre Andrews
26 // This program is free software; you can redistribute it and/or
27 // modify it under the terms of the GNU General Public License
28 // as published by the Free Software Foundation; either version 2
29 // of the License, or (at your option) any later version.
31 // This program is distributed in the hope that it will be useful,
32 // but WITHOUT ANY WARRANTY; without even the implied warranty of
33 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 // GNU General Public License for more details.
36 // The GNU General Public License is available by visiting
37 // http://www.gnu.org/copyleft/gpl.html
39 // Free Software Foundation, Inc.
40 // 51 Franklin Street, Fifth Floor
41 // Boston, MA 02110-1301
49 name: "Flickr More Group Links",
50 namespace: "http://6v8.gamboni.org/",
51 description: "Add more links to browse a group pool (random photos, leech, etc..)",
52 identifier: "http://6v8.gamboni.org/IMG/js/flickrmoregrouplinks.user.js",
53 version: "0.3", // version
54 date: (new Date("2006-08-25")) // update date
60 if(unsafeWindow.console)
61 unsafeWindow.console.log(arguments);
66 var flickrmoregrouplinks = function() {this.init();}
68 flickrmoregrouplinks.prototype = {
71 var links = document.evaluate(
72 "//td[@class='Section']/p[@class='Links']",
73 document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null
76 var a = links.getElementsByTagName('a');
79 for(var i=0;i<a.length;i++) {
80 if(a[i].href.indexOf('?id=') >= 0)
81 id = a[i].href.split('?id=')[1];
82 if(a[i].href.indexOf('/admin/') >=0)
86 links.innerHTML += '<img width="1" height="11" alt="" src="/images/subnavi_dots.gif"/>';
87 links.innerHTML += '<a href="http://www.krazydad.com/gustavog/FlickRandom.pl?group='+id+'">Random</a>';
88 links.innerHTML += '<img width="1" height="11" alt="" src="/images/subnavi_dots.gif"/>';
89 links.innerHTML += '<a href="http://www.flickrleech.net/group/'+id+'">Leech</a>';
90 links.innerHTML += '<img width="1" height="11" alt="" src="/images/subnavi_dots.gif"/>';
91 links.innerHTML += '<a href="http://www.flickr.com/groups/'+id+'/pool/'+unsafeWindow.global_nsid+'">Your Photos</a>';
93 links.innerHTML += '<img width="1" height="11" alt="" src="/images/subnavi_dots.gif"/>';
94 links.innerHTML += '<a href="http://flagrantdisregard.com/flickr/poolcleaner.php?group_id='+id+'">Pool Cleaner</a>';
99 //======================================================================
102 window.addEventListener("load", function () {
105 // update automatically (http://userscripts.org/scripts/show/2296)
106 win.UserScriptUpdates.requestAutomaticUpdates(SCRIPT);
109 var flickrgp = new flickrmoregrouplinks();