Bypass 18+

Bypass 18+ checking forever

  1. // ==UserScript==
  2. // @name Bypass 18+
  3. // @description Bypass 18+ checking forever
  4. // @namespace https://github.com/FlandreDaisuki
  5. // @version 1.2.1
  6. // @author FlandreDaisuki
  7. // @match *://www.amazon.co.jp/*
  8. // @match *://gyutto.com/*
  9. // @match *://www.dlsite.com/*
  10. // @match *://ec.toranoana.jp/*
  11. // @match *://www.ptt.cc/*
  12. // @match *://www.melonbooks.co.jp/*
  13. // @match *://www.suruga-ya.jp/*
  14. // @match *://www.javlibrary.com/*
  15. // @include *://javdb*.com/*
  16. // @run-at document-start
  17. // @grant none
  18. // @noframes
  19. // ==/UserScript==
  20.  
  21. /* cSpell:ignore gyutto dlsite toranoana melonbooks javlibrary */
  22. /* cSpell:ignore adflg adultchecked adalt suruga uniqid */
  23. /* eslint-disable no-unused-expressions */
  24.  
  25. class CookieBuilder {
  26. constructor(k, v) {
  27. this['🍪'] = new Map([[k, v]]);
  28. this['🍪'].set('secure', '');
  29. this['🍪'].set('same-site', 'Lax');
  30. this['🚗'] = true;
  31. }
  32. expires() {
  33. this['🍪'].set('expires', new Date('2345-06-07T00:00:00').toGMTString());
  34. return this;
  35. }
  36. path(t = '/') {
  37. this['🍪'].set('path', t);
  38. return this.noPath();
  39. }
  40. noPath() {
  41. this['🚗'] = false;
  42. return this;
  43. }
  44. domain(t) {
  45. this['🍪'].set('domain', t);
  46. return this;
  47. }
  48. toString() {
  49. this.expires();
  50. if (this['🚗']) {
  51. this.path();
  52. }
  53. return [...this['🍪']].map((p) => p.join('=')).join('; ');
  54. }
  55. get ['⏰']() {
  56. document.cookie = this.toString();
  57. return 0;
  58. }
  59. }
  60.  
  61. (() => {
  62. const bake = (...args) => new CookieBuilder(...args);
  63. const cookieMap = document.cookie.split('; ')
  64. .reduce((c, s) => {
  65. const i = s.indexOf('=');
  66. c.set(s.slice(0, i), s.slice(i + 1));
  67. return c;
  68. }, new Map());
  69.  
  70. const host = location.host;
  71. const any = (...args) => args.some(Boolean);
  72.  
  73. if (host === 'www.amazon.co.jp') {
  74. const t = cookieMap.get('session-token');
  75. if (!t) {
  76. fetch('/-/en/black-curtain/save-eligibility/black-curtain')
  77. .then(() => location.reload());
  78. }
  79. bake('session-token', t).domain('amazon.co.jp')['⏰'];
  80. return;
  81. }
  82.  
  83. if (host === 'gyutto.com') {
  84. bake('adult_check_flag', 1).domain('gyutto.com')['⏰'];
  85. bake('user_agent_flag', 1).domain('gyutto.com')['⏰'];
  86. return;
  87. }
  88.  
  89. if (host === 'www.dlsite.com') {
  90. bake('adultchecked', 1).domain('dlsite.com')['⏰'];
  91. bake('uniqid', '0.00000000000').domain('dlsite.com')['⏰'];
  92. return;
  93. }
  94.  
  95. if (host === 'ec.toranoana.jp') {
  96. bake('adflg', 0).domain('ec.toranoana.jp')['⏰'];
  97. return;
  98. }
  99.  
  100. if (host === 'www.melonbooks.co.jp') {
  101. bake('AUTH_ADULT', 1)['⏰'];
  102. return;
  103. }
  104.  
  105. if (host === 'www.suruga-ya.jp') {
  106. bake('adult', 1)['⏰'];
  107. return;
  108. }
  109.  
  110. if (host === 'www.javlibrary.com') {
  111. bake('over18', 18)['⏰'];
  112. return;
  113. }
  114.  
  115. if (any(host === 'www.ptt.cc', host.startsWith('javdb'))) {
  116. bake('over18', 1)['⏰'];
  117. return;
  118. }
  119. })();