Imgur Save to archive.is

Save the imgur page to archive.is

  1. // ==UserScript==
  2. // @name Imgur Save to archive.is
  3. // @namespace http://tampermonkey.net/
  4. // @version 2025-03-27
  5. // @description Save the imgur page to archive.is
  6. // @author hangjeff
  7. // @match https://imgur.com/a/*
  8. // @match https://imgur.com/*
  9. // @match https://imgur.com/gallery/*
  10. // @grant none
  11. // @require https://code.jquery.com/jquery-3.7.1.slim.min.js
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16.  
  17. // Your code here...
  18. let Imgur_Url = window.location.href;
  19. console.log(Imgur_Url);
  20.  
  21. let Bootstrap = $('<link>', {
  22. href: 'https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css',
  23. rel: 'stylesheet'
  24. }).appendTo('head');
  25.  
  26. $('body').css('background-color', '#171544');
  27.  
  28. let form = $('<form>', {
  29. id: 'submiturl',
  30. action: 'https://archive.is/submit/',
  31. method: 'GET',
  32. target: '_blank',
  33. class: 'row justify-content-center'
  34. });
  35.  
  36. form.append(
  37. $('<input>', {
  38. id: 'url',
  39. type: 'hidden',
  40. name: 'url',
  41. value: Imgur_Url
  42. })
  43. );
  44.  
  45. form.append(
  46. $('<input>', {
  47. type: 'submit',
  48. value: 'Save to archive.is',
  49. tabindex: '1',
  50. class: 'btn btn-primary col-1'
  51. })
  52. );
  53. $('body').prepend(form);
  54. })();