decembre

GM - Flickr PM TWEAKED - 2025

Jul 25th, 2016 (edited)
652
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Flickr PM TWEAKED - 2025.05 TEST NO SL (BibHug Explore - PHOT page - Archives - POOL Square)
  2.  
  3. /* ===================================================
  4.  
  5. Flickr PM TWEAKED by decembre - 2025.05 :
  6. Adds easily and accessible icon next user names in differents places on Flickr.
  7.  
  8. Hover it to expend it and show its items to click on.
  9.  
  10. Clicking on these items reuse the ID /user name of this particular user to open differents pages (like "Users favorits by interrestings" by example)
  11.  
  12. Since a long time it's broken and not updated by its author Steeeve.
  13. Read "Flickr PM TWEAKED - 2025.05 (WORK on Photo Page) In PasteBin":
  14. https://www.flickr.com/groups/flickrhacks/discuss/38788/page2/#comment72157682366051413"></a>
  15.  
  16. I tweaked it to make it working again:
  17. I put an ✅ in its code to signal the most usefull pages
  18.  
  19. Feel free to customize it to your own needs.
  20. ;-)
  21.  
  22. =================================================== */
  23.  
  24. // (c) 2005-2013 Stephen Fernandez - Excellatronic Communications
  25.  
  26. // Disclaimer
  27. // ==========
  28. // Please note that this software comes with no warranty whatsoever, any usage of this script is at your own risk,
  29. // i cannot be held responsible for anything bad that happens regarding usage of this script.
  30.  
  31. // Description
  32. // ===========
  33. // This is a Greasemonkey (see http://www.greasespot.net for more info) user script. The script adds a icons for mail, profile, favourites, archive, flickr scout, flickr DNA and the
  34. // list of the users photos ordered by "interestingness" next to next to usernames in flickr forums,photo pages +
  35. // recent_activity and photo_comments pages. It also adds a flickr mail popup function, which lets you send a flickrmail
  36. // directly from the page where you click the mail link.
  37.  
  38. // Installation
  39. // ============
  40. //
  41. // To install, you need FireFox http://www.mozilla.org/firefox
  42. // and the firefox extension called Greasemonkey: http://www.greasespot.net/
  43. // Install the Greasemonkey extension then restart Firefox and revisit this script.
  44. // Under Tools, there will be a new menu item to "Install User Script".
  45. // Accept the default configuration and install.
  46. //
  47. // To uninstall, go to Tools/Manage User Scripts,
  48. // select "flickrPM", and click Uninstall.
  49.  
  50. // DONATE
  51. // ======
  52. // If you wish to thank me for all the hard work i have put into writing/testing/supporting this script,
  53. // and would like to support further updates and bug fixes, you can send me a few pounds/dollars etc
  54. // via PayPal, my paypal donation link can be found here http://steeev.freehostia.com/donate/
  55.  
  56. // Whats New
  57. // =========
  58. // v4.1.1 30/07/13 fixed fpm links on group discussion pages
  59. // v4.1.0 24/07/13 fixed fpm links on main photostream and profile pages, fixed flickr mail popup (for firefox)
  60. // v4.0.2 24/03/11 fixed for Firefox 4
  61. // v4.0.1 03/02/11 fixed cramping of fpm info bar on photo pages
  62. // v4.0.0 05/08/10 fixed for photos with multi page comments
  63. // v3.9f 05/08/10 fixed mail sending function (thanks Laramie Coyote!)
  64. // v3.9e 04/08/10 preliminary fix for new photo page, needs a bit more tweaking (doesnt work on multi page photo comments), but basics are working
  65. // v3.9d 18/06/10 fixed script for Opera
  66. //                fixed links on people search page
  67. // v3.9c 12/02/10 fixed script for GC4
  68. // v3.9b 24/01/10 fixed userlinks for curated image owners on gallery pages
  69. // v3.9a 17/12/09 fixed mail popup
  70. // v3.9  16/10/09 added "RE" relationship link, that lets you change your relationship with that user, i.e become a contact/friend etc
  71. //                renamed links to 2 letters each for consistency
  72. // v3.83 15/09/09 added fpm functionality to gallery pages
  73. // v3.82 13/05/09 added error check for a user sending mail too fast
  74. // v3.81 07/04/09 added flickrpm to "people who favourited this photo page"
  75. // v3.8  01/04/09 added joined date and number of items to mail popup, also added staff note for flickr staff
  76. // v3.73 30/03/09 replaced flickrriver.com link with link to darckr.com. added flickrpm links to admin pool pending page
  77. // v3.72 06/03/09 added pm icons/links to contacts list page and also group admin (members/moderators) pages
  78. // v3.71 21/02/09 script fixed to work on individual flickr mail pages
  79. // v3.7  19/02/09 updated script to work with new site changes (contacts page, photo page, activity page) also replaced flickr leech link with flickr river link
  80. // v3.63 15/11/08 updated INT link to point to new service provided by http://flickr.com/drayde
  81. // v3.62 08/07/08 flickrpm mail popup no longer reports an error when sending mail if you are on international version of the site
  82. // v3.61 06/06/08 flickrpm now works on forum search page, no longer display fpm links for deleted users,
  83. //                flickrmail popup now also displays users real name and location if they have them listed in their account
  84. // v3.55 02/6/08 flickrpm now works on search pages again, and now also on the allsizes page
  85. // v3.54 28/5/08 fixed userid getting code, for cases where user doesnt have a buddyicon
  86. // v3.53 24/4/08 popup window doesnt scroll to top of page anymore, fixed mail popup, not displaying correctly over videos on photostream page
  87. // v3.52 21/5/08 added link to flickr leech, fixed browser resizing issue, fixed popup window links styles, added donation link
  88. // v3.5  14/3/08 fixed mail sending part of the code, which was broken due to GM 0.7 security update
  89. // v3.41 20/6/07 switched flickr inspector link with a link to the new flickr dna service
  90. // v3.4  08/6/07 optimised some of the code (using regex instead of multiple split functions)
  91. // v3.33 02/5/07 fixed mail popup bug - clicking mail link on first poster to a thread, popped up wrong fmail address
  92. // v3.32 21/4/07 fixed fpm to work on the new help forum, also added some excludes to stop script running on pages it doesnt need to
  93. // v3.31 27/3/07 fixed a bug in the mail sending code, it would cut the message short if it had an ampersand in it
  94. // v3.3 21/12/06 added fpm functionality to sent+received flickrmail messages + also to the profile page
  95. // v3.22  8/8/06 added preview function in the mail popup
  96. // v3.21 31/7/06 fixed textarea width for flickrmail popup + added FPM to /contacts/ pages + /search/ pages
  97. // v3.2  25/7/06 added FPM links to header of photostream pages
  98. // v3.1  24/7/06 fixed minor bug, the pm toolbar is no longer displayed in recent_activity or photo_comments pages nexty to your own comments
  99. // v3.0  21/7/06 I added FPM to recent_activity+photo_comments pages also added Flickr Mail Popup function to let you Flickr Mail users directly from the same page.
  100. // v2.6  14/7/06 I added a link to Flickr Inspector
  101. // v2.5  14/7/06 I added a link to Scout
  102. // v2.41 17/5/06 I fixed bug where first post in forum didnt get the links
  103. // v2.4  17/5/06 I fixed it for Flickr Gamma, cheers Scragz for the style tip btw!
  104. // v2.3  16/4/06 I added a link to go to the list of the users photos ordered by Interestingness
  105. // v2.2  17/8/05 I changed the included URLs so the script would work with the new Group URLs format
  106. // v2.1  27/7/05 I added a new icon for users photo archive by date taken
  107. // v2.0  09/6/05 Pedro fixed a bug and added some extra functionality (extra icons, usernames now link to photos again, removed pink popup)
  108. // v1.4  31/5/05 I got rid of question mark link for profile, instead changed username link to goto profile.
  109. // v1.3  29/5/05 I added a profile link
  110. // v1.2  28/5/05 initial public release
  111.  
  112. // Credits
  113. // =======
  114. // Bug fix plus a little extra functionality supplied by Pedro: http://flickr.com/photos/ppPedro
  115. // Some of the Icons were encoded by jrhyley: http://flickr.com/photos/jrhyley
  116. // Thanks Guys! :D
  117.  
  118.  
  119. // ==UserScript==
  120. // @name          flickrPM (TWEAK 2024)  - 2021.02 PB POHOT page
  121. // @description    fav Justified - fLUIDr / HIVE PB - Tweak ICON Base64 - verify BROKEN 2017 (new Archives) - Adds icons for mail, profile, favourites, Scout, Interestingness, photo archive and "change relationship" next to usernames in forums and on individual photo pages.
  122.  
  123. // @icon         https://external-content.duckduckgo.com/ip3/blog.flickr.net.ico
  124. // @version       4.1.1 - 30th July 2013
  125. // @namespace     http://steeev.f2o.org/flickr/
  126. // @author        Stephen Fernandez aka Steeev http://steeev.freehostia.com http://flickr.com/steeev with some additional code from Pedro Vieira http://flickr.com/photos/ppPedro
  127.  
  128. // @include       http*://*flickr.com/*
  129.  
  130. // @exclude       http*://www.flickr.com/photos/organize*
  131. // @exclude       http://flickr.com/photos/organize*
  132.  
  133. // @grant         none
  134.  
  135. // ==/UserScript==
  136.  
  137. /*
  138. // VOIR EXLUDE
  139.        http*://www.flickr.com/groups?*
  140.        http*://www.flickr.com/groups/*
  141. */
  142.  
  143. (function() {
  144.  
  145. var fpmVersion="4.1.1";
  146. //var FPMStartTime=new Date();
  147.  
  148. if (typeof unsafeWindow != 'undefined')
  149.   win=unsafeWindow;
  150. else if (typeof contentWindow !='undefined')
  151.   win=contentWindow;
  152. else
  153.   win=window;
  154.  
  155. var aaa=document.getElementsByTagName('a');
  156.  for (i=0;i<aaa.length;i++)
  157.    if(aaa[i].href.match(/logout\.gne/)) {
  158.      var magic_auth_hash_cookie=aaa[i].href.match(/logout\.gne\?magic_cookie=(.+)/)[1];
  159.      break;
  160.    }
  161. aaa=null;
  162.  
  163. // setup a listener for multi page comments
  164. function fpmInsertedNodeDomHandler(event) {
  165.   if(event.target.nodeName=='OL')
  166.     fpmlinks_newphotopage();
  167. }
  168.  
  169. // if we are on the new photopage, start listening
  170. if (document.getElementById('button-bar')) {
  171.   document.addEventListener("DOMNodeInserted", fpmInsertedNodeDomHandler, false);
  172. }
  173. // END listener code
  174.  
  175.  
  176. if (typeof(GM_addStyle)=='undefined')
  177.   function GM_addStyle(css) {
  178.     var head, style;
  179.     head = document.getElementsByTagName('head')[0];
  180.     if (!head) { return; }
  181.     style = document.createElement('style');
  182.     style.type = 'text/css';
  183.     style.textContent = css;
  184.     head.appendChild(style);
  185.   }
  186.  
  187. GM_addStyle("a.fpmLink {text-decoration:none; vertical-align:middle } a.fpmLink:hover {color: #FFA6FE}");
  188.  
  189. if (!document.getElementsByClassName) {
  190.   var getElementsByClassName = function (classname,tagname) {
  191.     if(win.Y.U.Dom.getElementsByClassName)
  192.       return win.Y.U.Dom.getElementsByClassName(classname,tagname);
  193.     else
  194.       return false;
  195.   }
  196. }
  197. else {
  198.   var getElementsByClassName = function (classname,tagname) {
  199.     return document.getElementsByClassName(classname,tagname); //firefox 3 has this function built in
  200.   }
  201.  
  202. }
  203.  
  204. //alert('do we get here');
  205.  
  206. // BEGIN Flickr Mail Popup code
  207.  
  208. win.FMPgrabusername = function(userid) {
  209.  
  210.   hostname=location.href.split('/')[2];
  211.   apiurl="http://" + hostname + "/services/rest/?method=flickr.people.getInfo&api_key=9d179414c5491bb965d03dab476a0ef8&user_id="+userid;
  212.   p = new XMLHttpRequest();
  213.   p.open("GET", apiurl, false);
  214.   p.send(null);
  215.   if (p.responseXML) {
  216.     //alert(p.responseText)
  217.     username=p.responseText.split("\<username\>")[1].split("\<\/")[0];
  218.     if(p.responseText.match('<realname>'))
  219.       realname=p.responseText.split("\<realname\>")[1].split("\<\/")[0];
  220.     else
  221.       realname='';
  222.     if(p.responseText.match('\<location\>'))
  223.       ulocation=p.responseText.split("\<location\>")[1].split("\<\/")[0];
  224.     else
  225.       ulocation='';
  226.  
  227.     try { // in case they dont have a first upload date publically available
  228.       var firstdate=p.responseText.split("\<firstdate\>")[1].split("\<\/")[0];
  229.     }
  230.     catch(e) {
  231.       var firstdate = "n/a";
  232.     }
  233.  
  234.     var itemcount=p.responseText.split("\<count\>")[1].split("\<\/")[0];
  235.     var flickrstaff= 0; //p.responseText.split("isadmin=\"")[1].split("\"")[0];
  236.   }
  237.   else
  238.     alert('Error retrieving users name');
  239.   return username + ':~:' + realname + ':~:' + ulocation + ':~:' + firstdate + ':~:' + itemcount + ':~:' + flickrstaff;
  240.  
  241. }
  242.  
  243. win.flickrmailpopup=function (e) {
  244.   //alert (userid);
  245.   e.preventDefault();
  246.   e.stopPropagation();
  247.   //console.log(e.target.parentNode.getAttribute('data-userid'));
  248.   userid=e.target.parentNode.getAttribute('data-userid');
  249.   username=win.FMPgrabusername(userid);
  250.   win.dspFMPEmailForm (userid,username);
  251.   //win.FMPscrolltop=win.pageYOffset; //document.body.scrollTop;
  252.   win.FMPscrolltop=win.getScrollTop();
  253.  
  254.   //scroll(0,0);
  255.   return false; // not really needed but oh well
  256. }
  257.  
  258.   /* this was for adding the popup function to the mail menu item in the buddy icon menu, but it doesnt work anymore so comenting out
  259.   pmmlink=document.getElementById('personmenu_mail_link');
  260.   if(pmmlink)
  261.     pmmlink.setAttribute('onclick',"return flickrmailpopup(this.getAttribute('href').split('=')[1]);");
  262.   */
  263. if (!document.getElementById('emaildiv')) {
  264.   emailDiv = document.createElement('div');
  265.   emailDiv.setAttribute('id','emaildiv');
  266.   emailDiv.style.position = 'absolute';
  267.   emailDiv.style.overflow = 'visible';
  268.   emailDiv.style.width = '450px';
  269.   emailDiv.style.padding = '10px';
  270.   emailDiv.style.margin = '4px';
  271.   emailDiv.style.left = (1*document.body.clientWidth-450)/2 + 'px';
  272.   emailDiv.style.display = 'none';
  273.   emailDiv.style.border = '2px solid #000';
  274.   emailDiv.style.background = '#ffffff';
  275.   //emailDiv.style.zIndex = 1000;
  276.   GM_addStyle("#emaildiv { z-index:99999999; }");
  277. }
  278.  
  279. win.FMPprocessform = function(dform,preview) {
  280.  
  281.   win.FMPsendmail(document.getElementById('dauserid').value, document.getElementById('dausername').value, magic_auth_hash_cookie, document.getElementById('dasubjectPMid').value, document.getElementById('damessagePMid').value, preview);
  282.  
  283. }
  284.  
  285. // new function because old code to get scrolltop didnt work any more for some reason
  286. win.getScrollTop = function() {
  287.     if(typeof pageYOffset!= 'undefined'){
  288.         return pageYOffset;
  289.     }
  290.     else{
  291.         var B= document.body;
  292.         var D= document.documentElement;
  293.         D= (D.clientHeight)? D: B;
  294.         return D.scrollTop;
  295.     }
  296. }
  297.  
  298. win.dspFMPEmailForm = function (userid,username) {
  299.   var dausername = username.split(':~:')[0];
  300.   if (username.split(':~:')[1])
  301.     realname="&nbsp;&nbsp; Real Name: <b>" + username.split(':~:')[1] + '</b> ';
  302.   else
  303.     realname='';
  304.  
  305.   if (username.split(':~:')[2]) {
  306.     var theloc= username.split(':~:')[2];
  307.     var locmap='<font size="-2">( <a class="poplnk" title="See this location in Google Maps" target="_blank" href="http://maps.google.com/maps?f=q&hl=en&q=' + (encodeURIComponent(theloc+ ' (' + dausername + '\'s Home Town)')) +'">GM</a> / <a class="poplnk" title="See this location in Google Earth" target="_blank" href="http://steeev.freehostia.com/flickr/go2ge2.php?address=' + encodeURIComponent(theloc) + '&details=' + encodeURIComponent(dausername + "s Home Town") + '">GE</a> )</font>';
  308.     var ulocation="&nbsp;&nbsp; Location: <b>" + theloc + '</b>&nbsp;&nbsp;'  +  locmap;
  309.     // locmap='<font size="-2"><a title="See this location in Google Maps" target="_blank" href="http://maps.google.com/maps?f=q&hl=en&q=' + (encodeURIComponent(hometownstripped+ ' (' + username + '\'s Home Town)')) +'">GM</a> / <a title="See this location in Google Earth" target="_blank" href="http://steeev.freehostia.com/flickr/go2ge2.php?address=' + encodeURIComponent(hometownstripped) + '&details=' + encodeURIComponent(username + "s Home Town") + '">GE</a></font>'
  310.   }
  311.   else
  312.     ulocation='';
  313.  
  314.   if(username.split(':~:')[3]!='n/a') {
  315.     var joindate = new Date(username.split(':~:')[3]*1000) + '';
  316.     var joindatehuman=joindate.split(' ')[2] + ' ' +  joindate.split(' ')[1] + ' ' + joindate.split(' ')[3];
  317.   }
  318.   else
  319.     joindatehuman='n/a';
  320.  
  321.   var itemcount = username.split(':~:')[4];
  322.   var flickrstaff =  username.split(':~:')[5];
  323.  
  324.   if (flickrstaff=='1') {
  325.     var usermessage='<b>A note from '+ dausername + ':</b><br/>Hi. I work here. Staff get a ton of FlickrMail, and it&apos;s not that we don&apos;t care, only that your message might be overlooked (by that I mean <i>not read</i>).<br/><br/>If you need help with something, the best thing to do is send an email directly to our trained support staff through <a class="poplnk" href="/help/website/#7"><b>Help by Email</b></a>. You might also like to have a look in our <a class="poplnk" href="/help/forum/">Help Forum</a> for your answer. Thanks.';
  326.     var previewclass='Preview';
  327.   }
  328.   else if (userid=='36521957871@N01') {
  329.     var usermessage='<b>A note from Steeev:</b><br/>Hi, I wrote this script, along with many other useful Flickr Greasemonkey scripts, available at <a class="poplnk" href="http://steeev.freehostia.com/flickr/"><b>http://steeev.freehostia.com/flickr</b></a>. I hope you like them, and if you do like them, please make a <a class="poplnk" href="http://steeev.freehostia.com/donate/"><b>donation</b></a> to show your appreciation. The more donations I get the more likely I am to further develop and support my scripts.<br/><br/>If you are having problems with this script or any of my other scripts, please search the <a class="poplnk" href="/groups/flickrhacks/"><b>Flickr Hacks group</b></a> first, before contacting me, as its quite possible your problem has come up and been answered before.<br><br>If you have found a bug in one of my scripts, then let me know, and please give as much details as possible, such as browser version, gm version, script version etc';
  330.     var previewclass='Preview';
  331.   }
  332.   else {
  333.     var usermessage='';
  334.     var previewclass='';
  335.   }
  336.  
  337.   emailDiv.innerHTML = "<style>span.sfhead { font-weight:bold; font-size: x-large } span.sfhead2 {font-weight:bold; font-size: large; color:#F52887}  a.poplnk {text-decoration:none} a.poplnk:hover {color: red !important} </style><a title='Close Window' onclick='this.parentNode.style.display=\"none\";document.body.scrollTop=FMPscrolltop;return false;' href='javascript:;'><img style='float: right; position: relative; margin: 0; padding: 0; border:0px !important; vertical-align: top;' src='http://flickr.com/images/window_close_grey.gif'/></a>" +
  338.                    "<span class='sfhead'><b>FlickrPM Mail</b></span>" + " <a class='poplnk' title='Check for updates' href='http://steeev.site50.net/flickr/flickr.pm.htm'>v" + fpmVersion + "</a> by <b><a title='View steeevs photostream' class='poplnk' target=_new href='http://flickr.com/photos/steeev'>Steeev</a></b> " + makeLinks('36521957871@N01') + "<p>" +
  339.                    "<span class='sfhead2'>Send a Flickr Mail to this User</span><p>" +
  340.                    "<form name=frmsendmess id=pmsendmessid>To: <span id='pmusernamediv'><b>" + dausername + '</b>' + realname + ulocation + "</span><br>" +
  341.                    "<span id='usertrivia'><br>First upload: <b>" + joindatehuman + "</b>&nbsp;&nbsp;Uploaded: <b>" + itemcount + "</b> items<br></span>"+
  342.                    "<div id='prvwspan' class='" + previewclass + "'>" + usermessage + "</div>" +
  343.                    //"<span id='sgspanid'></span>" +
  344.                    "<input type='hidden' id='dauserid' name='dauserid' value=" + userid + ">" +
  345.                    "<input type='hidden' id='dausername' name='dausername' value=" + encodeURIComponent(dausername) + ">" +
  346.                    "<br>Subject<br><input name='dasubject' id='dasubjectPMid' style='width:440px' tabindex='100'>" +
  347.                    "<br>Message<br><textarea name='damessage' id='damessagePMid' style='width:440px' rows='8' tabindex='102'></textarea><br>" +
  348.  
  349.                    //"<input title='Saving the message will let you reuse it as a message template next time.' name=chksavemess type=checkbox value='true' id=chksavemessid>Save Message " +
  350.                    "<br><p style='text-align:center;'><input onclick='FMPprocessform(this.parentNode.parentNode,\"PREVIEW\");return false;' name='btnpreviewmess' class='Butt' type='button' value='PREVIEW'> or <input onclick='FMPprocessform(this.parentNode.parentNode,\"NOPREVIEW\");return false;' name='btnsendmess' class='Butt' type='button' value='SEND' tabindex='103'></p> </form><p/>" +
  351.                    "<span id='mailstatusPM'></span>" +
  352.                    "<p align='center'>If you appreciate Steeev's <a class='poplnk' href='http://steeev.freehostia.com/flickr/'>Flickr GM Scripts</a>. Please make a <a class='poplnk' href='http://steeev.freehostia.com/donate'>donation</a> :)</p>" +
  353.                    "<span><span style='float:left'><a class='poplnk' target=_new href='http://steeev.site50.net/flickr/flickr.pm.htm'>Help? / Discuss</a></span><span  style='float:right'><a class='poplnk' href='javascript:;' onclick='document.getElementById(\"emaildiv\").style.display=\"none\";document.body.scrollTop=FMPscrolltop;return false;'>Close</a></span></span>";
  354.   emailDiv.style.display='block';
  355.   emailDiv.style.top=win.getScrollTop() + 'px'; // pageYOffset; //document.body.scrollTop; // scrolltop doesnt seem to work with the new photo page layout
  356.  
  357.   GM_addStyle(".Preview {border: 1px solid #ddd; background-color: #f5f5f5; padding: 10px; font-size: 12px;}");
  358.  
  359. }
  360.  
  361. if (document.getElementById('candy_nav_button_bar'))
  362.   document.getElementById('candy_nav_button_bar').appendChild(emailDiv);
  363. else
  364.   document.body.appendChild(emailDiv);
  365.  
  366.  
  367. win.FMPsendmail=function(userid, username, mcookie, subject, message, preview) {
  368.    if(!subject || !message) {
  369.      alert('Please enter a Subject and a Message before clicking Send');
  370.      return false;
  371.    }
  372.    if (preview=='PREVIEW') {
  373.      win.previewcode='&preview=PREVIEW';
  374.    }
  375.    else
  376.      {
  377.      //scroll(0,0);
  378.      // commenting the next line out is useful for debugging flickr mail manager :)
  379.      document.getElementById('pmsendmessid').style.display='none';
  380.      document.getElementById('mailstatusPM').innerHTML="<b>Mail Status:</b> Sending Mail... <img src='http://flickr.com/images/pulser2.gif'/><p/>"; //"<div id='" + userid + "'><font color=blue>" + username + "</font> :</div>";
  381.      win.previewcode='';
  382.      }
  383.  
  384.  
  385. ///////// UPDATED: 14-3-2008 //////////////
  386. //BEGIN post using plain old xmlhttprequest
  387. ///////////////////////////////////////////
  388.      /*
  389.      checkresponse = function(evt) {
  390.        if (!win.previewcode) {
  391.          if (evt.target.responseText.match('<p class="Confirm">')) //('Your message has been sent.'))
  392.            document.getElementById('mailstatusPM').innerHTML="<b>Mail Status:</b> Mail has been sent to <b>" + decodeURIComponent(username).split("\:\~\:")[0] +'</b><p/>';
  393.          else {
  394.            document.getElementById('mailstatusPM').innerHTML="<b>Mail Status:</b> Mail send has failed<p/>";
  395.            if(evt.target.responseText.match('<p class="Problem">'))
  396.              document.getElementById('mailstatusPM').innerHTML+=("<p class='Problem'>" + evt.target.responseText.split('<p class="Problem">')[1].split('</div>')[0]);
  397.            //if(evt.target.responseText.match('Slow down, partner'))
  398.            //  document.getElementById('mailstatusPM').innerHTML+="You have been blocked by this user";
  399.          }
  400.        }
  401.        else {
  402.          if (evt.target.responseText.match('<div class="Preview">')) //('<h3>Preview your message</h3>'))
  403.            document.getElementById('prvwspan').innerHTML=evt.target.responseText.split('<div class="Preview">')[1].split('</div>')[0];
  404.          else
  405.            document.getElementById('prvwspan').innerHTML="<b>Preview:</b> Sorry theres been an error displaying the preview.<p/>";
  406.        }
  407.      } // end function checkresponse
  408.      */
  409.   pdata='magic_cookie=' + mcookie + '&reply=&done=1&to_nsid=' + userid + '&subject=' + encodeURIComponent(subject) + '&message=' + encodeURIComponent(message) + win.previewcode;
  410.   hostname=location.href.split('/')[2];
  411.   req = false;
  412.   try {
  413.     req = new XMLHttpRequest();
  414.   }
  415.   catch(e) {
  416.     req = false;
  417.   }
  418.  
  419.   req.onreadystatechange = function () {
  420.     if( req.readyState != 4 ) { return; }
  421.     if (!win.previewcode) {
  422.          if (req.responseText.match('<p class="Confirm">')) //('Your message has been sent.'))
  423.            document.getElementById('mailstatusPM').innerHTML="<b>Mail Status:</b> Mail has been sent to <b>" + decodeURIComponent(username).split("\:\~\:")[0] +'</b><p/>';
  424.          else {
  425.            document.getElementById('mailstatusPM').innerHTML="<b>Mail Status:</b> Mail send has failed<p/>";
  426.            if(req.responseText.match('<p class="Problem">'))
  427.              document.getElementById('mailstatusPM').innerHTML+=("<p class='Problem'>" + req.responseText.split('<p class="Problem">')[1].split('</div>')[0]);
  428.            //if(evt.target.responseText.match('Slow down, partner'))
  429.            //  document.getElementById('mailstatusPM').innerHTML+="You have been blocked by this user";
  430.          }
  431.        }
  432.        else {
  433.          if (req.responseText.match('<div class="Preview">')) //('<h3>Preview your message</h3>'))
  434.            document.getElementById('prvwspan').innerHTML=req.responseText.split('<div class="Preview">')[1].split('</div>')[0];
  435.          else
  436.            document.getElementById('prvwspan').innerHTML="<b>Preview:</b> Sorry theres been an error displaying the preview.<p/>";
  437.        }
  438.  
  439.     req.onreadystatechange = null;
  440.     req = null;
  441.   };
  442.  
  443.   //req.onload=checkresponse; // response handler function (defined above)
  444.   if(req) {
  445.     req.open("POST",  'http://' + hostname + '/messages_write.gne', true);
  446.     req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
  447.  
  448.     req.send(pdata);
  449.   }
  450. /////////////////////////////////////////
  451. //END post using plain old xmlhttprequest
  452. /////////////////////////////////////////
  453.  
  454. return false;
  455. }
  456.  
  457. // END Flickr Mail Popup code
  458.  
  459.  
  460. // BEGIN Flickr PM Code
  461.  
  462.  
  463. /* icons copied from jrhyleys (http://www.rhyley.org/gm/FlickrMail.user.js) */
  464. // ICOM PRof - PB 2021.02
  465. /*
  466. iconmail = '<img src="data:image/gif;base64,R0lGODlhDQAKAMQAAAAAAP////j4+O3t7ebm5uHh4czMzKqqqqOjo5ycnJOTk4qKioSEhHp6empqamJiYllZWf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABEALAAAAAANAAoAQAVIYOQ4UFk6TcNEj2K8MMw8kDAMiU0oQ2GUgtzApnMBB4ebgkBIvGgIgXQ6ndVwxMGO8LsSDgqBAkHwAZMFZtmwMDxYqbh8EQkBADs=" style="float: none; margin: 0; padding: 0; border:0px !important; vertical-align: middle;" width="13" height="10">';
  467. iconprof = '<img src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACD0lEQVQ4jU2TP48URxTEf/WmZ/eOO+2BfEiAkJwhIUfoQCIgcebv6S9i2alTB06QCACd0Mlr4budnZl+RdCNobN+/afqVdXT1dULw4AxIgEBYAtkAOQAJW0XiAoMiEqxWwkCMEgIoaFQLTJGFGKsB7KuWAYPoAUzUKQgXRvy18PxjNuTJ9zsXjGd/sj53Vsu//mDzeE9kFhGjCRJ4RtpjAAzl3NuHvzM/uIlGRumk6dUBU8//NpbEqnsLdApK3sL5jA+5Hj6mLPzHZsBjnNB/91HHjDtXpMnKFCBIC0ESGJcPzPk1LhZ2Ct4wkrUa500EZ12Qw+M2czXPLj5HfZ/83lOyu07dv/+yfdLBNJAmOgCtuIynHPcPsLAuhwwMEbguMe8echS7mNMKjGmNOka+qIz9j+84bh7xhQXTONjlDBtn8CjX2D5CU97Tq9/Y1w+QXOhfSGbdTzj7vI16+4Z0wLLKqgmh3vExXPmzXN095F5/xfb+VOPlQck/R+iIYJw9GA1pdIwrea4mjEEboEyJgIDSWoghy0lCmtCzVYHkwnHFW4XWBLsQG6gYYwNYVBdOS3CMquT7itI2JAJiZFOuvBBQeqmgKgc1sqsNkBusevxbfOyHUZqGbv1tQVJnWy4clkOHDiwZkVWn8QVk5QImPdsj9edfkFXV6/cnhegokxQITEowW1CUGADJAr1toMv3Z0W62ZdZV4AAAAASUVORK5CYII=" width="18" style="float: none; margin: 0; padding: 0; border:0px !important; vertical-align: top;" height="19">';
  468. */
  469. iconfave = '<img src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACX0lEQVQ4jUWTS3KbVRCFv+57ZUnW27FwgCIkBCigQjHxFgjFgFWwJMZsgBEzCMUgA4oN8Bq5KjEhgRgHRwqS/sftw+AXMOnqMzjdXd1f2+npqYKCC0TGzJAKbmKkATJ4oQoAGQCYutzDcalTIQEiogWEwvlofZOPV7cAdc4ooNjLIKwli66skUEtttcvMeL9zZxwcTwe84f9jZuD9sUEpoSD9iMVZI6RkJwPVzd4u57wznbG3fWrZIHJwR1s30aBo4IZdEFgwRtlwe3djEH0GeqAN7dH3CxzzAJCCAGBzMljG7LUiGtV5kY1Y1Qy7zbHvF6NAEfAW9WMT/96j5/yJS9y4fHBcy56W/70htyjx92r17hVjTluRyQF8xhiMswCGUyUuLO5xvU0oDg88x1n/TVfLM7wDTXnvRXLZsSy9FmUA0yBmRC2X5ZhAUfRZ9kMOamn/JZX7Kjwiob7k0fcm51zlbY4ifTfLbr7YAkQrsSV19ybnXN/8iu1WtxkbNXy1fQh301+J6yzBgYmgiBM4AXkfD95wtfTM7a0gONYYARrVXw7fdz19EKHpmMCI3AMLPhm/og1FciRqeMA63CqrdpT6QROCtENnwhlhNPQ8C98gXBwUAacRRniiKLEzhvWqWaVa7beEBIpxCIGBEIOKSCDkAyzwklzyMZbXMYP/adc5h1gHJU+H2hJkvNyfcjP/cuOaDOy/f8qzGPML4OnXPQqvpw/4ImtkIwTpnzS2/JKdchRO0b9BCqAyAXIBkWF52nNZ9cf8KxscBKQMYMLrfl8+iNLP+TO7hijhuTQwj91xTNdE1A61AAAAABJRU5ErkJggg==" style="float: none; margin: 0; padding: 0; border:0px !important; vertical-align: top;" width="18" height="18">';
  470.  
  471. // TWEAK ICON : ARCHIVES - BASE 64
  472. iconarch = '<img src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAC7UlEQVQ4jS2TXWibdRTGf+f/5k3eNEnzsbR2CbardCb9cGNDJyudHwzBgjAvxDsvxJuC3ujNLhRBFMGr6XBSEJl33nghQ/FitgU7cRBLja02FnVdbcJSaz8TsyV9/8eLd1fnwHkezgMPP1kszanhEAVUQDBgfQSDiKDBBTCIDTQqiqIYK4SENqiDIIGOwAyKWgUAEwwrPuAQvFHEQEhweOvtEVZW4zz62A5vTFWYf2UBgJGpQYpU6J3+DAPc+vQy70yforSQZriwz3vvLhMCZXPLY6PaxbHBJmqVVq2Fr8rhfx0cmkRqdwDw1bK941KteWQzbYx1kMXSdf29kqLRcEgl7/HQYIOtn/cwQGIgTpwDImtrCELz1Cirf6XZ3nOJJzqMFg4IGeDJH64Qub1BqzjEev5FPrw2DggvPF+FgWW+DH0LCG8yxNmfruJV/uBef57NwksYsUJsoUz33DxdSyu02w6zsz3MzB2heidCtVVnpn6DmfoNOtYn+ssKqdl5EgtlECFkxbBzYZKD8TO0H8wT9XxenfoTBIYLTUgWee3hlwGIOh67z56nNTbMYc8RAEIqsMwYd2kTI0rGbaHjlxBAes7A5ijcnAAE8htcK8J6P/R6wiQQMljWvqqzvbRP37kM0bMuV1Y/B5RUOAmVx/l4ehBwuPBcjW9qM3xfv8mJ9AiTuaeCGrOnu/GyLqlinLAJ8UzfBBYl5z0AfXc5//Q/CBB2fU6mRnHFZSCWBwQpl77T3yoJDhou6WSH48f22SrvogLd/TES2iByex3E0jx5gt1bHdp7HdyEIVWIBwkuXR6ivJTkiYl/ef/iIj++voJiOX3xOEcpk/vgIwTDr19/QeXq39Tnt8k80s25T8YICdCTbZHPhcmkO6gxdB31UHycmMEnSjvXC4CIJZJ26cp5eNkIioOUS9dVVRBRRBSsoCIISsCSICJYDhEVBEBNgKVDkEDVYLEE3YG5vxgRFAtqcQiD+PgScH8fUP4Hoqkgf3Xl8AoAAAAASUVORK5CYII=" style="float: none; margin: 0; padding: 0; border:0px !important; vertical-align: top;" width="18" height="18">';
  473. iconcont = '<b>?</b>'
  474. // TWEAK ICON : darckr - BASE 64
  475. icondarckr = '<img src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACeElEQVQ4jSXTPW+dRRBA4TO7+37ca5trOyEIKkACRBEpIiBRUkJFy2/kB9AiOkSJIECHBIpEBHHij/fu7szOULg67dMc+fSTp+EJAIrDEAgx9g8PcAmtNbgS/KojInhkJCkSiZBE8QSJwBFkSjz58inP33vBkMDMyGPgYdjLjd0fK9e/XOMepBQYThEyEcrl4YKTbx5xdX7LIqf0XslFMBN0QHlwyvjcGY+C9MPMGIMphCI+WHYrfD3DubAsO1wGc5ppmpCcSH1iTIZb4/SDS9SP6Pd3jHCSJXj/iw/Zdh21I8kHZ+sF5/sD57sD+2nHfl2Y08wqhZwzy0cr8i6IBGWdC7+f/Yb0PWbGTe/spsq87ilFWMZCa41XbORc8HaHUVg+O1D/fE0pDxdu4padG6rKOilHr6SemOeVk3LGlGdyWbmuL4kxEQzKg4LsJ8rtyQ2lZNwhpcJITjWnRAUSaYJZFqw0St7hpTKNwHKhvAHF3ZA0kxAiFPFTcKUKhG0YHaIQDMw67k7TCqboGJTd8UAfnTLPiEwkdzSc7M7mFVdIwDBneMdrpQ+j90q5mSj8owzvZAlSSkSBmYnuRgRYdFwDC8XaYPM7ogb826lVKWbO2y/eZLsQSIKMhGMQgfoRU2A0Nm1oq5gP9FiRn5WJlQLO6x9vSe8s5JMTkEF3Q/t9R2807WirdD1CTMjzzPJ3IkiUIKGtsv8uU79q6FuB2hFRRZux9YYOI7qhrsz/GfNPMx6FhFGCQSZz92ojvq2Uj0Eezwxx1CqqikbA0VieTSx/LYgIwL0gcX9VJuPh+K+Qnm1wMSFnheLB/mqGWwecSAJDCBmICP8DGv6MviaItvgAAAAASUVORK5CYII=" style="float: none; min-width: 18px !important; margin: 0; padding: 0; border:0px !important; vertical-align: top;" width="18" height="18">';
  476.  
  477. // TWEAK ICON : FLICKRIVER - flriv - TEST IMG
  478. iconflriv  = '<img src="https://external-content.duckduckgo.com/ip3/flickriver.com.ico" style="float: none; margin-right : 3px; padding-bottom:3px !important; padding: 0; border:0px !important; vertical-align: middle;" width="12" height="11">';
  479. // TWEAK ICON : flriv - BASE 64
  480. //iconflriv = '<img src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAB6klEQVQ4jZ2TMWhTYRSFz3uN0UTFGqSWLorE4mCFSC10VcgkOAii4lJwEJ2EOogIgiCCiOggooObm9CpoBEVQelQKbpYFOJSikORYJrm5b17z3FIIm1eC9IDF/7hno/73//8gST06vZ7hQSGJB0mFZL6TqF6p5xhb2/QC7j1lsMCHkgqO5UhBafg5ExivProVH5mQ8CNih0FUHGq0DayYxbMCaeixHju+dldUynA5HQrHwBfXCo6BXcBEgCiERPugpEwYy02jkxdHFgAgEyX1Er8DKViu1EoDfXhfCmHXDbAp58xnnz8gyghzNlvrisArgNA2AWstOxEIzI0ogSgYeJYDrvzIbZlAhw/uBXj+7ag3kw6FZe7vn8TLDeTQWd7zB07Q+SzwZrlDmwPUG/GMBfcWVgP8Ms6S/uxIlSXYhzYkwUAOIU383UsN5M2gFxKA6LklTkvGAlz4dKLRUyM96OQ78PLuRrezdfhThgFSq9TrzB6t5qPjZ+NPOTehnSeDkbBO2dSvxFgpPawtJjKQfHmtyOJsWLUQNfga/MQATjdfDw6vW6QAGDv5Nf9ifG+OU+Synp7ZFL6AOFa8nRsdnV/CtBV7vLsoFPDpEIJVQAL/mws9RcgCeV7c6EkbKZCYFWaNqENr/C/+guj2Z5MzkOhuQAAAABJRU5ErkJggg==" style="float: none; margin: 0; padding: 0; margint-top: 3px; vertical-align: middle;" width="18" height="18">';
  481.  
  482. // TWEAK ICON : PhotoMedvekoma - BASE 64
  483. iconPhotoMedvekoma = '<img src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACdklEQVQ4jT2Ty25jVRBFV9V53Httt5N2oNNiAkKIBCSU//8UEEJpQIqgQzu24/s4jzoMDD3YqlFJe6+qLd9/d9dEBHFgNCqVECOmxs3NDeM4klJifp3xGmil0YWeZVrw3uNVFREh1cQwDNz/dEff94RVx+l0QkTw6jmdThw+Hnl6emJJE8N6TU4Jj4dqlbdfvOXh4QECdF3H4XxgtRmopZFTYrVesxlWdEPk98c/OM9HVDy+tELXd3zz7de4oIRVh5mx3W5JKQEZxKM4Ssq8++odoo3H3z4ADe+Ccv/jHTgh1YxWZbPZkJthgDiHwoXDnHHiudpdc7Xfs9/v0dYaOWcAzAwzo5SCE+F6u2W72RBjxImy2+0YhoEYI+/f36Iq+NWbDXNOxKEjpYTR6LoBcQ0zI8aIqoI1SinUmnFOeHN9RaWhcIE2jhMxdgzDQEqJtBSsQq0V1UssAFX9rPV6jYcGNNQrS15wndLHnlJnUjacOcwM5TJFHPM84UWpKePNGiB47/Dek1JCRAjBcT6fcc7RWkOaknOmlguncVloDXSaJqZpuuQE+r4nxsiyZELoyLliBvM8cz6fmaaJWivH45GUEt4qdHFAmuDEYaWxlIQ6ZRxH+O+Eac6kOeGcZxkn9p8O1NJQy4Vff/6FaVyIoafVhjShpIqVxjwunA6vzONMKZW6VJ4/fuLw8kLwHh99xzIt/Pn4gVXsGNY9SymIvziotWJmUBvj6ZWcK68vB6jgg0fufrhvZgaAiLD7csft7S3GZfF/PsuUeD0cmedEzQVVpbWGxwRpeqmzGc9//c3++R/iEAkhfGYwn2dCCJRUL19bGqrKvw5HfeV77HvrAAAAAElFTkSuQmCC" style="float: none; margin: 0; padding-bottom:3px !important; padding: 0; border:0px !important; vertical-align: middle;" width="11" height="11">';
  484.  
  485. // TWEAK ICON : BigHugeLabs - BASE 64
  486. iconBigHugeLabs = '<img src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADEklEQVQ4jSXQS2tcVQDA8f8595x779w7M500aZpMYiW2EVKtbdVuRFe6E+lKRaigu279BMUvoHsRC2IXPqBoloKC4EItlgRN29TQ2NC8OpnOzJ3HfZyHC38f4Sd+3f7Mn5u7TCOaZZDvsfboa/qjTWLVQCCYmB5F1cO6CucNFphrXeKF9rvMpGcQw6Lj1/du0m6eY3N/FYlFBQkjMyTwlsoOGRQdtNQECKyvsK5AyBor7bcR3nu/21/n1sPPqesmWqY47zic/EsiNQLol12k0VSlAWEJQ48XJcZXqNxk3D34gUQcwxYhpS3JywwlNEQBRpRoU6fIJQut8yil2On+gdR9CpEj7+yvUoz7FLnA+5hQHSfWJ6hMwGAwhkpTFJ7AafYOtlhefIWXT1/BmohI1pA7nd+wNqQZL3Lm5GtM1U8g5JiZxinSeJ7RsAIvuHc74+OPvuXHX24wP7VCpJrUghQlrUIHDRanL2AY8M3N66ze2GDlwjQfXH0LIRXeODY27nLUeYJ3gs7wAc5XSKeQeEVNt2jV22zt3CKaXOTS+Tf4/qu/WL+9SaA0aa3B5fcv8umXH/Ls2WXWtr+jFiu6jwtUIDQCAQhClXD9i0843Mtw3mOtQwhBo94gSWLycsLhYI0oEiAVUaSRUklyMyAbH3B26XXeu/oS86dS3nzneZ578WkkAUoFxHFEs5GSJjGBkjjn6XVzxE8b13yRQxhM8czsqwhp2H3yJ3k1opvtE4eagXjEfLqE9xbrDNaVjMcT7m/sohCOWhxz1Nvm960t6vFJrCvIqx61sEaSRIQsgPd47/HeYa1j685j2u0FpHUFInDU6xFh6MjNLs4POFZPSFINwqGEwnmL8xZrDff/3qfVOs5YPIXKykNqtmR/tEskNGnYJFISIR3Om/+DPThn6R5lPHzQYXZ2FhkvI+Y0qha1yUb/IJwBQkaTIT6UZL2MJI3JJxXjYUnWn1BvhSydXqQ0SyTzIe3GDOIw2/Q/37uGcBZsiPARQkiqwqG0whiH1gFSCrxR5OUyaXuaU80mDd3gPy3GdpOqQdLZAAAAAElFTkSuQmCC" style="float: none; margin: 0;  padding: 0; border:0px !important; vertical-align: top;" width="18" height="18">';
  487.  
  488. // TWEAK ICON : BigHugeLabsFAvs - BASE 64
  489. iconBigHugeLabsFAvs = '<img src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADDElEQVQ4jV3QS2hcZQDF8f9938k88prSaV5NG4ySQrSCK5UiglvFnStB3AmCO8GFLouL7t0JuhS3XdhKbSJElFgbU9JHTGqamcx07syd+5x773e/z0UQqWd7OL/F0aLMU1V7BikF7eAOh94Gpu6Qy4xXlj7AMep4vo9hSBzLpuLW0HUdITOEzNC64Z5K8iFt/xeirIMsx4zGHXQUllnnpYUPSbPziKkmssihyCEYcXG+gSRDn6mc58jbJIl90iRDlAWaqFPX1ilSjc2/rlKWj9B0HataQ1fwwsIcdXeWSXcO/WHvJmmcMeU+jyEaZLFF0Jfcun6Xtfl3cbQKD06uI0uPcbBNDYlt20gpUUqhP/G2mZu+zM6dXb74+HsG/RhDN3CrBt1glyI1GQvBOE1QxgQVDfI8J4oi0jTFzMsAKUuEAD/oYlkmi4tnmV/MyFWHstAwOjrTmweMP3oNqwzxPA/P86jVamg/3PtMlZlFzVkgzroUZYjhFti6TRiF9NoZKzdbvLw1x9833qcZ+7SPj9nf36fZbGLW3BZe8YiTqE3VruFOOIDNYBDg90sq85dYvT2ivtNFPOhyoA1oHxywt7dHq9XCXJ69wuP+BgiXIFNoKiGNcyyzxuziOhfzSVo7QwypkX91i99etxg8vM/h4SGBP0KTUqoD7yf+OPqGMi+Y2nBZvzqNk1pouoFZwkSqA5DpktgsUbKkRLF5po+mlFIAYxHS9rfpDY9wn6xw4fO7NDY6aGj8Px0z5triPbbO+f8BAEEUcZILphqT+N5t7C//ZPla/5nx79NDPln9lZHIqLou5r+FH4Z0i5Ja1UQpQZwdk8cdwHoGaAgH40yTep5R1fVTIEoSjgvJhBMRRI+xq5fojXtcviFQmBxdyehcSHjx2wbLYYVX6y2C1RmKID8FknQMzgS5VhBKHacsOOu9SbX3HT9/2mf/jSEDb8TWvM07X6/wdvEcnbfWeDpMTz9QSjEKA0bJCfG4TVoMkD+eEJ+LSJZG5OIpSSSIQw1T6KztLmG8t0J3eJ9/AFvurWXl/wIIAAAAAElFTkSuQmCC" style="float: none; margin: 0;  padding: 0; border:0px !important; vertical-align: top;" width="18" height="18">';
  490.  
  491. // TWEAK ICON : GaGaLabsINT - BASE 64
  492. iconGaGaLabsINT = '<img src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADLklEQVQ4jU2PSWwbVQCGv3nvjT22s9pZSbDjhKRLiFI2FSmQUlGhIJAQFzgA4oDgwgH1wIkLEkLigABx4AJCnHogAnURhQNwqEBlESoibWjaOgvOZjvuON5mPOOZx6Ei4rv/n77fmHvzjMaQ1Fd/Z7R+jR7pYQB+EGBKhdYhodZ4vo/WYCpFLhyEux/A6kuj3N0cqneEjp3fkKrFxn4Vv91Gh5qYFcVxW2AYBEEbIQQDqSQd4RZO5wKNzWVUpC+NaxdIqpDS7QqnX3uJoF5ldavA6uY2UghGB/sxPMVz353GzMX5aPodLhVuEb/rMEprkFaCetPlmYXHefqR4ziVMgAYgIZb+W1eff1T3qrNYGBwrHY/l2MOfrOCkNEEZlc/dA1yaCJLqVzGD8KDMUA7CNgI8nxofMDN6SUuxr4h1BC6VVTgOQjTIkxNcuOfTd775HO2i3s89tAxXnjyBIcyI1z49ldOqEc5z3mscQd3K4GM92ImelCBW8Vr2Di1Oq4jeePFZ/l5KUetkGdpNc/qTpHyYg/n9OKdnAtQO/IlX2HjlvPI4fueeDsrd5mJ7ZHNjnHy1AKJ1AgnZyeQUrJbKHH2yiW29Q6mNsmQQR/f4K+uFdqpKZSVHGG/0mRhMs34yCB2/iZDukEY+HSZgudPzXH0njE+PnMO47LBPPMMJ7sp1308bw0B0OjM8suazfLKCsOWweRQCosQAdRrVY5kR5lKD/MfPywX0cOzWIMTCKe4ht/c57o5zR/lCL6MABCJxXE1NEWEMAj5P05nBr9ZwS3kELGBLCoSwyPCsnkvF//eQ0hJteEQi0Rpt1rslG201gcCQ0giiSTR/iyitbeOXysiIjFUNMbZFYfN/QY9HXG8Zo3beyXGh/op2dUDQei7hG0PrUOMB195X8tECoTAkApDKKxrixxONCmUbeRWgs/CL7ixvkXaH2OAAYrxOruddXJ9Nkp1JGk3K1C4wlPZDSyjTbm3Sa7YyfW1TeR6N56OMsEkADY2ZhPSbpyaaqBapTW0IXj34T/JuC2EMtgXmh8jA0xn5vj6+5+Y96c42qdR4s6FeLfkqjGDmn2ZfwE1k2aOA5eZ9AAAAABJRU5ErkJggg==" style="float: none; margin: 0; padding-bottom:3px !important; padding: 0; border:0px !important; vertical-align: middle;" width="14" height="11">';
  493.  
  494. // TWEAK ICON : FickRHive - BASE 64
  495. //iconFickRHive = '<img src="http://flickrhivemind.net/favicon.ico" style="float: none; margin-right : 3px; padding-bottom:3px !important; padding: 0; border:0px !important; vertical-align: middle;" width="12" height="11">';
  496. iconFickRHive = '<img src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADUklEQVQ4jQXBzWscZQDA4d/MvLOzM7Ob/TDZzYZtTbRJa7WV1CAaTME2llqikUawiFqJFykIoVL/AcGeFQ+exPqBXqyQ4kEQPWghiNp81CRVkwaTbbZpNt3NzmY+dmZen0fJZPMyV+yiq7uI1ZHmxvXf6Os/wPPnJvjhu2scHTzG1S++5OChwxw6Mkimu5NEUuGrjz4h1jVU9AStlkupsxtDGBhGkr8Xl9HRWJz9i9XlW4Shz6lXXmbyvSl6egp8+9nnKKrKyZOjiKQhcBoNIg0eHxxkaeEmU5cu8ubkJKtLy7x1/jzzN+d4ZuxFZn6/wceXL2OaSZ584QzHnnoaxl9/TRZ7ytJOZaSdy0srnZafXrki/TiWbRlJGUnZjqU8MTYurWxRWqmcHH1pQs7tNuWH099L5Z33P5CWLrg2Pc3Q0BM429v8+uNPVKsVQCKlytsXp7j69TecffUcpLJcePcSUheEKIhsVw/FzjxvXNhHeX8Z0zA4OjyMCyRQiVU4fvoM4xNnGRkZYanWROoW7baHqglEAvCjkI1/bhN7AW7gYxs2f679RymbRTeTFPoPkk/b3PMC9vZcRNImjGN0LUaEakAkfbbvbSJU8OOQFaeJq8YU8p2kc3mcpo+3r0y1dh/X9UhZHcRBmyiOEZEf4Tsehm5g2CYaMVvVO9yanaXWVcBOZdBtm9KD3dhmB5sbFdx8F6GUBIGGGkZt7u/U8H2fUJFoqoapm/Q9dIBTz57AazWp363SbjmUS0V2Gw1c36PebLDjNBB7nksUtNmp1Rg6PszgY0dIBCHdfb305DMM9D/M3Pw8RcuimNCp79RotppE7QihqAjPcTASCZKWiQRK+8uYms7MwgIdlsXgo48w9twoSHCCgCgIaHt7xFIBFETQcghbGqqM+eP6DOvr6+RyD9Db24uu66xVNlmrbHB4YIBWfRcrmaS6UUFRFKSqILa2tkgnLQyhcWd1lTDwWNlbZPbnX8iWCtj5PLlMltAN2LxbxWk61Gs7YOiksxmEpqrsOQ5xHGMkEyhxRDZjU9+pE0chStjGSAiWF+ZxGi0UoSIVSGGQMUxEJCVtzwMJkQq3/13BMk3QBdq2iu+6VCsbFErdSEVFCcBKd6AkBMI2+R8HE3uqfSN/PAAAAABJRU5ErkJggg==" style="float: none; margin: 0; padding: 0; border:0px !important;   vertical-align: top;" width="15" height="18">';
  497.  
  498. // TWEAK ICON : FluidR BASE 64
  499. //iconFluidR = '<img src="http://www.fluidr.com/favicon.ico" style="float: none; margin-right : 3px; padding-bottom:3px !important; padding: 0; border:0px !important; vertical-align: middle;" width="12" height="11">';
  500.  
  501. iconFluidR = '<img src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACFElEQVQ4jcWTu04rQRBEz+zMesYILPGwQF4RkDhZIT4AZEGERIYI+J37J+SkiICEABIyRIggMA9ZliwCI+9j2JlZknsXiAluZx10VXV1l7i5uan5RUW/GQZQ3xvvPff394zHY/r9PkmSAPD29sZoNGJxcZFer0cURQghfgKcn59zenrKdDrFOUdd12xtbdHv9xmNRnjv8d6jtWYwGLC9vf0FcHJywsXFBQDGGLz3LC0tkSQJ7+/vaK0JIZDnOXmec3Z2xng85ujoCHV3d8fl5SVaa+I4BsA5x+bmJkophBBEUYS1llarRQiBEALX19ekaYqcn5//M5lMMMbQbrcxxrCyskKv1yOEgDEGpRQhhAa8qiqccxRFgXp5eWFubg6tNUop4jhmbW0NIQRaa6SUOOcwxlCWJXVd45zDOcdwOEQppZBSEscx7XabhYUFOp0OdV03TkspsdY2BocQGqBoY2Pj6yR/pWZZxmw2o6oqrLVYa5lMJmRZRpZlFEWBtZb19XWinZ2dhuXfbmVZAlBVFd57Pj4+eH19ZTabURQFZVlSliV7e3tEaZqyu7tLCKGR55wjz/OG6fb2ljzPf7Dv7++TpilKCMHh4SHdbperqyustdR1jZSS5eVlHh4eeH5+ptVqIaWk0+lwfHzMwcEBAOJ7mLz3PD09MZ1OSZKEbrcLwHA45PHxkdXVVdI0/fHK4r+n8RMZsSWomCz/CQAAAABJRU5ErkJggg==" style="float: none; margin: 0; padding: 0px; vertical-align: top;" width="15" height="18">';
  502.  
  503. // TWEAK ICON : LfVR (forum:http://forum.phun.org/forum.php) ???
  504. iconLfVR = '<img src="http://www.fluidr.com/favicon.ico" style="float: none; margin-right : 3px; padding-bottom:3px !important; padding: 0; border:0px !important; vertical-align: middle;" width="12" height="11">';
  505.  
  506. // TWEAK FALSH ICON :FFFFlckkR ????
  507. //iconFFFFlckkR = '<img src="http://www.fluidr.com/favicon.ico" style="float: none; margin-right : 3px; padding-bottom:3px !important; padding: 0; border:0px !important; vertical-align: middle;" width="12" height="11">';
  508.  
  509. // TWEAK ICON :FFFFlckkR
  510. //iconFFFFlckkR = '<img src="http://fffflckr.com/favicon.ico" style="float: none; margin-right : 3px; padding-bottom:3px !important; padding: 0; border:0px !important; vertical-align: middle;" width="12" height="11">';
  511. iconFFFFlckkR = '<img src="data:image/gif;base64,R0lGODdhEAAQAOcAAAEBAb6cF7i4uExCHJl9C0NDQ/PFEkM8IiUlJZ2dnem+E////3xpHZSUlCopJNivEB8ZAnt7e+np6XR0dHBbCGxsbNKqD6+QGRQQADUxI2NjY4xyCllOIMqkDaaJGSYiFNvb21tbW/bIE2dYHzIyMlRKIbW1tV5RH+G3EYx1HAoIAph+GjUtDdPT08GeF+3AEkxDITEuJIZwHFtPHxMTE3BfHUtLS5R7G8zMzBwcHM+qFqKiojo1Izs7O6qLFCsrK4FqEXpnHCgiDLybGGxcHsahDqKGGuTk5NKsFVBCCmJPCT45IygnJGJVHxwbFPPz86yOGpV6C8unFj80DNyyDrGRFpuBGhoUAg0NDaGDC15RIMWhFsfHx1dXV6qqqiYkHOS6E9yzEwgGAHNiHoJtHdewFrOTGJF4F3ZhDRUTDiwnEjszEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsAAAAAAGAAAAAY94yrhfdYdwEAGAAAANQR5AAAdgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIgAkQNylAAAAPd4AAUAGACMAHMCTxIoABh21HbQKhsAIJRwAAEDcgAAAHKUgPecAyMAGHeL4IvfpQAAdwAAAAAAAAAAAPggAJMAGHbRxhj4IMbtALd20QAAAIj//xjAA8AApgCmGAAAGAAAAPgAAAAY9wAAQAAAAOQAAAAY9wAAAAAAAAAAAAAAAAAAAAAMAAIAAAAAAAABAfhcAAAAGAAAAJEAAJf4AAAFLCwAAAAAEAAQAAAIXQARCBxIsKCIgggJHkyYUAQABAsZChSRwwBEBAsSKBwowsDBgwta3BDxESIAETJqXJzIcSFJliybQHTpcuAYEUFc8LgoQoHPn0CDRpTIkahBoxuRwlRKsqnTp00DAgA7" style="float: none; margin: 0; padding: 0px; border:1px solid gold !important; vertical-align: middle;" width="19" height="15">';
  512.  
  513. // TWEAK ICON :FavExplo - BASE 64 (Globe Blue + Arrow)
  514. //iconFavExplo = '<img src="http://con-tech-gr.blogspot.com/favicon.ico" style="float: none; margin-right : 3px; padding-bottom:3px !important; padding: 0; border:0px !important; vertical-align: middle;" width="12" height="11">';
  515. iconFavExplo = '<img src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADS0lEQVQ4jQXBbWhVZQDA8f/znHPuOffce7dhe5G7jVqLMIlNzb1QQiQp9sH8YGBREcQKsj4YFNoHqxFF4gj7EpkU6ZegF4JsKIqw0mlrVEKO1ch5t3Kvd7u789x7zznPOefp9xNXR8e1aRpEiUcoTXy7jhv/FTl+5isWyx6gyOeyHHruWTY3t9BoWohYUdEehm0gfh8b1UpalKXLxNwy7586xUo1JOXWIWOBjMCOQ+LKAi1Zg0MDL9B1XyeGApEIzLKREEjJvpcOYja0gZXBTTchXINYJAQywgoFY8MXaAJ0HCBkxF83p/FViFm0NzAzO4dtORgSqpZE1KchY9AkLQYPPMPeR+/n5cGPuXx9nJJXIlldYerHs5QLBaQZNjA09Bm1jEPJ8okyPm6wwkd793Nt6B3u6Wxn/5FjnJ2cpIhLXMtgRQ3sfvpFlp0s5m+zN1nyKmhDkrez2Gs+V859iRfC16PjHPvmO2IjjROmkV4VYaWp2jVurde4MruEyO85oOfm5nFzWT54e5A9W7fz3okTnJ//B9/Oko4c/NUKKqyg/Dskfgl8H1RMPt+OuVpcwI4DHuvs4okd23nr0y+4MF0gSeqJfYuiqGLmIFrzwKgh0OhYYUgoLhYQ7pZHtFSSmT9/5vEnX6WQKEqmRrg2GRUiJ6f4948RrBR4QL6nj0gJDO3ikEba7W14qYTnDx9lammCUqkA3jJ6vUhUq9DS0cGmnp3cCRIMwAkDbEMSC016411w8qcRPaW1prtX092veahPG9v6dfPDu/WRT07rea31ba113eZ+PaO1drbs0LKrT9PVr9/94aI2e3ONNFYTGvwAkXJJ6RwPdLQz/O3n+KHPrl37mF4oUks53L11J0JngJDWZpsHO5sxVShQ6z6LN67jRxCIEOwUrxz9kHOXRlirraHiGGllINIIXcYx4M2Dh7EDB7Nmx0zcnmLs+1/xwoiJ2TkuXr1MJaqBtMDKgYBEhAhDkYotrFDR3dqKrQJMrUqAxbaeXv6enefM8Hkq1RDMDIQRmDVQCtNIs3FDC2+8NsCmtlYcqTBVhBi79osWQqCJUbFBYLlM3Frg+MnTLJY9okTR2lTP6wNP0XVvO06iMIRJJU4wLIf/AROBjQatzZQsAAAAAElFTkSuQmCC" style="float: none; margin: 0; padding: 0px; border:1px solid gold !important; vertical-align: middle;" width="15" height="15">';
  516.  
  517. // TWEAK ICON : PortFotoLio
  518. iconPortFotoLio = '<img src="data:image/gif;base64,R0lGODdhEAAQAOcAAB8fH91sDrS0tEsyHmxsbL5dEplOFf7+/lRRTz4tH+zs7E1KR5ycnP9uAI1WKjRBSoRJGOLi4jAwMGhAG4uLi/V0DHlVOv94Btzc3NF0LZ9dK9TU1IGBgfR7E1NBM2NjY8rKyi85QOV1HSIoLZh1Wv9+EikkIVY4HHNzc/x0C1xcXFY/LaysrCYwOMXFxYVGFn9cQMNgEUNDQ1hGOPWMPextDf+BDfX19T8uICAlMF5QRv+FGHprX5KCd59kN/aCIOx4ITcmH6xWFGM6GpZNFZSUlDs7OpZeM8JcDaKiontDGFg1Gv97DEItHtZgCHx8fEI1LoJRLCIiIkNJTeJwD6FRFcNfEeh0HJxeMJBZLodjSWRXTIBFGKRkNDw1L/+DFjAnITc5PS0tLfWCKf+CIlRUVP50BUpKSm49GeJqDuxzDT1ES104HCw2PKFfLD03MZ9RFYFeQ51lOpBfOkM2MDM8RAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsAAAAAAGAAAAAY94yrhfdYdwEAGAAAANQR5AAAdgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAAkQCW7AAAAPd4AAcAGACMAABcXxIoABh21HbQKhsAIN9YAAEAlgAAAJbsWPecACMAGHeL4IvfpQAAdwAAAAAAAAAAAPggAJMAGHbRxhj4IMbtAAB20QAAAKL//wocABwDggOCCgAAGAAAAPgAAAAY9wAAQAAAAOQAAAAY9wAAAAAAAAAAAAAAAAAAAAAMAAIAAAAAAAABAfhcAAAAGAAAAJEAANFIAAAAmCwAAAAAEAAQAAAIkAClCBQ4gUmKFEMGKhQ4IIUZJhDNpKixUIqVFD4W0knBRGGTFEoqCjRjY2CKKyJNChySQqAMDBQERoggcEwFKRAFHjhzQMUBFhtuSNHRkqMUFAcEikk6MEHLnFJ2KhDwk0LSLS1ZusSgQmYRgSJKSjmZUmBLgR9DiiSp8KKIhSeMLmzIMWIKNWXZGERYtu/AgAA7" style="float: none; margin: 0;  padding: 0; border:0px !important; vertical-align: top;" width="18" height="18">';
  519.  
  520.   function $x( xpath, root ) {
  521.     var doc = root ? root.evaluate?root:root.ownerDocument : document;
  522.     var got = doc.evaluate( xpath, root||doc, null, 0, null ), next;
  523.     var result = [];
  524.     while( next = got.iterateNext() )
  525.       result.push( next );
  526.     return result;
  527.   }
  528.  
  529. // ???
  530. fpmlinks_newphotopage = function () {
  531.   underphotonode = document.getElementById('photo-activity');
  532.   if (underphotonode) {
  533.     cowners=underphotonode.getElementsByClassName('comment-block');
  534.     ccontents=underphotonode.getElementsByClassName('comment-owner');
  535.     for(x=0;x<cowners.length;x++) {
  536.       buddyid=cowners[x].getAttribute('data-comment-nsid');
  537.       //ccontents[x].innerHTML=ccontents[x].innerHTML.replace('says:', makeLinks(buddyid) + 'says:');
  538.       blnks=document.createElement('span');
  539.       blnks.innerHTML=makeLinks(buddyid);
  540.       blnks.setAttribute('style','font-weight:normal !important');
  541.       if(ccontents[x])
  542.         ccontents[x].parentNode.insertBefore(blnks,ccontents[x].nextSibling);
  543.     }
  544.   }
  545. }
  546. /*
  547. //attempt at optimising the function. doesnt seem to make that much difference. code is a lot clearer though
  548.  
  549. grabuserid = function(text) {
  550.   var buddyid;
  551.   var icontest=text.match(/\/buddyicons\/([0-9]+@N[0-9]+)\.jpg/);
  552.   if(icontest)
  553.     buddyid=icontest[1];
  554.   else {
  555.     var noicontest=text.match(/\/images\/buddyicon\.jpg\?([0-9]+@N[0-9]+)"/)
  556.     if(noicontest)
  557.       buddyid=noicontest[1];
  558.   }
  559.   return (buddyid == null) ? 'undefined' : buddyid;
  560. }
  561. */
  562.  
  563. grabuserid = function(text) {
  564.   //win.console.log(text + '\n');
  565.   buddyid = 'undefined';
  566.   if (text.indexOf('buddyicon.jpg') != -1) { // no proper icon
  567.     buddiarr = text.split('buddyicon.jpg#');
  568.     if (buddiarr[1] != null) {
  569.       buddyid = (buddiarr[1].split('"'))[0];
  570.     }
  571.   } else {
  572.     buddiarr = text.split('/buddyicons/');
  573.     if (buddiarr[1] != null) {
  574.       buddyid = buddiarr[1].split('.jpg')[0];
  575.     }
  576.   }
  577.   if ((buddyid == 'undefined') || (buddyid == null)) {
  578.     buddyid = (text.split('/'))[2];
  579.   }
  580.   return (buddyid == null) ? 'undefined' : buddyid;
  581. }
  582.  
  583. makeLinks = function(userid) {
  584.   if (userid=='undefined' || userid=='l.yimg.com')
  585.     return ' '; //[ User is no longer on Flickr ]
  586.  
  587.  // REMOVE BRACKET - 2018
  588.   iconlink = '. <b>';
  589.  
  590.   if(userid=='36521957871@N01')
  591. //TWITTER - SUPP DECEMBRE
  592.   //  iconlink += '<a title="Follow Steeev on Twitter" href="http://twitter.com/steeev/"><img alt="T" style="float: none; margin: 0; padding: 0; border:0px !important; vertical-align: middle;" width="15" height="16" src="http://farm4.static.flickr.com/3629/3403660323_11839590bb_o.gif"></a> ';
  593.  
  594. MAIL :
  595. iconlink += '<a onclick="flickrmailpopup(\'' + userid + '\');return false;" title="Send a Message" href="http://www.flickr.com/messages_write.gne?to=' + userid + '">' + iconmail + '</a> ';
  596.  
  597. // ✅ USER ABOUT/PROFILE (ICON) - 2021 - PB ICON (chg by text)
  598. //  iconlink += '<a title="User Profile" href="https://www.flickr.com/people/' + userid + '/">' + iconprof + '</a> ';
  599.   iconlink += '<a title="User Profile" href="https://www.flickr.com/people/'  + userid + ' "> ♙ </a> ';
  600. // (double)USER CONTACT :
  601. //  iconlink += '<a title="User Profile" href="https://www.flickr.com/people/' + userid + '/contacts">Uct</a> ';
  602.  
  603. // 🔴 DISABLE - RELATIONSHIP :
  604. // iconlink += ' <a class="fpmLink" title="View / Change Relationship" onclick=\"document.getElementById(\'emaildiv\').style.display=\'none\';icon_windowOpenFromLink(\'' + userid + '\'); return false;\" href=\"http://www.flickr.com/people/' + userid + '/relationship/\">RE</a> ';
  605.  
  606. // 🔴 DISABLE - 2018 - UiF - PB USERNAME need to find another way
  607.  // https://www.flickr.com/search/?user_id=15064538%40N00&sort=interestingness-desc&faves=1&view_all=1&text=peterschlyter
  608.  //https://www.flickr.com/search/?user_id=15064538%40N00&sort=interestingness-desc&faves=1&view_all=1&text=60308264@N05
  609.  // realname
  610.  // username
  611.  
  612. //iconlink += '<a title="User Profile" href=" https://www.flickr.com/search/?user_id=15064538%40N00&sort=interestingness-desc&faves=1&view_all=1&text=' + userid + '">UiF</a> ';
  613. //iconlink += '<a title="User Profile" href=" https://www.flickr.com/search/?user_id=15064538%40N00&sort=interestingness-desc&faves=1&view_all=1&text=' + realname + '">UiF</a> ';
  614. //iconlink += '<a title="User Profile" href=" https://www.flickr.com/search/?user_id=15064538%40N00&sort=interestingness-desc&faves=1&view_all=1&text=' + username + '">UiF</a> ';
  615.  
  616. // FLICKR OFFICIEL (HTTPS) - 2017 OK
  617.  
  618. // 🔴 DISABLE - TEST - 2025 - SEARCH without Second life
  619. // SEARCH with EXCUDE   portait -sl -secondlfe -secondlife -avatar -secondlifefashion -dselles -wip -fameshed -glamaffair -monso -slmodel -genus
  620. // https://www.flickr.com/search/?safe_search=1&content_types=0&media=all&tag_mode=all&adv=1&tags=portait+-sl+-secondlfe+-secondlife+-avatar+-secondlifefashion+-dselles+-wip+-fameshed+-glamaffair+-monso+-slmodel+-genus
  621. //iconlink += '<a class="fpmLink" title="Search no SL" href="https://www.flickr.com/search/?safe_search=1&content_types=0&media=all&tag_mode=all&adv=1&tags=portait+-sl+-secondlfe+-secondlife+-avatar+-secondlifefashion+-dselles+-wip+-fameshed+-glamaffair+-monso+-slmodel+-genus">[Search no SL]</a> ';
  622.  
  623. // ✅ CONTACT USER NAME (<a id="CatFlickrSuite4" rel="me" href="/photos/carlosvisual/")
  624. //(LINK contact : http://www.flickr.com/people/carlosvisual/contacts/ - LINK photo : (http://www.flickr.com/photos/carlosvisual/)LETTRE "CT":
  625.   iconlink += '<a class="fpmLink" title="CONTACT" href="https://www.flickr.com/people/' + userid + '/contacts/ ">[CT]</a> ';
  626.  
  627. // ✅ PHOTOSTREAM USER
  628.   iconlink += '<a class="fpmLink" title="PHOTO" href="/photos/' + userid + ' ">[PHt]</a> ';
  629.  
  630. // ✅ 2025 - PHOTOSTREAM USER by intersting :
  631. // OTHER: https://www.flickr.com/search/?user_id=66422871%40N00&sort=interestingness-desc
  632.   iconlink += '<a title="User PhotoStream by intersting" href="https://www.flickr.com/search/?user_id=' + userid + '&sort=interestingness-desc">❤️PhoStR</a> ';
  633. //  iconlink += '<a title="User Favourites Search by intersting" href="https://www.flickr.com/search/?user_id=' + userid + '&faves=1&view_all=1&text=&sort=interestingness-desc">' + iconfave + '</a> ';
  634.  
  635. ///
  636.  
  637. // ✅ 2025 - RE ENABLE (not for you but ONLY for Others USERS - ARCHIVE USER (Direct Thumbnail) - Flickr (User ARCHIVES) SMALL:
  638. //  iconlink += '<a title="User Photo Archive (Small)" href="https://www.flickr.com/photos/' + userid + '/archives/date-taken/detail/?view=sm">ArCH</a> ';
  639. // WITH ICON
  640.   iconlink += '<a title="User Photo Archive (Small)" href="https://www.flickr.com/photos/' + userid + '/archives/date-taken/detail/?view=sm">' + iconarch + '</a> ';
  641.  
  642. // ✅ 2025 - ARCHIVE LARGE DATE TAKEN - USER (Direct Thumbnail) - Flickr (User ARCHIVES) MEDIUM:
  643. iconlink += '<a title="User Archive Date Taken" href="https://www.flickr.com/photos/' + userid + '/archives/date-posted/?view=md">ArCHP</a> ';
  644. // WITH ICON
  645. /*  iconlink += '<a title="User Photo Archive (Small)" href="https://www.flickr.com/photos/' + userid + '/archives/date-taken/detail/?view=sm">' + iconarch + '</a> ';*/
  646.  
  647. // ✅ 2025 - Flickr (User FAVORITES) VIEW Justified: (2019.08)
  648.   iconlink += '<a title="User Favourites Justified" href="https://www.flickr.com/photos/' + userid + '/favorites/page1/?view=ju">❤️Ju</a> ';
  649. //  iconlink += '<a title="User Favourites Justified" href="https://www.flickr.com/photos/' + userid + '/favorites/page1/?view=ju">' + iconfave + '</a> ';
  650.  
  651. // ✅ 2025 - Flickr (User FAVORITES) search by intersting :
  652. // ME :  https://www.flickr.com/search/?user_id=15064538%40N00&faves=1&view_all=1&text=&sort=interestingness-desc
  653. // OTHER: https://www.flickr.com/search/?user_id=129738991%40N02&faves=1&view_all=1&text=&sort=interestingness-desc
  654.   iconlink += '<a title="User Favourites Search by intersting" href="https://www.flickr.com/search/?user_id=' + userid + '&faves=1&view_all=1&text=&sort=interestingness-desc">❤️Int</a> ';
  655. //  iconlink += '<a title="User Favourites Search by intersting" href="https://www.flickr.com/search/?user_id=' + userid + '&faves=1&view_all=1&text=&sort=interestingness-desc">' + iconfave + '</a> ';
  656.  
  657. // SEPARATOR
  658. iconlink += 'Pools: ';
  659.  
  660. // MY POOLS:
  661.  
  662. // ✅ 2025 - IN POOL - PF
  663. //iconlink += '<a title="User Profile" href=" https://www.flickr.com/groups/portrait_face/pool/' + userid + '/?thumb=1">inPF</a> ';
  664. iconlink += '<a title="InPF" href="https://www.flickr.com/groups/portrait_face/pool/' + userid + '/?thumb=1">inPF</a> ';
  665.  
  666. // SEPARATOR
  667. iconlink += '>>';
  668.  
  669. // IN POOL - PF (LA)
  670. iconlink += '<a title="InPF L" href="https://www.flickr.com/groups/portrait_face/pool/' + userid +  ' "> (LA)</a> ';
  671.  
  672. // SEPARATOR
  673. iconlink += '-';
  674.  
  675. // ✅ 2025 - IN POOL - PFO
  676. //iconlink += '<a title="User Profile" href=" https://www.flickr.com/groups/portrait_faces_open_minded_/pool/' + userid + '/?thumb=1">inPFO</a> ';
  677. iconlink += '<a title="inPFO" href=" https://www.flickr.com/groups/portrait_faces_open_minded_/pool/' + userid + '/?thumb=1"">inPFO</a> ';
  678. iconlink += '>>';
  679.  
  680.  
  681. // ✅ 2025 - IN POOL - PFO (LA)
  682. iconlink += '<a title="inPFO L" href=" https://www.flickr.com/groups/portrait_faces_open_minded_/pool/'  + userid +  ' "> (LA)</a> ';
  683.  
  684.  
  685. // SEPARATOR
  686. iconlink += '-';
  687.  
  688.  
  689. // ✅ 2025 - IN POOL - PFM
  690. //iconlink += '<a title="User Profile" href=" https://www.flickr.com/groups/portrait_faces_open_minded_/pool/' + userid + '/?thumb=1">inPFO</a> ';
  691. iconlink += '<a title="inPFM" href="https://www.flickr.com/groups/portrait-faces-master-view/pool/' + userid + '/?thumb=1"?">inPFM</a> ';
  692. iconlink += '>>';
  693.  
  694. // ✅ 2025 - IN POOL - PFM (L)
  695. iconlink += '<a title="inPFM L" href="https://www.flickr.com/groups/portrait-faces-master-view/pool/' + userid +  ' "> (LA)</a> ';
  696.  
  697. iconlink += '-';
  698.  
  699.  
  700.  
  701.  
  702. // SEPARATOR
  703. iconlink += 'Apps: ';
  704.  
  705. // FLICKR APPS - 2018 revision :
  706.  
  707. // Flickr River (User Most Interesting)  - [GOOD 2021 - pb - ]: - 2021 - PB ICON (chg by text)
  708.    iconlink += '<a class="fpmLink" title="User Most Interesting (Flickr River)" href="https://www.flickriver.com/photos/' + userid +  ' ">RiV</a> ';
  709. //  iconlink += '<a class="fpmLink" title="User Most Interesting (Flickr River)" href="https://www.flickriver.com/photos/' + userid + '/popular-interesting/">' + iconflriv + '</a> ';
  710.  
  711. iconlink += '>';
  712.  
  713. // 🔴 DISABLE - 2025.05 - Seems BROKEN now -
  714. //  DarckR (User Most Interesting)  - [GOOD 2021 - pb - ]: - 2021 - PB ICON (chg by text)
  715. //  iconlink += '<a class="fpmLink" title="User Most Interesting (Darckr)" href="http://darckr.com/username?sort=interestingness-desc&format=Small&username=' + userid +  ' ">DaK</a> ';
  716. //  iconlink += '<a class="fpmLink" title="User Most Interesting (Darckr)" href="http://darckr.com/username?sort=interestingness-desc&format=Small&username=' + userid + '">' + icondarckr + '</a> ';
  717.  
  718. // 🔴 DISABLE  - 2025.05 - WORK but idon't use It
  719. // BigHugeLabs (DNA - USER Resume) - [GOOD 2017 - ]:
  720. //  iconlink += '<a class="fpmLink" title="User Info + Stats (DNA-BigHugeLabs)" href="http://bighugelabs.com/flickr/dna.php?username=' + userid +  '">' + iconBigHugeLabs + '</a> ';
  721.  
  722. // 🔴 DISABLE  -2025.05 - WORK but I have too much Favs and it hang
  723. // BigHugeLabs (Favorit-Finder) : La 1ére fois, metre votre nom dans la 2éme case (ensuite ce n'est plus necessaire) - [PB too much FAVS 2015 - ]
  724. //iconlink += '<a class="fpmLink" title="User Favs By Me (Favorit-Finder)" href="http://bighugelabs.com/favorites.php?user1=' + userid + '">' + iconBigHugeLabsFAvs + '</a> ';
  725.  
  726. // ✅ 2025 - TEST - BigHugeLabs ( SCOUT User Explore) :
  727. iconlink += '<a class="fpmLink" title="User on Explore Page (Flickr Scout-BigHugeLabs)" href="http://bighugelabs.com/flickr/scout.php?sort=position&year=0&username=' + userid + '">SC</a> ';
  728. // TEST - BigHugeLabs (Favorite Surfer: Browse favorite photos on Flickr)
  729.   //iconlink += '<a class="fpmLink" title="Favorite Surfer: Browse favorite photos on Flickr (BigHugeLabs)" href="http://bighugelabs.com//surf.php?user=' + userid + '">Fs</a> ';
  730.  
  731. //iconlink += '>';
  732. // 🔴 DISABLE  -2025.05 - [BROKEN 2019 - TOTALY]
  733. //PicSRR (User Most Interesting) LETTRE [PB 2019 - some litte pb for visualize shot - ]:
  734. //  iconlink += '<a class="fpmLink" title="User Most Interesting (PicSSR)" href="http://picssr.com/photos/' + userid + '/popular-interesting/">PSi/F</a> ';
  735.  
  736. //iconlink += '>';
  737.  
  738. // 🔴 DISABLE  -2025.05 - [BROKEN 2019 - TOTALY]//
  739. // FlickRHive(500 photos per Pages / Size : 100)   - [GOOD 2018 - ]:
  740. //iconlink += '<a class="fpmLink" title="User (FlickrHive)" href="http://flickrhivemind.net/flickr_hvmnd.cgi?search_type=User&textinput=' + userid + '&search_type=Search+User&photo_number=500&photo_type=100&sort=Interestingness&page=1&tag_mode=">' + iconFickRHive + '</a>';
  741.  
  742. //iconlink += '>';
  743. // 🔴 DISABLE  -2025.05 - FlickRHiveFAV(500 photos per Pages / Size : 100) - USERNAME ajouter : http://www.flickr.com/photos/  - [PB 2019 - ]:
  744. //iconlink += '<a class="fpmLink" title="FAV (FlickrHive)" href="http://flickrhivemind.net/flickr_hvmnd.cgi?search_domain=Favorites&textinput=https://www.flickr.com/photos/' + userid + '+&search_type=Search+Favorites&photo_number=500&photo_type=100&sort=&page=1&tag_mode=&license=">' + iconFickRHive +'♡</a>';
  745.  
  746.  
  747. iconlink += '>';
  748.  
  749. // ICON + GLYPH ICON (FAV)- 2017
  750. // ✅ 2025 - RE ENABLE But Randomly Fail - FluidR (Fav Random)  - [GOOD 2021 - pb - ]: - 2021 - PB ICON (chg by text)
  751.    iconlink += '<a class="fpmLink" title="FluidR (User Fav Random)" href=http://www.fluidr.com/photos/' + userid +  ' ">FlUD❤️</a> ';
  752. //iconlink += '<a class="fpmLink" title="FluidR (User Fav Random)" href=http://www.fluidr.com/photos/' + userid + '/favorites/random">' + iconFluidR +'♡</a>';
  753.  
  754. // 🔴 DISABLE  - 2025.05 - FluidR (User Most Interesting)  - [NOT WORKING 2019 - ]: http://www.fluidr.com/photos/sylvain-emmanuel_p
  755. //iconlink += '<a class="fpmLink" title="FluidR (User Most Interesting)" href=http://www.fluidr.com/photos/' + userid + '">'+ iconFluidR +'</a>';
  756.  
  757. //iconlink += '>';
  758.  
  759. // 🔴 DISABLE - 2025.05 - [BROKEN 2019 - TOTALY]//
  760.    // DISABLE - FlickeFlu (User Favorites) LETTRE - [PB 2019 - ]:  http://flickeflu.com/photos/favorites/15064538@N00
  761. //iconlink += '<a class="fpmLink" title="FlickeFlu (User Favorites)" href="http://flickeflu.com/photos/favorites/' + userid + '">FlU</a> ';
  762.  
  763.  
  764. // 🔴 DISABLE - 2025.05 - [BROKEN 2019 - TOTALY]//
  765. // 2019 - DISABLE (ONLY PUB) - FFFFlckkR (Fav Random) - [TEST 2017 - OK]:
  766. //iconlink += '<a class="fpmLink" title="User (FFFFlckkR Fav Random)" href=http://fffflckr.com/#/' + userid + '>' + iconFFFFlckkR + '</a>';
  767.  
  768.  
  769. //   iconlink += '>  ';
  770.  
  771. // 🔴 DISABLE - 2025.05 - PortFolio (User PhotoStream) - [TEST 2019 - OK but no login]
  772. // http://portfotolio.net/bruno-decembre/favorites
  773. // exemple : iconlink += '<a class="fpmLink" title="FluidR (User Fav Random)" href=http://www.fluidr.com/photos/' + userid + '/favorites/random">' + iconFluidR +'♡</a>';
  774. //iconlink += '<a class="fpmLink" title="User Favs (PortFolio User Favs)" href=http://portfotolio.net/' + userid +'>' + iconPortFotoLio +'</a>';
  775.  
  776. // 🔴 DISABLE - 2025.05 - BROKEN 2017
  777. // LurVely (User Most Interesting) LETTRE - [GOOD 2015 - ]: :http://www.lurvely.com/photographer/15064538_N00/
  778. //iconlink += '<a class="fpmLink" title="LurVely (User Most Interesting)" href="http://www.lurvely.com/photographer/' + userid + '">LuR</a> ';
  779.  
  780. // 🔴 DISABLE -2025.05 - BROKEN 2014 //
  781. // Tafoni) Favorites Explorer (User Favs) PB USERNAME  - [BROKEN 2014 - TOTALY]:
  782. // http://www.tafoni.net/flickr/favorites/?of=molekularshik&all=y
  783.    //disable  iconlink += '<a class="fpmLink" title="Favs Explorer" href="http://www.tafoni.net/flickr/favorites/index.php?of=' + userid  + '">' + iconFavExplo + '</a> ';
  784.  
  785. // 🔴 DISABLE - 2025.05 - [BROKEN 2014 - TOTALY]//
  786. //(ALL Tafoni) REVERSE Favorites Explorer (User Favs) PB USERNAME  -
  787. // http://www.tafoni.net/flickr/favorites/index.php?of=decembre&by=eduardoizq.tumblr.com&all=y
  788. //http://www.tafoni.net/flickr/favorites/index.php?of=decembre&by=eduardoizq.tumblr.com&all=y
  789. //http://www.tafoni.net/flickr/favorites/index.php?of=decembre&by=brookeshaden&all=y
  790. //http://www.tafoni.net/flickr/favorites/index.php?of=decembre&by=sol+exposure&all=y
  791. //disable  iconlink += '<a class="fpmLink" title=" Revers Favs Explorer" href="http://www.tafoni.net/flickr/favorites/index.php?of=decembre&by=' + userid  + '&all=y">' + iconFavExplo + '</a> ';
  792.  
  793. // 🔴 DISABLE - 2025.05 - (Tafoni) Favorites Explorer -  (NO)Problem buddtid   - [BROKEN 2014 - TOTALY]:
  794.  //disable  iconlink += '<a class="fpmLink" title="View Favorites Explorer" href="http://www.tafoni.net/flickr/favorites/index.php?of=decembre&by=' + buddyid + '">Fe</a> ';
  795.  
  796. // 🔴 DISABLE - 2025.05 - Photo.Medvekoma.net (User Favorites)  - [BROKEN 2014 - TOTALY]:
  797. //disable  iconlink += '<a class="fpmLink" title="User Favorites (Photo.Medvekoma.net)" href="http://photo.medvekoma.net/Favorites/' + userid + '">' + iconPhotoMedvekoma + '</a> ';
  798.  
  799. // 🔴 DISABLE - 2025.05 - GagaLabs (User Most Interesting) - [BROKEN 2014 - TOTALY]:
  800. //disable  iconlink += '<a class="fpmLink" title="User Most Interesting (GagaLabs)" href="http://apps.gagalabs.com/flickr/interestingby?id=' + userid + '">' + iconGaGaLabsINT + '</a> ';
  801.  
  802. // 🔴 DISABLE - 2025.05 - (find by username) PB USERNAME - need to CHANGE ICON to BASE 64
  803.  
  804. // 🔴 DISABLE - 2025.05 - LfVR (User)
  805. //disable  iconlink += '<a class="fpmLink" title="User (Lfvr)" href=http://webdev.yuan.cc/lfvr/flickr.proxy.php?method=flickr.people.findByUsername&username=">' + username + '>' + iconLfVR + '</a>';
  806.  
  807. // 🔴 DISABLE - 2025.05 - Flickr (View/Change Relationship) :
  808.   //disable iconlink += '<a style="text-decoration:none" title="View/Change Relationship" href="http://www.flickr.com/relationship.gne?id=' + userid + '">' + iconcont + '</a> '; // onclick="_ge(\'person_hover\').hover_add_contact(); return false;"
  809.  
  810.  
  811. // REMOVE BRACKET - 2018
  812.   iconlink += '</b>. ';
  813.  
  814.   return iconlink;
  815. }
  816. win.makeLinks=makeLinks; // make the function available to other scripts too :)
  817.  
  818. // BEGIN fpm links to photostream and profile pages - WORKING for USER COLLECTIONS but NOT PROFILE ???
  819.   function addfpmtophotostreamandprofileheader() {
  820.     dasec=document.getElementsByClassName("cover-photo-holder");
  821. //    dasec=document.getElementsByClassName("avatar");
  822.     if(dasec[0]) {
  823.       pmsp=document.createElement('span');
  824.       pmsp.style.position='absolute';
  825.       pmsp.style.left='0px';
  826.       pmsp.style.top='-15px';
  827.       pmsp.style.fontWeight='normal';
  828.       pmsp.style.fontSize= '11px';
  829.       dah1=document.getElementsByTagName('h1')[0];
  830.       buddyhtml=document.getElementsByClassName('sn-avatar')[0].innerHTML;
  831.       bdid=grabuserid(buddyhtml).split('_')[0];
  832.       pmsp.innerHTML=makeLinks(bdid);
  833.       dah1.appendChild(pmsp);
  834.     }
  835.   } // END Add fpm links to header of photostream pages
  836.  
  837. /* ******************************** */
  838.  
  839.  
  840. if (document.location.href.match('/photos/')) {
  841.   if (document.location.href.match('/sizes/')) {
  842.     datds=document.getElementsByClassName('Owner')
  843.     usid=grabuserid(datds[0].getElementsByTagName('a')[0].innerHTML);
  844.     datds[0].innerHTML+=makeLinks (usid);
  845.     return;
  846.  
  847.   }
  848.  
  849.  
  850.   /// TEST PHOTO PAGE - OK (Need CSS)
  851.   // TEST QUERY CSS SELECTOR - NO
  852.   // document.querySelectorAll("span.a, span.c");
  853.   // datds=document.querySelectorAll(".fluid.html-photo-page-scrappy-view .attribution-view .avatar[data-person-nsid*="@N"]");
  854. /*
  855.   else if (document.location.href.match('/photos/')) {
  856. //    datds=document.getElementById('faves-right').getElementsByTagName('li');
  857.    datds=document.getElementsByClassName('attribution-view') ;
  858.     for (i=0;i<datds.length;i++){
  859.           usid=grabuserid(datds[i].innerHTML);
  860.           datds[i].innerHTML+=makeLinks(usid);
  861.     }
  862.     return;
  863.   }
  864. */
  865. //  OK - PHOTO + SET - WORKING
  866.  
  867.   else if (document.location.href.match('/photos/')) {
  868.     dah3s=document.getElementsByClassName('avatar person medium');
  869.     if(dah3s.length){
  870.       usid=dah3s[0].getAttribute('data-person-nsid');
  871.       dah3s[0].innerHTML +=makeLinks(usid);
  872.       }
  873.  
  874.   }
  875.  
  876.  // TEST ALBUM (Originaly WORKING FOR SETS) - NOT WORKING - STRange work in Console
  877.   else  if (document.location.href.match('/albums/')) {
  878.     dah3s=document.getElementsByClassName('avatar person medium');
  879.     if(dah3s.length){
  880.       usid=dah3s[0].getAttribute('data-person-nsid');
  881.       dah3s[0].innerHTML +=makeLinks(usid);
  882.       }
  883.  
  884. }
  885.  
  886.   // people who favourited this photo page
  887.   else if (location.href.match(/\/[0-9]+\/favorites\/$/)) {
  888.     datds=document.getElementById('faves-right').getElementsByTagName('li');
  889.     for (i=0;i<datds.length;i++){
  890.           usid=grabuserid(datds[i].innerHTML);
  891.           datds[i].innerHTML+=makeLinks(usid);
  892.     }
  893.     return;
  894.   }
  895.  
  896.   // galleries pages - PB
  897.   else if (location.href.match(/\/galleries\//)) {
  898.     //curated image owners
  899.     datds=document.getElementsByClassName('curator_chunk');
  900.     for (i=0;i<datds.length;i++) {
  901.       usid=grabuserid(datds[i].parentNode.parentNode.getElementsByClassName('curator_icon')[0].innerHTML);
  902.       //win.console.log(usid);
  903.       datds[i].getElementsByTagName('p')[1].innerHTML=datds[i].getElementsByTagName('p')[1].innerHTML+ ' &nbsp;' + makeLinks(usid) ;
  904.     }
  905.     //commenters
  906.     cowners=getElementsByClassName('HeyBuddy');
  907.     ccontents=getElementsByClassName('Comment');
  908.     for(x=0;x<cowners.length;x++) {
  909.       buddyid=grabuserid(cowners[x].innerHTML);
  910.       ccontents[x].innerHTML=ccontents[x].innerHTML.replace('says:', makeLinks(buddyid) + 'says:');
  911.     }
  912.  
  913.  
  914.   }
  915.   // Add fpm links to header of photostream pages
  916.   addfpmtophotostreamandprofileheader();
  917.  
  918.   // widget is section for owner of photo - only on old style photo page
  919.   original = getElementsByClassName('Widget');
  920.   if (original[0]) {
  921.     originalID = grabuserid(original[0].innerHTML);
  922.     if (originalID != 'undefined') {
  923.       aspan=document.createElement('span');
  924.       aspan.innerHTML='&nbsp;' + makeLinks(originalID);
  925.       original[0].appendChild(aspan);
  926.     }
  927.   }
  928. /*
  929.   // owner of photo on new photo page layout
  930.   original=document.getElementsByClassName("flickr-user");
  931.   if (original[0]) {
  932.     originalID = original[0].getAttribute('nsid');
  933.     if (originalID != 'undefined') {
  934.       aspan=document.createElement('span');
  935.       aspan.innerHTML=makeLinks(originalID);
  936.       //original[0].appendChild(aspan);
  937.       document.getElementById('photo-story-attribution').parentNode.insertBefore(aspan,document.getElementById('photo-story-attribution').nextSibling)
  938.     }
  939.   }
  940. */
  941. /*
  942. // TEST PHOTO PAGE - NOT WORKING
  943. // .medium[data-person-nsid$="@N04"]
  944. original=document.getElementsByClassName('medium');
  945.   if (original[0]) {
  946.     originalID = original[0].getAttribute('data-person-nsid');
  947.     if (originalID != 'undefined') {
  948.       aspan=document.createElement('span');
  949.       aspan.innerHTML=makeLinks(originalID);
  950.       //original[0].appendChild(aspan);
  951.  
  952.     }
  953.   }
  954. */
  955.   //old style photo comments
  956.   underphotonode = document.getElementById('DiscussPhoto');
  957.   if (underphotonode) {
  958.     cowners=getElementsByClassName('comment-owner');
  959.     ccontents=getElementsByClassName('comment-content');
  960.     for(x=0;x<cowners.length;x++) {
  961.       buddyid=grabuserid(cowners[x].innerHTML);
  962.       ccontents[x].innerHTML=ccontents[x].innerHTML.replace('says:', makeLinks(buddyid) + 'says:');
  963.     }
  964.   }
  965.  
  966.   //new style photo comments
  967.   fpmlinks_newphotopage ();
  968.  
  969. // OK - ACTIVITY - WORKING
  970.  
  971. } else if (location.href.match(/\/activity/) || location.href.match(/recent\_activity\.gne/) || location.href.match(/photos\_comments\.gne/)) {
  972.  
  973.     // BEGIN deal with new /activity/ page
  974. // WORKING (location.href.match(/\/activity/)
  975.     wholist=document.getElementsByClassName('act-who');
  976.     for(x=0;x<wholist.length;x++) {
  977.       buddyid=grabuserid(wholist[x].innerHTML);
  978.       if(wholist[x].parentNode.getElementsByClassName('act-content').length)
  979.         wholist[x].parentNode.getElementsByClassName('act-content')[0].innerHTML=wholist[x].parentNode.getElementsByClassName('act-content')[0].innerHTML.replace('said:', makeLinks(buddyid) + ' ' + 'said:');
  980.       else
  981.         wholist[x].parentNode.innerHTML=wholist[x].parentNode.innerHTML.replace('added ', makeLinks(buddyid) + ' ' + 'added ');
  982.     }
  983.     // END deal with new /activity page
  984.  
  985.     if(location.href.match(/photos\_comments\.gne/)) {
  986.       datds=getElementsByClassName("Who");
  987.       for(j=0;j<datds.length;j++) {
  988.         buddyid = grabuserid(datds[j].innerHTML);
  989.         datds[j].innerHTML += '&nbsp;' + makeLinks(buddyid);
  990.       }
  991.     }
  992.   }
  993.  
  994.  //  OK - CONTACTS PAGES - WORKING
  995.   else if (location.href.match(/\/contacts/)) {
  996.  
  997.     ciconlist=document.getElementsByClassName("contact-list-bicon");
  998.     cnamelist=document.getElementsByClassName("contact-list-name");
  999.     for(x=0;x<ciconlist.length;x++) {
  1000.       //console.log(x);
  1001.       usid=grabuserid(ciconlist[x].innerHTML);
  1002.       lspan=document.createElement('span');
  1003.       lspan.style.display='inline';
  1004.       lspan.innerHTML='&nbsp;&nbsp;' + makeLinks(usid);
  1005.       theeh=cnamelist[x+1].getElementsByTagName('a')[0];
  1006.       theeh.parentNode.insertBefore(lspan, theeh.nextSibling);
  1007.  
  1008.     }
  1009. // TEST CONTACTS 2 NOT WORK - - https://www.flickr.com/people/59474022@N04/contacts/
  1010. /*
  1011.   else if (location.href.match(/\/contacts/)) {
  1012.  
  1013.     ciconlist=document.getElementsByClassName("PeopleResults");
  1014.     cnamelist=document.getElementsByClassName("Who>p>a");
  1015.     for(x=0;x<ciconlist.length;x++) {
  1016.       //console.log(x);
  1017.       usid=grabuserid(ciconlist[x].innerHTML);
  1018.       lspan=document.createElement('span');
  1019.       lspan.style.display='inline';
  1020.       lspan.innerHTML='&nbsp;&nbsp;' + makeLinks(usid);
  1021.       theeh=cnamelist[x+1].getElementsByTagName('a')[0];
  1022.       theeh.parentNode.insertBefore(lspan, theeh.nextSibling);
  1023.  
  1024.     }
  1025. */
  1026.     // TEST CONTACTS USERS PAGE
  1027.     // https://www.flickr.com/people/66926995@N03/contacts/
  1028.     // END TEST
  1029.  
  1030.   }
  1031.  
  1032. // FORUM / HELP
  1033.   else if (location.href.match(/flickr\.com\/help\/forum\//) || location.href.match(/flickr\.com\/groups\//)) {
  1034.  
  1035.     if(location.href.match("\/admin\/") && document.getElementById('MemberList')) {
  1036.       dah3s=document.getElementById('MemberList').getElementsByTagName('tr');
  1037.       for(i=1;i<dah3s.length;i++) {
  1038.         usid=grabuserid(dah3s[i].getElementsByTagName('td')[0].innerHTML);
  1039.         dah3s[i].getElementsByTagName('td')[1].innerHTML=dah3s[i].getElementsByTagName('td')[1].innerHTML.replace('</a>','</a>&nbsp;&nbsp;'+makeLinks(usid));
  1040.       }
  1041.     }
  1042. // ADMIN PHOTO - 2021.02 - NOT WORK - https://www.flickr.com/groups/portrait-faces-master-view/admin/pending
  1043.     if(location.href.match("\/admin\/pending")) {
  1044.       dah3s=document.getElementsByClassName('gPendWho');
  1045.       for(i=0;i<dah3s.length;i++) {
  1046.         usid=grabuserid(dah3s[i].getElementsByTagName('a')[0].innerHTML);
  1047.         dah3s[i].innerHTML += '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' + makeLinks(usid);
  1048.       }
  1049.     }
  1050.  
  1051. // 2018 - TEST CONTACTS USER PAGE - NOT WOKING
  1052. // https://www.flickr.com/people/24312830@N05/contacts/
  1053. /*
  1054.     if(location.href.match("\/contacts\/")) {
  1055.       dah3s=document.getElementsByClassName('Who');
  1056.       for(i=0;i<dah3s.length;i++) {
  1057.         usid=grabuserid(dah3s[i].getElementsByTagName('a')[0].innerHTML);
  1058.         dah3s[i].innerHTML += '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' + makeLinks(usid);
  1059.       }
  1060.     }
  1061.  
  1062. */
  1063.  
  1064.  
  1065. // WORKING
  1066.     // we must be in a forum/group
  1067.     // add pm icon to first post (special case)
  1068.     if (document.getElementById('DiscussTopic')) {
  1069.       dagoodstuff = document.getElementById('DiscussTopic');
  1070.       firstpostid = grabuserid(dagoodstuff.getElementsByClassName("Who")[0].innerHTML);
  1071.       //firstpostid = grabuserid(dagoodstuff.innerHTML);
  1072.       if (firstpostid == 'undefined')
  1073.         return;
  1074.       //dagoodstuff.getElementsByTagName('table')[0].getElementsByTagName('td')[1].getElementsByTagName('h4')[0].innerHTML = dagoodstuff.getElementsByTagName('table')[0].getElementsByTagName('td')[1].getElementsByTagName('h4')[0].innerHTML.replace('says:', makeLinks(firstpostid) + 'says:');
  1075.       getElementsByClassName('Said')[0].getElementsByTagName('h4')[0].innerHTML = getElementsByClassName('Said')[0].getElementsByTagName('h4')[0].innerHTML.replace('says:', makeLinks(firstpostid) + 'says:');
  1076.     }
  1077.     else
  1078.       return;
  1079.     // add pm icon to replies
  1080.     var tables = document.getElementsByTagName('table');
  1081.     for (i=0, l=tables.length; i<l; i++) {
  1082.       if (tables[i].className == 'TopicReply') {
  1083.         var tds = tables[i].getElementsByTagName('td');
  1084.         for (var j=0, xl=tds.length; j<xl; j++) {
  1085.           if (j%2 == 0) {
  1086.             buddyid = grabuserid(tds[j].innerHTML);
  1087.             //unsafeWindow.console.log(buddyid);
  1088.         } else {
  1089.           if (buddyid != 'undefined') {
  1090.             tds[j].getElementsByTagName('h4')[0].innerHTML = tds[j].getElementsByTagName('h4')[0].innerHTML.replace('says:', makeLinks(buddyid) + 'says:');
  1091.           }
  1092.         }
  1093.       }
  1094.     }
  1095.   }
  1096. }
  1097.  
  1098.   else if (location.href.match(/flickr\.com\/people/)) {
  1099.     addfpmtophotostreamandprofileheader()
  1100.     /*
  1101.     budtd=getElementsByClassName('Buddy');
  1102.     usid=grabuserid(budtd[0].innerHTML);
  1103.     inftd=document.getElementsByTagName('h1')[0];
  1104.     inftd.innerHTML=inftd.innerHTML + " <span style='font-weight:normal;font-size:11px'>" + makeLinks(usid) + "</span>";
  1105.     */
  1106.   }
  1107.   /*
  1108.   else if (location.href.match("messages_sent_read")) {
  1109.     dah3s=document.getElementsByTagName('h3');
  1110.     for (i=0;i<dah3s.length;i++)
  1111.       if(dah3s[i].innerHTML.match('buddyicons')){
  1112.         usid=grabuserid(dah3s[i].innerHTML);
  1113.         dah3s[i].innerHTML=dah3s[i].innerHTML+ " <span style='font-weight:normal;font-size:11px'>" + makeLinks(usid) + "</span>";
  1114.       }
  1115.   }
  1116.   else if (location.href.match("messages_read")) {
  1117.     dah3s=document.getElementsByClassName('clearfix');
  1118.     if(dah3s[0].innerHTML.match('buddyicons')){
  1119.       usid=grabuserid(dah3s[0].innerHTML);
  1120.       dah3s[0].innerHTML+= " <span style='font-weight:normal;font-size:11px'>" + makeLinks(usid) + "</span>";
  1121.       }
  1122.   }
  1123.   */
  1124.  
  1125. // MAIL - OK
  1126.   else if (location.href.match(/\/mail\//)) {
  1127.     dah3s=document.getElementsByClassName('flickr-user flickrmail-to');
  1128.     if(dah3s.length){
  1129.       usid=dah3s[0].getAttribute('nsid');
  1130.       dah3s[0].innerHTML += "<br/><span style='font-weight:normal;font-size:11px'>" + makeLinks(usid) + "</span>";
  1131.       }
  1132.   }
  1133.   else if (location.href.match(/\/search\//)) {
  1134.     if(location.href.match(/\/groups\//) || location.href.match(/\/forum\//)) {
  1135.       if(!location.href.match('&m=pool')) {
  1136.         datds=document.getElementsByTagName('td');
  1137.         for (i=0;i<datds.length;i++)
  1138.           if(datds[i].getAttribute('class')=='Who') {
  1139.             usid=grabuserid(datds[i].innerHTML);
  1140.             datds[i+1].getElementsByTagName('b')[0].innerHTML=datds[i+1].getElementsByTagName('b')[0].innerHTML.replace('says:', '&nbsp;' + makeLinks(usid) + 'says:');
  1141.           }
  1142.       }
  1143.       else {
  1144.         datds=document.getElementsByClassName('PicFrom');
  1145.         for (i=0;i<datds.length;i++) {
  1146.           usid=grabuserid(datds[i].innerHTML);
  1147.           datds[i].getElementsByTagName('b')[0].innerHTML += ' ' +makeLinks(usid);
  1148.         }
  1149.  
  1150.       }
  1151.     }
  1152.     else if (location.href.match(/\/search\/people\//)) {
  1153.       datds=document.getElementsByTagName('td');
  1154.       for (i=0;i<datds.length;i++)
  1155.         if(datds[i].getAttribute('class')=='Icon') {
  1156.           usid=grabuserid(datds[i].innerHTML);
  1157.           datds[i+1].getElementsByTagName('div')[0].innerHTML= datds[i+1].getElementsByTagName('div')[0].innerHTML + makeLinks(usid);
  1158.         }
  1159.     }
  1160.     else {
  1161.       datds=getElementsByClassName('ListBuddyIconThings'); // must be a photo search...
  1162.       for (i=0;i<datds.length;i++)
  1163.         {
  1164.           usid=grabuserid(datds[i].innerHTML);
  1165.           datds[i].parentNode.getElementsByTagName('h3')[0].getElementsByTagName('small')[0].innerHTML += '&nbsp;' + makeLinks(usid);
  1166.         }
  1167.  
  1168.  
  1169.     }
  1170.  
  1171. }
  1172.  
  1173.  
  1174. //var FPMEndTime=new Date();
  1175. //var FPMExecutionTime=FPMEndTime-FPMStartTime;
  1176. //document.body.appendChild(document.createTextNode('FlickrPM Execution Time = ' + FPMExecutionTime + 'ms'));
  1177.  
  1178. // END Flickr PM Code
  1179.  
  1180. })();
Add Comment
Please, Sign In to add comment