// ==UserScript== // @name Invite // @namespace http://serprest.pt/flickr/#Invitet // @description Auto fill text to invite a photo to Groups // @description see how to install here http://www.flickr.com/groups/spectacular_animals/discuss/72157594221655752/ // @version 0.1.5.3 // @identifier http://serprest.pt/Greasemonkey/flickr/invite.user.js // @date 2006-08-02 // @creator Isidro Vila Verde (jvv@fe.up.pt) // @include http://*flickr.com/photos/*/* // ==/UserScript== // I got some ideas from a Dejan Katasic aka noviKorisnik (http://www.flickr.com/photos/noviKorisnik/) script (http://www.flickr.com/groups/NewUserExperience/) // Many Thanks to Tut99 (Roger): http://www.flickr.com/photos/tut99/ for fixing standard messages // and for maintenance of these new releases // -------------------------------------------------------------------- // Copyright (C) 2006 Isidro Vila Verde // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // The GNU General Public License is available by visiting // http://www.gnu.org/copyleft/gpl.html // or by writing to // Free Software Foundation, Inc. // 51 Franklin Street, Fifth Floor // Boston, MA 02110-1301 // USA var msgs = { 'Spectacular Animals' : "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + "\nI really like your animal photo!" + "\nYou are invited to post this photo to Spectacular Animals, invite only" + '\nhttp://www.flickr.com/groups/spectacular_animals/' + "\nPlease add the tag SpecAnimal to your photo" + "\nPlease include a link to the photo when applying for group membership." + "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" , 'Animal Kingdom': "\n****" + "\nThis image has been invited for submission at the Animal Kingdom group!" + "\nThe Animal Kingdom group allows for only the finest images of creatures to be submitted. By invite only; please read rules!" + '\nAnimal Kingdom' + "\n--\nPlease add this tag: AnimalKingdomElite\n****\n" , 'Spectacular Nature': "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nYou are invited to post this image to Spectacular Nature, invite only" + '\nhttp://www.flickr.com/groups/spectacular_nature/' + "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" , 'Spectacular Skyscapes': "-------------------------------------------" + '\nYou are invited to post this image to "Spectacular Skyscapes--by invitation only"' + '\nhttp://www.flickr.com/groups/spectacular_skyscapes/' + "\nPlease read the instructions on page one." + '\nPlease add the tag "SpecSky".' + "\n-------------------------------------------\n" , 'Spectacular Landscape': "------------------------------------------" + '\nYou are invited to post this image to "Spectacular Landscape, invitation only"' + '\nhttp://www.flickr.com/groups/spectacular_landscapes/' + "\nPlease read the instructions on page one." + '\nPlease add the tag "specland".' + "\n-------------------------------------------\n" , 'Bravo':"------------------------------------------\n" + "BRAVO" + '\nYou are invited to post this image to "The Best: BRAVO" group' + '\nhttp://www.flickr.com/groups/thebestbravo/' + "\n Please read the Rules before posting and don't forget to tag with BRAVO" + "\n-------------------------------------------\n" , 'Search the Best':'Please post this photo with Search the Best\n' , 'Quality':"I've"+' faved and tagged this one "QUALITY" and am hoping you will join and post it to:' + "\nwww.flickr.com/groups/quality_photography/" + "\n\nwhere photographic quality such as this gets the recognition it deserves and inspires others..." + "\n\nQUALITY!" + '\nPlease read (and heed) the comment entitled "YOUR Responsibility" on the'+"Group's opening page." , 'Exotic birds':'Please post this photo with Exotic birds group' , 'Birds on World Map':'Please post this photo with Birds on the World Map group' , 'My Winners':'' + 'WINNER' + "\nYou are MY WINNER!" + "\nPlease add this photo to" + "\nwww.flickr.com/groups/mywinners/" , 'My Winners (2nd time)' : '' + 'WINNER' + "\nYou are my winner as well!" + "\nThanks for posting at www.flickr.com/groups/mywinners" , 'A Big Fave':'' + 'A Big Fave' + "A Big Fave\nPlease add this to www.flickr.com/groups/bigfave" , 'Flickr GOLD medal': ' (gallery & instructions)' , 'Flickr SILVER medal': '\n (gallery & instructions)\n' , 'Flickr BRONZE medal': ' (gallery & instructions)' , 'Trophy': '' + 'This gets a trophy!' , 'Outstanding Shots': 'Outstanding Shots' + 'Outstanding Shot! Please add this to our pool!' + '\n(Join ' + "Outstanding Shot group and give awards!)" , 'Bonza Gallery': '' + 'Bonza Gallery' + "Please post this in the Bonza Gallery" , 'Beauty is in the *Eye* of the Beholder!': 'Please add your Beautiful photo to-- ' + '\n' + 'Beauty is in the *EYE* of the Beholder ' + "\nBeauty is in the *Eye* of the Beholder! " , 'XploreMyPix!': 'Please add your picture to: ' + '\n' + '' , 'Old but Gold.....Pix': 'Please add your picture to: ' + '\n' + '\nPlease click the logo to get in there and read rules.' , 'Art Libre - Free Art - Arte Libre': 'This Masterpiece would deserve to appear in :' + '\n" Art Libre - Free Art - Arte Libre - Freie Kunst" (invite only) group .' + '\ntag with : "ArtLibre" and consider to join us :o)' + '\n"There is no must in art because art is free"' + '\n[Wassily Kandinsky] (??????? ??????????) Russian and French painter and art theorist' , 'Instant Faves': '~This photograph became an INSTANT FAVE! Please post to the INSTANT FAVES group!~' , 'Thumbs Up! from Flickr Smileys': ' Thumbs Up! from Flickr Smileys ' + "\n" + 'Thumbs Up' , 'GLOBAL VILLAGE' : 'GLOBAL VILLAGE(s)' + "\n" + 'GLOBAL VILLAGE' }; var node; Invite = { init: function () { this.textarea = document.getElementById ('DiscussPhoto').getElementsByTagName('TEXTAREA') [0]; var n = document.createElement ('SELECT'); n.addEventListener ('change', function (e) { Invite.insertInvite ();}, false); var aux = new Array(); for (var k in msgs){ aux.push(k); } aux.sort(); var s = ''; for (var i = 0; i < aux.length; i++){ s += ''; } //n.setAttribute('size',1+aux.length); Uncomment this line if you want n.innerHTML = '' + s; this.textarea.parentNode.insertBefore (document.createTextNode ('Invite to '), this.textarea); this.textarea.parentNode.insertBefore (n, this.textarea); node = n; }, insertInvite: function () { this.textarea.value += "\n" + msgs[node.value]; this.textarea.value += '[?]' + "\n"; } } window.addEventListener ( 'load', function (e) { Invite.init (); }, false );