Paywall Bypass Script (12ft.io, Google Cache, PaywallBuster.com)

Mobile and desktop-friendly paywall bypass with dropdown menu and right-click options. Added Mobile + Desktop support.

当前为 2025-06-15 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Paywall Bypass Script (12ft.io, Google Cache, PaywallBuster.com)
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.2.6
  5. // @description Mobile and desktop-friendly paywall bypass with dropdown menu and right-click options. Added Mobile + Desktop support.
  6. // @author sharmanhall
  7. // @license MIT
  8. // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABIUExURQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKuErJsAAAAXdFJOUwAQIDBAUF9gb3B/gI+Qn6CvsL/P0N/vIiFUiwAABbVJREFUeJztW9m2mzAMNNvlkhR64xT0/3/ac0wIXmZABtqnzFvAWLakkeQl5oMPPvjggw8++OBilFXTtm3b1nVp/jeKtn9O4uH509XmWtT9JALfVLenIExDY66Cky7yTN8UrRWO8fsKa7yki8gjflXcJtnGeDPnsEoXkXv0st0TLyIynnCGQLqIhDYtt5Tv46ASYukiUvnvvzXTn/FTmFwA6RKQoPiRDDzzRoClByQoR8lCxgiY9IAEufJFBqPChnSfBPnyRTqzi23pHgmOyJdpJyTtSl9JUByRv20EjfSVBL/kGCqDoZT+JkErB9Fj+TiTIcwkKPXxJ8KEqShqzCT4zRs8h2GwGw4Ck0IlajgSUANM99cEa6pTaING1HBOxCboh/s7aTOiAfSihtlQQJioWZ5ATqBNqS8SEPVGhUJBHBXFojwS1PhVotsHbgdqxELUuHMKJDMjlmrTAZApITTUBVPvLgUCDKATNSo63NS0RLFgAHkkwK1RlhEIMABEAvsHffyklEEBTiCAE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jTrX78rc5oEumsWzl/v6e9oegdIoLxr5FT7SH7HiTqvJHedKO8aOdU+k99OoDe9rJJ87kR312hx+gWuJC8uIQG7mBQCkqBOSZBVks8kIJdyIixOH/xuX1b0pkfkYzvPJNCxMCbBMnNnxXMk0F3gi0nwor+WBNjOrlPlZaeYBK+xL66wgJEA29l1qrvstDj9gmXmiyssyNy9zwSrRjz9slx4Ddi61BvA1FZlmbF3mwe2BRCH2YxzzDywLYA4lmad4+XAI2zwPCbSv/LEmAQrolh2+DxjB4wECZWv+/tNCFaSJ4Hu6v8gLdgq/IIRXPHnH4TNwq9cL/tqjy+uRtnc+2G4t/8sDH2Qi78rE2kubw+WUAAAAABJRU5ErkJggg==
  9. // @match *://*.adelaidenow.com.au/*
  10. // @match *://*.adweek.com/*
  11. // @match *://*.afr.com/*
  12. // @match *://*.ambito/*
  13. // @match *://*.ampproject.org/*
  14. // @match *://*.baltimoresun.com/*
  15. // @match *://*.barrons.com/*
  16. // @match *://*.bizjournals.com/*
  17. // @match *://*.bloomberg.com/*
  18. // @match *://*.bloombergquint.com/*
  19. // @match *://*.bostonglobe.com/*
  20. // @match *://*.brisbanetimes.com.au/*
  21. // @match *://*.britannica.com/*
  22. // @match *://*.businessinsider.com/*
  23. // @match *://*.caixinglobal.com/*
  24. // @match *://*.cbsnews.com/*
  25. // @match *://*.cen.acs.org/*
  26. // @match *://*.centralwesterndaily.com.au/*
  27. // @match *://*.chicagobusiness.com/*
  28. // @match *://*.chicagotribune.com/*
  29. // @match *://*.corriere.it/*
  30. // @match *://*.courant.com/*
  31. // @match *://*.couriermail.com.au/*
  32. // @match *://*.dailypress.com/*
  33. // @match *://*.dailytelegraph.com.au/*
  34. // @match *://*.delfi.ee/*
  35. // @match *://*.demorgen.be/*
  36. // @match *://*.denverpost.com/*
  37. // @match *://*.df.cl/*
  38. // @match *://*.dynamed.com/*
  39. // @match *://*.economist.com/*
  40. // @match *://*.elmercurio.com/*
  41. // @match *://*.elmundo.es/*
  42. // @match *://*.elu24.ee/*
  43. // @match *://*.entreprenal.com/*
  44. // @match *://*.examiner.com.au/*
  45. // @match *://*.expansion.com/*
  46. // @match *://*.espn.com/*
  47. // @match *://*.fd.nl/*
  48. // @match *://*.financialpost.com/*
  49. // @match *://*.fnlondon.com/*
  50. // @match *://*.foreignpolicy.com/*
  51. // @match *://*.fortune.com/*
  52. // @match *://*.ft.com/*
  53. // @match *://*.gelocal.it/*
  54. // @match *://*.genomeweb.com/*
  55. // @match *://*.glassdoor.com/*
  56. // @match *://*.globes.co.il/*
  57. // @match *://*.groene.nl/*
  58. // @match *://*.haaretz.co.il/*
  59. // @match *://*.haaretz.com/*
  60. // @match *://*.harpers.org/*
  61. // @match *://*.hbr.org/*
  62. // @match *://*.hbrchina.org/*
  63. // @match *://*.heraldsun.com.au/*
  64. // @match *://*.historyextra.com/*
  65. // @match *://*.humo.be/*
  66. // @match *://*.ilmanifesto.it/*
  67. // @match *://*.inc.com/*
  68. // @match *://*.inquirer.com/*
  69. // @match *://*.interest.co.nz/*
  70. // @match *://*.investorschronicle.co.uk/*
  71. // @match *://*.irishtimes.com/*
  72. // @match *://*.japantimes.co.jp/*
  73. // @match *://*.journalnow.com/*
  74. // @match *://*.kansascity.com/*
  75. // @match *://*.labusinessjournal.com/*
  76. // @match *://*.lanacion.com.ar/*
  77. // @match *://*.lastampa.it/*
  78. // @match *://*.latercera.com/*
  79. // @match *://*.latimes.com/*
  80. // @match *://*.lavoixdunord.fr/*
  81. // @match *://*.lecho.be/*
  82. // @match *://*.leparisien.fr/*
  83. // @match *://*.lesechos.fr/*
  84. // @match *://*.loebclassics.com/*
  85. // @match *://*.lrb.co.uk/*
  86. // @match *://*.mcall.com/*
  87. // @match *://*.medium.com/*
  88. // @match *://*.medscape.com/*
  89. // @match *://*.mercurynews.com/*
  90. // @match *://*.mv-voice.com/*
  91. // @match *://*.nationalpost.com/*
  92. // @match *://*.netdna-ssl.com/*
  93. // @match *://*.news-gazette.com/*
  94. // @match *://*.newstatesman.com/*
  95. // @match *://*.newyorker.com/*
  96. // @match *://*.nrc.nl/*
  97. // @match *://*.ntnews.com.au/*
  98. // @match *://*.nydailynews.com/*
  99. // @match *://*.nymag.com/*
  100. // @match *://*.nytimes.com/*
  101. // @match *://*.nzherald.co.nz/*
  102. // @match *://*.nzz.ch/*
  103. // @match *://*.ocregister.com/*
  104. // @match *://*.orlandosentinel.com/*
  105. // @match *://*.outbrain.com/*
  106. // @match *://*.paloaltoonline.com/*
  107. // @match *://*.parool.nl/*
  108. // @match *://*.piano.io/*
  109. // @match *://*.poool.fr/*
  110. // @match *://*.postimees.ee/*
  111. // @match *://*.qiota.com/*
  112. // @match *://*.qz.com/*
  113. // @match *://*.repubblica.it/*
  114. // @match *://*.republic.ru/*
  115. // @match *://*.reuters.com/*
  116. // @match *://*.sandiegouniontribune.com/*
  117. // @match *://*.scientificamerican.com/*
  118. // @match *://*.scmp.com/*
  119. // @match *://*.seattletimes.com/*
  120. // @match *://*.seekingalpha.com/*
  121. // @match *://*.slate.com/*
  122. // @match *://*.smh.com.au/*
  123. // @match *://*.sofrep.com/*
  124. // @match *://*.spectator.co.uk/*
  125. // @match *://*.spectator.com.au/*
  126. // @match *://*.spectator.us/*
  127. // @match *://*.speld.nl/*
  128. // @match *://*.startribune.com/*
  129. // @match *://*.statista.com/*
  130. // @match *://*.stuff.co.nz/*
  131. // @match *://*.sueddeutsche.de/*
  132. // @match *://*.sun-sentinel.com/*
  133. // @match *://*.techinasia.com/*
  134. // @match *://*.technologyreview.com/*
  135. // @match *://*.telegraaf.nl/*
  136. // @match *://*.telegraph.co.uk/*
  137. // @match *://*.the-tls.co.uk/*
  138. // @match *://*.theadvocate.com.au/*
  139. // @match *://*.theage.com.au/*
  140. // @match *://*.theathletic.co.uk/*
  141. // @match *://*.theathletic.com/*
  142. // @match *://*.theatlantic.com/*
  143. // @match *://*.theaustralian.com.au/*
  144. // @match *://*.thediplomat.com/*
  145. // @match *://*.theglobeandmail.com/*
  146. // @match *://*.theherald.com.au/*
  147. // @match *://*.thehindu.com/*
  148. // @match *://*.themarker.com/*
  149. // @match *://*.themercury.com.au/*
  150. // @match *://*.thenation.com/*
  151. // @match *://*.thenational.scot/*
  152. // @match *://*.theolivepress.es/*
  153. // @match *://*.thesaturdaypaper.com.au/*
  154. // @match *://*.thestar.com/*
  155. // @match *://*.thewrap.com/*
  156. // @match *://*.tijd.be/*
  157. // @match *://*.time.com/*
  158. // @match *://*.tinypass.com/*
  159. // @match *://*.towardsdatascience.com/*
  160. // @match *://*.trouw.nl/*
  161. // @match *://*.vanityfair.com/*
  162. // @match *://*.vn.nl/*
  163. // @match *://*.volkskrant.nl/*
  164. // @match *://*.washingtonpost.com/*
  165. // @match *://*.wired.com/*
  166. // @match *://*.wsj.com/*
  167. // @match *://*.zeit.de/*
  168. // @match *://*.usatoday.com/*
  169. // @match *://*.time.com/*
  170. // @match *://*.theatlantic.com/*
  171. // @match *://*.americanbanker.com/*
  172. // @match *://*.japantimes.co.jp/*
  173. // @match *://*.wsj.com/*
  174. // @match *://*.cnbc.com/*
  175. // @match *://*.financialpost.com/*
  176. // @match *://*.wired.com/*
  177. // @match *://*.seekingalpha.com/*
  178. // @match *://*.ipolitics.ca/*
  179. // @match *://*.discovermagazine.com/*
  180. // @match *://*.faz.net/*
  181. // @match *://*.rp-online.de/*
  182. // @match *://*.spiegel.de/*
  183. // @match *://*.tagesspiegel.de/*
  184. // @match *://*.welt.de/*
  185. // @match *://*.wz.de/*
  186. // @match *://*.rp.pl/*
  187. // @match *://*.wyborcza.pl/*
  188. // @match *://*.tagesanzeiger.ch/*
  189. // @match *://*.elpais.com/*
  190. // @match *://*.english.elpais.com/*
  191. // @match *://*.insight.kontan.co.id/*
  192. // @match *://*.inkl.com/*
  193. // @match *://*.usatoday.com/*
  194. // @match *://*.bbc.co.uk/*
  195. // @match *://*.cnn.com/*
  196. // @match *://*.foxnews.com/*
  197. // @match *://*.nbcnews.com/*
  198. // @match *://*.washingtonpost.com/*
  199. // @match *://*.google.com/news/*
  200. // @match *://*.forbes.pl/*
  201. // @match *://*.onet.pl/*
  202.  
  203.  
  204. // @grant GM_registerMenuCommand
  205. // @grant GM_addStyle
  206. // @grant GM_addElement
  207. // ==/UserScript==
  208.  
  209. (function() {
  210. 'use strict';
  211.  
  212. // Constants
  213. const _12FT_PREFIX = "https://12ft.io/proxy?ref=pro&q=";
  214. const _12FT_ORIGIN = new URL(_12FT_PREFIX).origin;
  215. const PAYWALLBUSTER_PREFIX = "https://paywallbuster.com/q/";
  216. const PAYWALLBUSTER_ORIGIN = new URL(PAYWALLBUSTER_PREFIX).origin;
  217.  
  218. // Add right-click menu options
  219. GM_registerMenuCommand("Bypass with 12ft", () => bypassPage());
  220. GM_registerMenuCommand("Bypass with PaywallBuster", () => bypassWithPaywallBuster());
  221. GM_registerMenuCommand("Archive Today", () => archivePage('https://archive.today/newest/'));
  222. GM_registerMenuCommand("Archive Is", () => archivePage('https://archive.is/newest/'));
  223. GM_registerMenuCommand("Archive Ph", () => archivePage('https://archive.ph/newest/'));
  224. GM_registerMenuCommand("Remove Paywall", () => archivePage('https://removepaywall.com/search?url='));
  225. GM_registerMenuCommand("Google Cache", () => archivePage('https://webcache.googleusercontent.com/search?q=cache:'));
  226. GM_registerMenuCommand("Yandex Cache", () => archivePage('https://www.yandex.ru/search/?site='));
  227. //GM_registerMenuCommand("Cached View -- Broken", () => archivePage('https://cachedview.foundtt.com/'));
  228. GM_registerMenuCommand("Yahoo Cache", () => archivePage('https://search.yahoo.com/search?p='));
  229. GM_registerMenuCommand("Bing Cache", () => archivePage('https://www.bing.com/search?q=url:'));
  230. GM_registerMenuCommand("Similar Web", () => archivePage('https://www.similarweb.com/ru/website/'));
  231.  
  232. // Add styles for floating button and dropdown
  233. GM_addStyle(`
  234. #bypassContainer {
  235. position: fixed;
  236. bottom: 10px;
  237. right: 10px;
  238. z-index: 99999999999;
  239. font-family: Arial, sans-serif;
  240. }
  241. #bypassButton {
  242. background: #333;
  243. color: white;
  244. border: none;
  245. padding: 8px 12px;
  246. cursor: pointer;
  247. font-size: 14px;
  248. display: flex;
  249. align-items: center;
  250. opacity: 0.8;
  251. border-radius: 4px;
  252. min-width: 150px;
  253. }
  254. #bypassButton:hover {
  255. opacity: 1;
  256. }
  257. #bypassButton img {
  258. width: 20px;
  259. margin-right: 8px;
  260. }
  261. #bypassDropdown {
  262. display: none;
  263. position: absolute;
  264. bottom: 100%;
  265. right: 0;
  266. background: white;
  267. border: 1px solid #ccc;
  268. border-radius: 4px;
  269. box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  270. margin-bottom: 5px;
  271. width: 200px;
  272. }
  273. #bypassDropdown.show {
  274. display: block;
  275. }
  276. .bypass-option {
  277. padding: 10px 15px;
  278. cursor: pointer;
  279. color: #333;
  280. border-bottom: 1px solid #eee;
  281. font-size: 14px;
  282. }
  283. .bypass-option:last-child {
  284. border-bottom: none;
  285. }
  286. .bypass-option:hover {
  287. background: #f5f5f5;
  288. }
  289. @media (max-width: 768px) {
  290. #bypassButton {
  291. padding: 10px 15px;
  292. font-size: 16px;
  293. }
  294. .bypass-option {
  295. padding: 12px 15px;
  296. font-size: 16px;
  297. }
  298. }
  299. `);
  300.  
  301. // Create container and button elements
  302. const container = document.createElement('div');
  303. container.id = 'bypassContainer';
  304.  
  305. const button = document.createElement('button');
  306. button.id = 'bypassButton';
  307. button.innerHTML = '<img src="data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAASFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////neHiwAAAAF3RSTlMAECAwQFBfYG9wf4CPkJ+gr7C/z9Df7yIhVIsAAAW1SURBVHic7VvZtpswDDTb5ZIUeuMU9P9/2nNMCF5mQAbap8xbwFi2pJHkJeaDDz744IMPPvjgYpRV07Zt29Z1af43irZ/TuLh+dPV5lrU/SQC31S3pyBMQ2OugpMu8kzfFK0VjvH7Cmu8pIvII35V3CbZxngz57BKF5F79LLdEy8iMp5whk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CeGzut9tZa6+nxaa219sfcrLVeFJjc45RduCQP7MXPrd1rvDlhcZZPHQFWI4G9KirfkYBskve41DUJ4Dh9e1X82Na5G9kh7aBzAUeAX3sk+NqRzw6AauhcaTTcIwFffS10IwdABXSuNMXskICFf4/ueIdwws6VSwKF/DwSpCXBJgk25P/UtVf5s3jjmYfVmFskgOHfw+pRNXoYmoeUQ5jE86nonnycCQI3W82TV424TvZPmNeg7+3V+6pWZIKNI6n9E+bVB4iqvS7IZRZCYteJ7oR59tc46b7M43WRVY3MnehOmJ1qq/R3Y3QkgCSe7aW7ZuFWP14061+/K3OaBLprFs5f7+nvaHoHSKC8a+RU+0h+x4k6ryR3nSjvGjnVPpPfTqA3vaySfO5Ed9docfoFriQvLiEBu5gUApKgTkmQVZLPJCCXciIsTh/8bl9W9KZH5GM7zyTQsTAmwTJzZ8VzJNBd4ItJ8KK/lgTYzq5T5WWnmASvsS+usICRANvZdaq77LQ4/YJl5osrLMjcvc8Eq0Y8/bJceA3YutQbwNRWZZmxd5sHtgUQh9mMc8w8sC2AOJZmnePlwCNs8Dwm0r/yxJgEK6JYdvg8YweMBAmVr/v7TQhWkieB7ur/IC3YKvyCEVzx5x+EzcKvXC/7ao8vrkbZ3PthuLf/LAx9kIu/KxNpLm8PllAAAAAASUVORK5CYII="> Bypass Paywall (12ft.io)';
  308.  
  309. const dropdown = document.createElement('div');
  310. dropdown.id = 'bypassDropdown';
  311.  
  312. // Add dropdown options
  313. const options = [
  314. { text: '12ft.io', action: bypassPage },
  315. { text: 'PaywallBuster', action: bypassWithPaywallBuster },
  316. { text: 'Archive.today', action: () => archivePage('https://archive.today/newest/') },
  317. { text: 'Archive.is', action: () => archivePage('https://archive.is/newest/') },
  318. { text: 'Archive.ph', action: () => archivePage('https://archive.ph/newest/') },
  319. { text: 'RemovePaywall', action: () => archivePage('https://removepaywall.com/search?url=') },
  320. { text: 'Google Cache', action: () => archivePage('https://webcache.googleusercontent.com/search?q=cache:') },
  321. { text: 'Yandex Cache', action: () => archivePage('https://www.yandex.ru/search/?site=') },
  322. //{ text: 'CachedView -- Broken', action: () => archivePage('https://cachedview.foundtt.com/') },
  323. { text: 'Yahoo Cache', action: () => archivePage('https://search.yahoo.com/search?p=') },
  324. { text: 'Bing Cache', action: () => archivePage('https://www.bing.com/search?q=url:') },
  325. { text: 'Similar Web', action: () => archivePage('https://www.similarweb.com/ru/website/') },
  326. ];
  327.  
  328. options.forEach(option => {
  329. const div = document.createElement('div');
  330. div.className = 'bypass-option';
  331. div.textContent = option.text;
  332. div.addEventListener('click', (e) => {
  333. e.stopPropagation();
  334. option.action();
  335. dropdown.classList.remove('show');
  336. });
  337. dropdown.appendChild(div);
  338. });
  339.  
  340. // Add elements to container
  341. container.appendChild(button);
  342. container.appendChild(dropdown);
  343. document.body.appendChild(container);
  344.  
  345. // Toggle dropdown on button click
  346. button.addEventListener('click', (e) => {
  347. e.stopPropagation();
  348. const currentUrl = window.location.href;
  349. if (currentUrl.startsWith(_12FT_ORIGIN) || currentUrl.startsWith(PAYWALLBUSTER_ORIGIN)) {
  350. goBack();
  351. } else {
  352. dropdown.classList.toggle('show');
  353. }
  354. });
  355.  
  356. // Close dropdown when clicking outside
  357. document.addEventListener('click', () => {
  358. dropdown.classList.remove('show');
  359. });
  360.  
  361. // Function to bypass paywall with 12ft.io
  362. function bypassPage() {
  363. const currentUrl = window.location.href;
  364. if (isValidProtocol(currentUrl)) {
  365. window.location.href = _12FT_PREFIX + currentUrl;
  366. }
  367. }
  368.  
  369. // Function to bypass paywall with PaywallBuster
  370. function bypassWithPaywallBuster() {
  371. const currentUrl = window.location.href;
  372. if (isValidProtocol(currentUrl)) {
  373. window.location.href = PAYWALLBUSTER_PREFIX + currentUrl;
  374. }
  375. }
  376.  
  377. // Function to go back to original URL
  378. function goBack() {
  379. const currentUrl = window.location.href;
  380. const originalUrl = new URL(currentUrl).searchParams.get("q");
  381. if (originalUrl) {
  382. window.location.href = originalUrl;
  383. }
  384. }
  385.  
  386. // Check if the protocol is valid (http or https)
  387. function isValidProtocol(url) {
  388. return new URL(url).protocol.startsWith("http");
  389. }
  390.  
  391. // Remove banner on 12ft.io
  392. function removeBanner() {
  393. const banner = document.getElementById('ad');
  394. if (banner) {
  395. banner.remove();
  396. }
  397. }
  398.  
  399. // Function to open archive pages
  400. function archivePage(baseURL) {
  401. const currentUrl = window.location.href;
  402. if (isValidProtocol(currentUrl)) {
  403. window.location.href = baseURL + encodeURIComponent(currentUrl);
  404. }
  405. }
  406.  
  407. // Mutation observer to remove banner if it appears
  408. const observer = new MutationObserver((mutations) => {
  409. for (const mutation of mutations) {
  410. if (mutation.addedNodes.length) {
  411. removeBanner();
  412. }
  413. }
  414. });
  415.  
  416. observer.observe(document.body, { childList: true, subtree: true });
  417.  
  418. // Initial banner removal
  419. removeBanner();
  420.  
  421. // Remove duplicate button inside iframe
  422. function removeDuplicateButton() {
  423. const iframe = document.getElementById('proxy-frame');
  424. if (iframe) {
  425. const iframeDocument = iframe.contentDocument || iframe.contentWindow.document;
  426. const duplicateButton = iframeDocument.getElementById('bypassButton');
  427. if (duplicateButton) {
  428. duplicateButton.remove();
  429. }
  430. }
  431. }
  432.  
  433. window.addEventListener('load', removeDuplicateButton);
  434. })();