Sleazy Fork is available in English.

Download photos from Badoo

Download photos from Badoo. Useful to check if they are stolen photos appearing somewhere else on the web using Google Images or Tineye.

  1. // ==UserScript==
  2. // @name Download photos from Badoo
  3. // @namespace StephenP
  4. // @version 1.0
  5. // @description Download photos from Badoo. Useful to check if they are stolen photos appearing somewhere else on the web using Google Images or Tineye.
  6. // @author StephenP
  7. // @icon data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD9OHgA+Dl+APg9eAD8RYcA+UeOAPdSmgD9X6QA+WayAPlruwDzfNIA8oDZAPWQ5wDykuwA8Zf0APCb+gAAAAAA/wASEQAgAP/yIiEiIhIgDwESAiIiMgAhEiEjiZhCISECIWvu7rYhIBIW7u297WIREkvscze+tCIjjuZ8yH7YIRKutM7sTOkREq7b7u686iEifN3t3u3YEQIZ3cds7ZIhEiJFQiRUEQEBASAAAAIiEfARESIiIgEf/xAQEBAQEP/AAwAAgAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABAADAAwAA
  8. // @match https://badoo.com/*
  9. // @match https://*.badoo.com/*
  10. // ==/UserScript==
  11. var isGalleryAlreadyOpen=false;
  12. var observer2;
  13. (function(){
  14. const targetNode = document.getElementsByClassName('page__content js-page-content')[0];
  15. const config = { attributes: false, childList: true, subtree: true };
  16. const callback = function(mutationsList, observer) {
  17. for(const mutation of mutationsList) {
  18. if (mutation.type === 'childList') {
  19. console.log('A child node has been added or removed.');
  20. if((document.getElementById("mm_cc"))&&(isGalleryAlreadyOpen==false)){
  21. createDlButton();
  22. isGalleryAlreadyOpen=true;
  23. }
  24. else if((!document.getElementById("mm_cc"))&&(isGalleryAlreadyOpen==true)){
  25. isGalleryAlreadyOpen=false;
  26. try{
  27. observer2.disconnect();
  28. }
  29. catch(err){
  30. console.log("Cannot disconnect observer2. It should be a MutationObserver, but it is a "+observer2);
  31. }
  32. }
  33. }
  34. else if (mutation.type === 'attributes') {
  35. console.log('The ' + mutation.attributeName + ' attribute was modified.');
  36. }
  37. }
  38. };
  39. const observer = new MutationObserver(callback);
  40. observer.observe(targetNode, config);
  41. })();
  42.  
  43. function createDlButton(){
  44. const dlButton=document.createElement("DIV");
  45. dlButton.className="photo-gallery__abuse";
  46. dlButton.style.bottom="70px";
  47. dlButton.innerHTML="▼";
  48. const photoHolder=document.getElementsByClassName("js-mm-photo-holder")[0];
  49. photoHolder.parentNode.appendChild(dlButton);
  50. addLink(photoHolder,dlButton);
  51. const config2 = { attributes: false, childList: true, subtree: true };
  52. const callback = function(mutationsList, observer2) {
  53. for(const mutation of mutationsList) {
  54. if(mutation.type === 'childList') {
  55. if(!photoHolder.parentNode.parentNode.className.includes("mm_private_photos")){
  56. dlButton.style.display="flex";
  57. addLink(photoHolder,dlButton);
  58. }
  59. else{
  60. dlButton.style.display="none";
  61. }
  62. }
  63. }
  64. };
  65. observer2 = new MutationObserver(callback);
  66. observer2.observe(photoHolder, config2);
  67. }
  68. function addLink(photoHolder,dlButton){
  69. if(photoHolder.getElementsByTagName("VIDEO").length==0){
  70. dlButton.onclick=function(){window.open(photoHolder.getElementsByTagName("img")[0].getAttribute("src"),"_blank")};
  71. }
  72. else{
  73. dlButton.onclick=function(){window.open(photoHolder.getElementsByTagName("video")[0].getAttribute("src"),"_blank")};
  74. }
  75. }