imgur.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. DESCRIPTION: This is a file that after installing a greasemonkey
  3. extension can be used to convert imgur to any rimgo instance.
  4. NOTE: I might change this really often because instances may fail.
  5. ----
  6. Copyright (C) 2021 Zortazert and other contributors
  7. This program is free software: you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation, either version 3 of the License, or (at
  10. your option) any later version.
  11. This program is distributed in the hope that it will be useful, but
  12. WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. General Public License for more details.
  15. You should have received a copy of the GNU General Public License
  16. along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. */
  18. // ==UserScript==
  19. // @name imgur to rimgo
  20. // @namespace Zera's userscripts
  21. // @match http://imgur.com/*
  22. // @match https://imgur.com/*
  23. // @match http://i.imgur.com/*
  24. // @match https://i.imgur.com/*
  25. // @match http://www.imgur.com/*
  26. // @match https://www.imgur.com/*
  27. // @grant none
  28. // @run-at document-start
  29. // ==/UserScript==
  30. url = location.href
  31. url = url.replace(/\bwww\.\b/, "")
  32. if (url.includes("i.imgur.com")){
  33. url = url.replace("i.imgur.com","rimgo.totaldarkness.net")
  34. location.href = url
  35. }
  36. else{
  37. url = url.replace("imgur.com","rimgo.totaldarkness.net")
  38. location.href = url
  39. }