Remove Cookies

The companion script for Bypass Paywalls.

  1. // ==UserScript==
  2. // @name Remove Cookies
  3. // @description The companion script for Bypass Paywalls.
  4. // @author Joe Fang (https://github.com/MinecraftFuns)
  5. // @namespace https://github.com/CodeMaintainer/EternityGreek/
  6. // @supportURL https://github.com/CodeMaintainer/EternityGreek/issues
  7. // @icon https://cdn.jsdelivr.net/gh/CodeMaintainer/EternityGreek@0.0.1/assets/remove-cookies-icon-32.png
  8. // @run-at document-start
  9. // @version 0.0.0
  10. // @match *://*.adweek.com/*
  11. // @match *://*.ad.nl/*
  12. // @match *://*.americanbanker.com/*
  13. // @match *://*.ambito.com/*
  14. // @match *://*.baltimoresun.com/*
  15. // @match *://*.barrons.com/*
  16. // @match *://*.bloombergquint.com/*
  17. // @match *://*.bloomberg.com/*
  18. // @match *://*.bndestem.nl/*
  19. // @match *://*.bostonglobe.com/*
  20. // @match *://*.bd.nl/*
  21. // @match *://*.brisbanetimes.com.au/*
  22. // @match *://*.businessinsider.com/*
  23. // @match *://*.caixinglobal.com/*
  24. // @match *://*.centralwesterndaily.com.au/*
  25. // @match *://*.acs.org/*
  26. // @match *://*.chicagotribune.com/*
  27. // @match *://*.corriere.it/*
  28. // @match *://*.chicagobusiness.com/*
  29. // @match *://*.dailypress.com/*
  30. // @match *://*.gelderlander.nl/*
  31. // @match *://*.groene.nl/*
  32. // @match *://*.destentor.nl/*
  33. // @match *://*.speld.nl/*
  34. // @match *://*.tijd.be/*
  35. // @match *://*.volkskrant.nl/*
  36. // @match *://*.demorgen.be/*
  37. // @match *://*.denverpost.com/*
  38. // @match *://*.df.cl/*
  39. // @match *://*.editorialedomani.it/*
  40. // @match *://*.dynamed.com/*
  41. // @match *://*.ed.nl/*
  42. // @match *://*.elmercurio.com/*
  43. // @match *://*.elpais.com/*
  44. // @match *://*.elperiodico.com/*
  45. // @match *://*.elu24.ee/*
  46. // @match *://*.britannica.com/*
  47. // @match *://*.estadao.com.br/*
  48. // @match *://*.examiner.com.au/*
  49. // @match *://*.expansion.com/*
  50. // @match *://*.fnlondon.com/*
  51. // @match *://*.financialpost.com/*
  52. // @match *://*.ft.com/*
  53. // @match *://*.firstthings.com/*
  54. // @match *://*.foreignpolicy.com/*
  55. // @match *://*.fortune.com/*
  56. // @match *://*.genomeweb.com/*
  57. // @match *://*.glassdoor.com/*
  58. // @match *://*.globes.co.il/*
  59. // @match *://*.grubstreet.com/*
  60. // @match *://*.haaretz.co.il/*
  61. // @match *://*.haaretz.com/*
  62. // @match *://*.handelsblatt.com/*
  63. // @match *://*.harpers.org/*
  64. // @match *://*.courant.com/*
  65. // @match *://*.hbr.org/*
  66. // @match *://*.heraldsun.com.au/*
  67. // @match *://*.fd.nl/*
  68. // @match *://*.historyextra.com/*
  69. // @match *://*.humo.be/*
  70. // @match *://*.ilmanifesto.it/*
  71. // @match *://*.inc.com/*
  72. // @match *://*.interest.co.nz/*
  73. // @match *://*.investorschronicle.co.uk/*
  74. // @match *://*.lecho.be/*
  75. // @match *://*.labusinessjournal.com/*
  76. // @match *://*.lanacion.com.ar/*
  77. // @match *://*.repubblica.it/*
  78. // @match *://*.lastampa.it/*
  79. // @match *://*.latercera.com/*
  80. // @match *://*.lavoixdunord.fr/*
  81. // @match *://*.ledevoir.com/*
  82. // @match *://*.leparisien.fr/*
  83. // @match *://*.lesechos.fr/*
  84. // @match *://*.loebclassics.com/*
  85. // @match *://*.lrb.co.uk/*
  86. // @match *://*.latimes.com/*
  87. // @match *://*.mit.edu/*
  88. // @match *://*.technologyreview.com/*
  89. // @match *://*.medium.com/*
  90. // @match *://*.medscape.com/*
  91. // @match *://*.mexiconewsdaily.com/*
  92. // @match *://*.mv-voice.com/*
  93. // @match *://*.nationalgeographic.com/*
  94. // @match *://*.nydailynews.com/*
  95. // @match *://*.nrc.nl/*
  96. // @match *://*.ntnews.com.au/*
  97. // @match *://*.nationalpost.com/*
  98. // @match *://*.nzz.ch/*
  99. // @match *://*.nymag.com/*
  100. // @match *://*.nzherald.co.nz/*
  101. // @match *://*.ocregister.com/*
  102. // @match *://*.orlandosentinel.com/*
  103. // @match *://*.pzc.nl/*
  104. // @match *://*.paloaltoonline.com/*
  105. // @match *://*.parool.nl/*
  106. // @match *://*.postimees.ee/*
  107. // @match *://*.qz.com/*
  108. // @match *://*.quora.com/*
  109. // @match *://*.gelocal.it/*
  110. // @match *://*.republic.ru/*
  111. // @match *://*.reuters.com/*
  112. // @match *://*.sandiegouniontribune.com/*
  113. // @match *://*.sfchronicle.com/*
  114. // @match *://*.scientificamerican.com/*
  115. // @match *://*.seekingalpha.com/*
  116. // @match *://*.slate.com/*
  117. // @match *://*.sofrep.com/*
  118. // @match *://*.statista.com/*
  119. // @match *://*.startribune.com/*
  120. // @match *://*.stuff.co.nz/*
  121. // @match *://*.sun-sentinel.com/*
  122. // @match *://*.techinasia.com/*
  123. // @match *://*.telegraaf.nl/*
  124. // @match *://*.adelaidenow.com.au/*
  125. // @match *://*.theadvocate.com.au/*
  126. // @match *://*.theage.com.au/*
  127. // @match *://*.the-american-interest.com/*
  128. // @match *://*.theathletic.com/*
  129. // @match *://*.theathletic.co.uk/*
  130. // @match *://*.theatlantic.com/*
  131. // @match *://*.afr.com/*
  132. // @match *://*.theaustralian.com.au/*
  133. // @match *://*.bizjournals.com/*
  134. // @match *://*.canberratimes.com.au/*
  135. // @match *://*.thecourier.com.au/*
  136. // @match *://*.couriermail.com.au/*
  137. // @match *://*.thecut.com/*
  138. // @match *://*.dailytelegraph.com.au/*
  139. // @match *://*.thediplomat.com/*
  140. // @match *://*.economist.com/*
  141. // @match *://*.theglobeandmail.com/*
  142. // @match *://*.theherald.com.au/*
  143. // @match *://*.thehindu.com/*
  144. // @match *://*.irishtimes.com/*
  145. // @match *://*.kansascity.com/*
  146. // @match *://*.mercurynews.com/*
  147. // @match *://*.themercury.com.au/*
  148. // @match *://*.mcall.com/*
  149. // @match *://*.thenation.com/*
  150. // @match *://*.thenational.scot/*
  151. // @match *://*.newstatesman.com/*
  152. // @match *://*.nytimes.com/*
  153. // @match *://*.newyorker.com/*
  154. // @match *://*.news-gazette.com/*
  155. // @match *://*.theolivepress.es/*
  156. // @match *://*.inquirer.com/*
  157. // @match *://*.thesaturdaypaper.com.au/*
  158. // @match *://*.seattletimes.com/*
  159. // @match *://*.spectator.com.au/*
  160. // @match *://*.spectator.co.uk/*
  161. // @match *://*.smh.com.au/*
  162. // @match *://*.telegraph.co.uk/*
  163. // @match *://*.thestar.com/*
  164. // @match *://*.wsj.com/*
  165. // @match *://*.washingtonpost.com/*
  166. // @match *://*.thewrap.com/*
  167. // @match *://*.themarker.com/*
  168. // @match *://*.the-tls.co.uk/*
  169. // @match *://*.towardsdatascience.com/*
  170. // @match *://*.trouw.nl/*
  171. // @match *://*.tubantia.nl/*
  172. // @match *://*.vanityfair.com/*
  173. // @match *://*.vn.nl/*
  174. // @match *://*.vulture.com/*
  175. // @match *://*.journalnow.com/*
  176. // @match *://*.wired.com/*
  177. // @match *://*.worldpoliticsreview.com/*
  178. // @match *://*.zeit.de/*
  179. // ==/UserScript==
  180.  
  181. (() => {
  182. 'use strict';
  183.  
  184. // Function to delete all cookies
  185. const deleteAllCookies = () => {
  186. const cookies = document.cookie.split(";");
  187.  
  188. cookies.forEach(cookie => {
  189. const eqPos = cookie.indexOf("=");
  190. const name = eqPos === -1 ? cookie : cookie.substring(0, eqPos);
  191. document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`;
  192. });
  193. };
  194.  
  195. // Execute the function to delete cookies
  196. deleteAllCookies();
  197. console.log("All cookies have been cleaned.");
  198. })();