Greasy Fork 还支持 简体中文。

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.5
  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/s7aTOiAfSihtlQQJioWZ5ATqBNqS8SEPVGhUJBHBXFojwS1PhVotsHbgdqxELUuHMKJDMjlmrTAZApITTUBVPvLgUCDKATNSo63NS0RLFgAHkkwK1RlhE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jdCSAJJ7tpbtm4VY/XjTrX78rc5oEumsWzl/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.  
  201.  
  202. // @grant GM_registerMenuCommand
  203. // @grant GM_addStyle
  204. // @grant GM_addElement
  205. // ==/UserScript==
  206.  
  207. (function() {
  208. 'use strict';
  209.  
  210. // Constants
  211. const _12FT_PREFIX = "https://12ft.io/proxy?ref=pro&q=";
  212. const _12FT_ORIGIN = new URL(_12FT_PREFIX).origin;
  213. const PAYWALLBUSTER_PREFIX = "https://paywallbuster.com/q/";
  214. const PAYWALLBUSTER_ORIGIN = new URL(PAYWALLBUSTER_PREFIX).origin;
  215.  
  216. // Add right-click menu options
  217. GM_registerMenuCommand("Bypass with 12ft", () => bypassPage());
  218. GM_registerMenuCommand("Bypass with PaywallBuster", () => bypassWithPaywallBuster());
  219. GM_registerMenuCommand("Archive Today", () => archivePage('https://archive.today/newest/'));
  220. GM_registerMenuCommand("Archive Is", () => archivePage('https://archive.is/newest/'));
  221. GM_registerMenuCommand("Archive Ph", () => archivePage('https://archive.ph/newest/'));
  222. GM_registerMenuCommand("Remove Paywall", () => archivePage('https://removepaywall.com/search?url='));
  223. GM_registerMenuCommand("Google Cache", () => archivePage('https://webcache.googleusercontent.com/search?q=cache:'));
  224. GM_registerMenuCommand("Yandex Cache", () => archivePage('https://www.yandex.ru/search/?site='));
  225. //GM_registerMenuCommand("Cached View -- Broken", () => archivePage('https://cachedview.foundtt.com/'));
  226. GM_registerMenuCommand("Yahoo Cache", () => archivePage('https://search.yahoo.com/search?p='));
  227. GM_registerMenuCommand("Bing Cache", () => archivePage('https://www.bing.com/search?q=url:'));
  228. GM_registerMenuCommand("Similar Web", () => archivePage('https://www.similarweb.com/ru/website/'));
  229.  
  230. // Add styles for floating button and dropdown
  231. GM_addStyle(`
  232. #bypassContainer {
  233. position: fixed;
  234. bottom: 10px;
  235. right: 10px;
  236. z-index: 99999999999;
  237. font-family: Arial, sans-serif;
  238. }
  239. #bypassButton {
  240. background: #333;
  241. color: white;
  242. border: none;
  243. padding: 8px 12px;
  244. cursor: pointer;
  245. font-size: 14px;
  246. display: flex;
  247. align-items: center;
  248. opacity: 0.8;
  249. border-radius: 4px;
  250. min-width: 150px;
  251. }
  252. #bypassButton:hover {
  253. opacity: 1;
  254. }
  255. #bypassButton img {
  256. width: 20px;
  257. margin-right: 8px;
  258. }
  259. #bypassDropdown {
  260. display: none;
  261. position: absolute;
  262. bottom: 100%;
  263. right: 0;
  264. background: white;
  265. border: 1px solid #ccc;
  266. border-radius: 4px;
  267. box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  268. margin-bottom: 5px;
  269. width: 200px;
  270. }
  271. #bypassDropdown.show {
  272. display: block;
  273. }
  274. .bypass-option {
  275. padding: 10px 15px;
  276. cursor: pointer;
  277. color: #333;
  278. border-bottom: 1px solid #eee;
  279. font-size: 14px;
  280. }
  281. .bypass-option:last-child {
  282. border-bottom: none;
  283. }
  284. .bypass-option:hover {
  285. background: #f5f5f5;
  286. }
  287. @media (max-width: 768px) {
  288. #bypassButton {
  289. padding: 10px 15px;
  290. font-size: 16px;
  291. }
  292. .bypass-option {
  293. padding: 12px 15px;
  294. font-size: 16px;
  295. }
  296. }
  297. `);
  298.  
  299. // Create container and button elements
  300. const container = document.createElement('div');
  301. container.id = 'bypassContainer';
  302.  
  303. const button = document.createElement('button');
  304. button.id = 'bypassButton';
  305. button.innerHTML = '<img src="data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAASFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////neHiwAAAAF3RSTlMAECAwQFBfYG9wf4CPkJ+gr7C/z9Df7yIhVIsAAAW1SURBVHic7VvZtpswDDTb5ZIUeuMU9P9/2nNMCF5mQAbap8xbwFi2pJHkJeaDDz744IMPPvjgYpRV07Zt29Z1af43irZ/TuLh+dPV5lrU/SQC31S3pyBMQ2OugpMu8kzfFK0VjvH7Cmu8pIvII35V3CbZxngz57BKF5F79LLdEy8iMp5whkC6iIQ2LbeU7+OgEmL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crLVeFJjc45RduCQP7MXPrd1rvDlhcZZPHQFWI4G9KirfkYBskve41DUJ4Dh9e1X82Na5G9kh7aBzAUeAX3sk+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)';
  306.  
  307. const dropdown = document.createElement('div');
  308. dropdown.id = 'bypassDropdown';
  309.  
  310. // Add dropdown options
  311. const options = [
  312. { text: '12ft.io', action: bypassPage },
  313. { text: 'PaywallBuster', action: bypassWithPaywallBuster },
  314. { text: 'Archive.today', action: () => archivePage('https://archive.today/newest/') },
  315. { text: 'Archive.is', action: () => archivePage('https://archive.is/newest/') },
  316. { text: 'Archive.ph', action: () => archivePage('https://archive.ph/newest/') },
  317. { text: 'RemovePaywall', action: () => archivePage('https://removepaywall.com/search?url=') },
  318. { text: 'Google Cache', action: () => archivePage('https://webcache.googleusercontent.com/search?q=cache:') },
  319. { text: 'Yandex Cache', action: () => archivePage('https://www.yandex.ru/search/?site=') },
  320. //{ text: 'CachedView -- Broken', action: () => archivePage('https://cachedview.foundtt.com/') },
  321. { text: 'Yahoo Cache', action: () => archivePage('https://search.yahoo.com/search?p=') },
  322. { text: 'Bing Cache', action: () => archivePage('https://www.bing.com/search?q=url:') },
  323. { text: 'Similar Web', action: () => archivePage('https://www.similarweb.com/ru/website/') },
  324. ];
  325.  
  326. options.forEach(option => {
  327. const div = document.createElement('div');
  328. div.className = 'bypass-option';
  329. div.textContent = option.text;
  330. div.addEventListener('click', (e) => {
  331. e.stopPropagation();
  332. option.action();
  333. dropdown.classList.remove('show');
  334. });
  335. dropdown.appendChild(div);
  336. });
  337.  
  338. // Add elements to container
  339. container.appendChild(button);
  340. container.appendChild(dropdown);
  341. document.body.appendChild(container);
  342.  
  343. // Toggle dropdown on button click
  344. button.addEventListener('click', (e) => {
  345. e.stopPropagation();
  346. const currentUrl = window.location.href;
  347. if (currentUrl.startsWith(_12FT_ORIGIN) || currentUrl.startsWith(PAYWALLBUSTER_ORIGIN)) {
  348. goBack();
  349. } else {
  350. dropdown.classList.toggle('show');
  351. }
  352. });
  353.  
  354. // Close dropdown when clicking outside
  355. document.addEventListener('click', () => {
  356. dropdown.classList.remove('show');
  357. });
  358.  
  359. // Function to bypass paywall with 12ft.io
  360. function bypassPage() {
  361. const currentUrl = window.location.href;
  362. if (isValidProtocol(currentUrl)) {
  363. window.location.href = _12FT_PREFIX + currentUrl;
  364. }
  365. }
  366.  
  367. // Function to bypass paywall with PaywallBuster
  368. function bypassWithPaywallBuster() {
  369. const currentUrl = window.location.href;
  370. if (isValidProtocol(currentUrl)) {
  371. window.location.href = PAYWALLBUSTER_PREFIX + currentUrl;
  372. }
  373. }
  374.  
  375. // Function to go back to original URL
  376. function goBack() {
  377. const currentUrl = window.location.href;
  378. const originalUrl = new URL(currentUrl).searchParams.get("q");
  379. if (originalUrl) {
  380. window.location.href = originalUrl;
  381. }
  382. }
  383.  
  384. // Check if the protocol is valid (http or https)
  385. function isValidProtocol(url) {
  386. return new URL(url).protocol.startsWith("http");
  387. }
  388.  
  389. // Remove banner on 12ft.io
  390. function removeBanner() {
  391. const banner = document.getElementById('ad');
  392. if (banner) {
  393. banner.remove();
  394. }
  395. }
  396.  
  397. // Function to open archive pages
  398. function archivePage(baseURL) {
  399. const currentUrl = window.location.href;
  400. if (isValidProtocol(currentUrl)) {
  401. window.location.href = baseURL + encodeURIComponent(currentUrl);
  402. }
  403. }
  404.  
  405. // Mutation observer to remove banner if it appears
  406. const observer = new MutationObserver((mutations) => {
  407. for (const mutation of mutations) {
  408. if (mutation.addedNodes.length) {
  409. removeBanner();
  410. }
  411. }
  412. });
  413.  
  414. observer.observe(document.body, { childList: true, subtree: true });
  415.  
  416. // Initial banner removal
  417. removeBanner();
  418.  
  419. // Remove duplicate button inside iframe
  420. function removeDuplicateButton() {
  421. const iframe = document.getElementById('proxy-frame');
  422. if (iframe) {
  423. const iframeDocument = iframe.contentDocument || iframe.contentWindow.document;
  424. const duplicateButton = iframeDocument.getElementById('bypassButton');
  425. if (duplicateButton) {
  426. duplicateButton.remove();
  427. }
  428. }
  429. }
  430.  
  431. window.addEventListener('load', removeDuplicateButton);
  432. })();