Yet Another Imagehost Redirect

Remove ads from ImageHost

  1. // ==UserScript==
  2. // @name Yet Another Imagehost Redirect
  3. // @namespace H2Studio
  4. // @description Remove ads from ImageHost
  5. // @require http://code.jquery.com/jquery-1.11.3.min.js
  6. // @include *://imgdream.net/viewer.php*
  7. // @include *://daily-img.com/viewer.php*
  8. // @include *://www.imgbabes.com/*jpeg.html
  9. // @include *://www.imgbabes.com/*jpg.html
  10. // @include *://imgclick.net/*jpeg.html
  11. // @include *://imgclick.net/*jpg.html
  12. // @include *://*imgseeds.com/img*
  13. // @version 1.3
  14. // ==/UserScript==
  15.  
  16.  
  17. if(UrlContains("imgdream.net") ||
  18. UrlContains("daily-img.com"))
  19. {
  20. GetByHref($("div.text_align_center a:first"));
  21. }
  22. if(UrlContains("imgbabes.com"))
  23. {
  24. GetBySrc($("span#zoomimage img#this_image"));
  25. }
  26. if(UrlContains("imgclick.net"))
  27. {
  28. if( $(".fuckadb form").length > 0) {
  29. $(".fuckadb form").submit();
  30. } else {
  31. GetBySrc($(".pic"));
  32. }
  33. }
  34. if(UrlContains("imgseeds.com"))
  35. {
  36. if( $("#continuetoimage .centred0").length > 0) {
  37. var path = $("#continuetoimage .centred0").attr("src");
  38. path = path.replace("small", "big");
  39. GoTo(path);
  40. } else if ($(".fullimg").length > 0) {
  41. GetBySrc($(".fullimg img"));
  42. }
  43. }
  44. // --------------------------------------------------------------------------------------
  45. // public method-------------------------------------------------------------------------
  46. // --------------------------------------------------------------------------------------
  47. function GetByHref(jHref) {
  48. GoTo(jHref.attr('href'));
  49. }
  50.  
  51. function GetBySrc(jImg) {
  52. GoTo(jImg.attr('src'));
  53. }
  54.  
  55. function GoTo(url) {
  56. window.location.assign(url);
  57. }
  58.  
  59. function UrlContains(urlfragment)
  60. {
  61. return document.URL.indexOf(urlfragment) != -1;
  62. }