Redirect to high res image

Automatically redirects the browser to the full resolution image for any landing page on imagetwist.com imgspice.com acidimg.cc imx.to pixhost.to imagebam.com imgbox.com kropic.com vipr.im

  1. // ==UserScript==
  2. // @name Redirect to high res image
  3. // @namespace RedirectToHiRes
  4. // @match https://*.imagetwist.com/*
  5. // @match https://*.imgspice.com/*
  6. // @match https://*.turboimagehost.com/*.html
  7. // @match https://*.acidimg.cc/*
  8. // @match https://*.imx.to/*
  9. // @match https://*.pixhost.to/*
  10. // @match https://*.imagebam.com/view/*
  11. // @match https://*.imgbox.com/*
  12. // @match https://*.kropic.com/*
  13. // @match https://*.vipr.im/*
  14. // @match https://*.imagevenue.com/*
  15. // @grant none
  16. // @version 1.4
  17. // @author codingjoe
  18. // @author vt-idiot
  19. // @description Automatically redirects the browser to the full resolution image for any landing page on imagetwist.com imgspice.com acidimg.cc imx.to pixhost.to imagebam.com imgbox.com kropic.com vipr.im
  20. // @run-at document-idle
  21. // @license MIT
  22. // ==/UserScript==
  23.  
  24.  
  25. function goToImage() {
  26. location.href = document.querySelector(".centred").src;
  27. }
  28.  
  29. (function() {
  30. 'use strict';
  31. let img;
  32.  
  33. if (location.href.includes("imagetwist.com")) {
  34. let arr = Array.from(document.querySelectorAll("a")).filter(r => r.innerText === "Continue to your image");
  35. img = document.querySelector(".pic");
  36.  
  37. if (img) {
  38. location.href = img.src;
  39. } else {
  40. if (arr.length > 0) {
  41. arr[0].click();
  42. }
  43. }
  44. } else if (location.href.includes("imgspice.com")) {
  45. img = document.querySelector("#imgpreview");
  46.  
  47. if (img) {
  48. location.href = img.src;
  49. }
  50. } else if (location.href.includes("turboimagehost.com")) {
  51. img = document.querySelector(".uImage");
  52.  
  53. if (img) {
  54. location.href = img.src;
  55. }
  56. } else if (location.href.includes("acidimg.cc")) {
  57. let btn = document.querySelector("input[type=submit]");
  58.  
  59. if (btn) {
  60. btn.click();
  61.  
  62. window.setTimeout(function() {
  63. goToImage();
  64. }, 2000);
  65. } else {
  66. goToImage();
  67. }
  68. } else if (location.href.includes("imx.to")) {
  69. let blueButton = document.querySelector(".button") || document.querySelector("#continuebutton");
  70.  
  71. if (blueButton != null) {
  72. blueButton.click();
  73. window.setTimeout(function() {
  74. goToImage();
  75. }, 500);
  76. } else {
  77. goToImage();
  78. }
  79. } else if (location.href.includes("pixhost.to")) {
  80. img = document.querySelector("img#image");
  81.  
  82. if (img) {
  83. // redirect to full res
  84. location.href = img.src;
  85. }
  86. } else if (location.href.includes("imagebam.com")) {
  87. let anchor = document.querySelector("#continue > a");
  88. img = document.querySelector("img.main-image");
  89. if (img) {
  90. // redirect to full res
  91. location.href = img.src;
  92. } else {anchor.click();}
  93. } else if (location.href.includes("imgbox.com")) {
  94. img = document.querySelector("img.image-content");
  95.  
  96. if (img) {
  97. // redirect to full res
  98. location.href = img.src;
  99. }
  100. } else if (location.href.includes("kropic.com")) {
  101. let btn = Array.from(document.querySelectorAll("input[type='submit']")).filter(r => r.value === "Continue to image...");
  102. let img = document.querySelector("img.pic");
  103.  
  104. if (img) {
  105. // redirect to full res
  106. location.href = img.src;
  107. } else {
  108. if (btn.length > 0) {
  109. // click "Continue to image..."
  110. btn[0].click();
  111. }
  112. }
  113. } else if (location.href.includes("vipr.im")) {
  114. img = document.querySelector(".img-responsive");
  115.  
  116. if (img) {
  117. location.href = img.src;
  118. }
  119. } else if (location.href.includes("imagevenue")) {
  120. let img = document.querySelector("#main-image");
  121. if (img) {location.href = img.src;}
  122. }
  123.  
  124. return false;
  125. })();