iqdb.org移动版

make iqdb.org uses more easier on your phones

  1. // ==UserScript==
  2. // @name iqdb.org移动版
  3. // @name:en iqdb.org for mobile
  4. // @namespace pikashi
  5. // @version 0.10
  6. // @description make iqdb.org uses more easier on your phones
  7. // @description:en make iqdb.org uses more easier on your phones
  8. // @author pks
  9. // @match http://iqdb.org/*
  10. // @match https://iqdb.org/*
  11. // @match http://*.iqdb.org/*
  12. // @match https://*.iqdb.org/*
  13. // @grant none
  14. // ==/UserScript==
  15.  
  16. (function() {
  17. var meta = document.createElement('meta');
  18. meta.name = 'viewport';
  19. meta.content = 'width=device-width, initial-scale=1.0';
  20. document.head.appendChild(meta);
  21.  
  22. var css = document.createElement('style');
  23. css.textContent = `
  24. @media screen and (max-width: 768px) {
  25. body {
  26. font-size: 16px;
  27. }
  28.  
  29. h1 {
  30. font-size: 1.75rem;
  31. }
  32.  
  33. p {
  34. font-size: 0.8rem;
  35. }
  36.  
  37. table {
  38. font-size: 0.75rem !important;
  39. }
  40.  
  41. #url {
  42. min-width: 55vw;
  43. max-width: 60vw;
  44. }
  45.  
  46. #file {
  47. max-width: 55vw;
  48. }
  49.  
  50. form table:last-of-type,form table:last-of-type input {
  51. font-size: 1.25rem !important;
  52. }
  53.  
  54. form table:first-of-type {
  55. max-height: 38vh;
  56. overflow-y: auto;
  57. display: block;
  58. width: 90vw;
  59. }
  60.  
  61. form table:first-of-type th {
  62. white-space: normal;
  63. width: 61vw;
  64. }
  65.  
  66. input[type="submit"] {
  67. width: 27vw;
  68. }
  69.  
  70. input[type="submit"], input[type="file"], input[type="text"] {
  71. height: 35px;
  72. }
  73.  
  74. #pages a {
  75. font-size: 1.3rem;
  76. }
  77. }
  78. `;
  79. document.head.appendChild(css);
  80. })();