|
1 | 1 | // ==UserScript==
|
2 | 2 | // @namespace https://github.com/aidan-gibson
|
3 | 3 | // @name Auto-Archive News
|
4 |
| -// @description Automatically fetch archive.ph versions of news sites |
5 |
| -// @version 1.0 |
| 4 | +// @description Automatically fetch archive.ph versions of news sites. If not yet archived it auto-archives. |
| 5 | +// @version 1.0.0 |
6 | 6 | // @author aidan-gibson
|
7 |
| -// @include https://www.theatlantic.com/* |
8 |
| -// @include http://www.theatlantic.com/* |
9 |
| -// @updateURL |
10 |
| -// @downloadURL |
| 7 | +// @include /^(http|https):\/\/www.outbrain.com\/.*/ |
| 8 | +// @include /^(http|https):\/\/www.piano.io\/.*/ |
| 9 | +// @include /^(http|https):\/\/www.poool.fr\/.*/ |
| 10 | +// @include /^(http|https):\/\/www.qiota.com\/.*/ |
| 11 | +// @include /^(http|https):\/\/www.tinypass.com\/.*/ |
| 12 | +// @include /^(http|https):\/\/www.ad.nl\/.*/ |
| 13 | +// @include /^(http|https):\/\/www.adelaidenow.com.au\/.*/ |
| 14 | +// @include /^(http|https):\/\/www.adweek.com\/.*/ |
| 15 | +// @include /^(http|https):\/\/www.afr.com\/.*/ |
| 16 | +// @include /^(http|https):\/\/www.baltimoresun.com\/.*/ |
| 17 | +// @include /^(http|https):\/\/www.barrons.com\/.*/ |
| 18 | +// @include /^(http|https):\/\/www.bizjournals.com\/.*/ |
| 19 | +// @include /^(http|https):\/\/www.bloomberg.com\/.*/ |
| 20 | +// @include /^(http|https):\/\/www.bloombergquint.com\/.*/ |
| 21 | +// @include /^(http|https):\/\/www.bostonglobe.com\/.*/ |
| 22 | +// @include /^(http|https):\/\/www.brisbanetimes.com.au\/.*/ |
| 23 | +// @include /^(http|https):\/\/www.britannica.com\/.*/ |
| 24 | +// @include /^(http|https):\/\/www.businessinsider.com\/.*/ |
| 25 | +// @include /^(http|https):\/\/www.caixinglobal.com\/.*/ |
| 26 | +// @include /^(http|https):\/\/www.cen.acs.org\/.*/ |
| 27 | +// @include /^(http|https):\/\/www.centralwesterndaily.com.au\/.*/ |
| 28 | +// @include /^(http|https):\/\/www.chicagobusiness.com\/.*/ |
| 29 | +// @include /^(http|https):\/\/www.chicagotribune.com\/.*/ |
| 30 | +// @include /^(http|https):\/\/www.corriere.it\/.*/ |
| 31 | +// @include /^(http|https):\/\/www.courant.com\/.*/ |
| 32 | +// @include /^(http|https):\/\/www.couriermail.com.au\/.*/ |
| 33 | +// @include /^(http|https):\/\/www.dailypress.com\/.*/ |
| 34 | +// @include /^(http|https):\/\/www.dailytelegraph.com.au\/.*/ |
| 35 | +// @include /^(http|https):\/\/www.delfi.ee\/.*/ |
| 36 | +// @include /^(http|https):\/\/www.demorgen.be\/.*/ |
| 37 | +// @include /^(http|https):\/\/www.denverpost.com\/.*/ |
| 38 | +// @include /^(http|https):\/\/www.dynamed.com\/.*/ |
| 39 | +// @include /^(http|https):\/\/www.economist.com\/.*/ |
| 40 | +// @include /^(http|https):\/\/www.ed.nl\/.*/ |
| 41 | +// @include /^(http|https):\/\/www.elmercurio.com\/.*/ |
| 42 | +// @include /^(http|https):\/\/www.elu24.ee\/.*/ |
| 43 | +// @include /^(http|https):\/\/www.examiner.com.au\/.*/ |
| 44 | +// @include /^(http|https):\/\/www.fd.nl\/.*/ |
| 45 | +// @include /^(http|https):\/\/www.fnlondon.com\/.*/ |
| 46 | +// @include /^(http|https):\/\/www.foreignpolicy.com\/.*/ |
| 47 | +// @include /^(http|https):\/\/www.fortune.com\/.*/ |
| 48 | +// @include /^(http|https):\/\/www.ft.com\/.*/ |
| 49 | +// @include /^(http|https):\/\/www.genomeweb.com\/.*/ |
| 50 | +// @include /^(http|https):\/\/www.gelocal.it\/.*/ |
| 51 | +// @include /^(http|https):\/\/www.glassdoor.com\/.*/ |
| 52 | +// @include /^(http|https):\/\/www.globes.co.il\/.*/ |
| 53 | +// @include /^(http|https):\/\/www.groene.nl\/.*/ |
| 54 | +// @include /^(http|https):\/\/www.haaretz.co.il\/.*/ |
| 55 | +// @include /^(http|https):\/\/www.haaretz.com\/.*/ |
| 56 | +// @include /^(http|https):\/\/www.harpers.org\/.*/ |
| 57 | +// @include /^(http|https):\/\/www.hbr.org\/.*/ |
| 58 | +// @include /^(http|https):\/\/www.heraldsun.com.au\/.*/ |
| 59 | +// @include /^(http|https):\/\/www.ilmanifesto.it\/.*/ |
| 60 | +// @include /^(http|https):\/\/www.inc.com\/.*/ |
| 61 | +// @include /^(http|https):\/\/www.inquirer.com\/.*/ |
| 62 | +// @include /^(http|https):\/\/www.interest.co.nz\/.*/ |
| 63 | +// @include /^(http|https):\/\/www.investorschronicle.co.uk\/.*/ |
| 64 | +// @include /^(http|https):\/\/www.irishtimes.com\/.*/ |
| 65 | +// @include /^(http|https):\/\/www.journalnow.com\/.*/ |
| 66 | +// @include /^(http|https):\/\/www.kansascity.com\/.*/ |
| 67 | +// @include /^(http|https):\/\/www.labusinessjournal.com\/.*/ |
| 68 | +// @include /^(http|https):\/\/www.lanacion.com.ar\/.*/ |
| 69 | +// @include /^(http|https):\/\/www.lastampa.it\/.*/ |
| 70 | +// @include /^(http|https):\/\/www.latercera.com\/.*/ |
| 71 | +// @include /^(http|https):\/\/www.latimes.com\/.*/ |
| 72 | +// @include /^(http|https):\/\/www.lavoixdunord.fr\/.*/ |
| 73 | +// @include /^(http|https):\/\/www.lecho.be\/.*/ |
| 74 | +// @include /^(http|https):\/\/www.leparisien.fr\/.*/ |
| 75 | +// @include /^(http|https):\/\/www.lesechos.fr\/.*/ |
| 76 | +// @include /^(http|https):\/\/www.loebclassics.com\/.*/ |
| 77 | +// @include /^(http|https):\/\/www.lrb.co.uk\/.*/ |
| 78 | +// @include /^(http|https):\/\/www.mcall.com\/.*/ |
| 79 | +// @include /^(http|https):\/\/www.medium.com\/.*/ |
| 80 | +// @include /^(http|https):\/\/www.medscape.com\/.*/ |
| 81 | +// @include /^(http|https):\/\/www.mercurynews.com\/.*/ |
| 82 | +// @include /^(http|https):\/\/www.mv-voice.com\/.*/ |
| 83 | +// @include /^(http|https):\/\/www.nationalgeographic.c\/.*/ |
| 84 | +// @include /^(http|https):\/\/www.nationalpost.com\/.*/ |
| 85 | +// @include /^(http|https):\/\/www.news-gazette.com\/.*/ |
| 86 | +// @include /^(http|https):\/\/www.newstatesman.com\/.*/ |
| 87 | +// @include /^(http|https):\/\/www.newyorker.com\/.*/ |
| 88 | +// @include /^(http|https):\/\/www.nrc.nl\/.*/ |
| 89 | +// @include /^(http|https):\/\/www.ntnews.com.au\/.*/ |
| 90 | +// @include /^(http|https):\/\/www.nydailynews.com\/.*/ |
| 91 | +// @include /^(http|https):\/\/www.nymag.com\/.*/ |
| 92 | +// @include /^(http|https):\/\/www.nytimes.com\/.*/ |
| 93 | +// @include /^(http|https):\/\/www.nzherald.co.nz\/.*/ |
| 94 | +// @include /^(http|https):\/\/www.ocregister.com\/.*/ |
| 95 | +// @include /^(http|https):\/\/www.orlandosentinel.com\/.*/ |
| 96 | +// @include /^(http|https):\/\/www.paloaltoonline.com\/.*/ |
| 97 | +// @include /^(http|https):\/\/www.parool.nl\/.*/ |
| 98 | +// @include /^(http|https):\/\/www.postimees.ee\/.*/ |
| 99 | +// @include /^(http|https):\/\/www.quora.com\/.*/ |
| 100 | +// @include /^(http|https):\/\/www.qz.com\/.*/ |
| 101 | +// @include /^(http|https):\/\/www.repubblica.it\/.*/ |
| 102 | +// @include /^(http|https):\/\/www.sandiegouniontribune.com\/.*/ |
| 103 | +// @include /^(http|https):\/\/www.scientificamerican.com\/.*/ |
| 104 | +// @include /^(http|https):\/\/www.seattletimes.com\/.*/ |
| 105 | +// @include /^(http|https):\/\/www.seekingalpha.com\/.*/ |
| 106 | +// @include /^(http|https):\/\/www.slate.com\/.*/ |
| 107 | +// @include /^(http|https):\/\/www.smh.com.au\/.*/ |
| 108 | +// @include /^(http|https):\/\/www.sofrep.com\/.*/ |
| 109 | +// @include /^(http|https):\/\/www.spectator.co.uk\/.*/ |
| 110 | +// @include /^(http|https):\/\/www.spectator.com.au\/.*/ |
| 111 | +// @include /^(http|https):\/\/www.speld.n\/.*/ |
| 112 | +// @include /^(http|https):\/\/www.statista.com\/.*/ |
| 113 | +// @include /^(http|https):\/\/www.stuff.co.nz\/.*/ |
| 114 | +// @include /^(http|https):\/\/www.sun-sentinel.com\/.*/ |
| 115 | +// @include /^(http|https):\/\/www.techinasia.com\/.*/ |
| 116 | +// @include /^(http|https):\/\/www.technologyreview.com\/.*/ |
| 117 | +// @include /^(http|https):\/\/www.telegraaf.nl\/.*/ |
| 118 | +// @include /^(http|https):\/\/www.telegraph.co.uk\/.*/ |
| 119 | +// @include /^(http|https):\/\/www.the-tls.co.uk\/.*/ |
| 120 | +// @include /^(http|https):\/\/www.theadvocate.com.au\/.*/ |
| 121 | +// @include /^(http|https):\/\/www.theage.com.au\/.*/ |
| 122 | +// @include /^(http|https):\/\/www.theatlantic.com\/.*/ |
| 123 | +// @include /^(http|https):\/\/www.theaustralian.com.au\/.*/ |
| 124 | +// @include /^(http|https):\/\/www.thediplomat.com\/.*/ |
| 125 | +// @include /^(http|https):\/\/www.theglobeandmail.com\/.*/ |
| 126 | +// @include /^(http|https):\/\/www.theherald.com.au\/.*/ |
| 127 | +// @include /^(http|https):\/\/www.thehindu.com\/.*/ |
| 128 | +// @include /^(http|https):\/\/www.themarker.com\/.*/ |
| 129 | +// @include /^(http|https):\/\/www.themercury.com.au\/.*/ |
| 130 | +// @include /^(http|https):\/\/www.thenation.com\/.*/ |
| 131 | +// @include /^(http|https):\/\/www.thenational.scot\/.*/ |
| 132 | +// @include /^(http|https):\/\/www.theolivepress.es\/.*/ |
| 133 | +// @include /^(http|https):\/\/www.thesaturdaypaper.com.au\/.*/ |
| 134 | +// @include /^(http|https):\/\/www.thestar.com\/.*/ |
| 135 | +// @include /^(http|https):\/\/www.thewrap.com\/.*/ |
| 136 | +// @include /^(http|https):\/\/www.tijd.be\/.*/ |
| 137 | +// @include /^(http|https):\/\/www.towardsdatascience.com\/.*/ |
| 138 | +// @include /^(http|https):\/\/www.trouw.nl\/.*/ |
| 139 | +// @include /^(http|https):\/\/www.vanityfair.com\/.*/ |
| 140 | +// @include /^(http|https):\/\/www.vn.nl\/.*/ |
| 141 | +// @include /^(http|https):\/\/www.volkskrant.nl\/.*/ |
| 142 | +// @include /^(http|https):\/\/www.washingtonpost.com\/.*/ |
| 143 | +// @include /^(http|https):\/\/www.wired.com\/.*/ |
| 144 | +// @include /^(http|https):\/\/www.worldpoliticsreview.com\/.*/ |
| 145 | +// @include /^(http|https):\/\/www.wsj.com\/.*/ |
| 146 | +// @include /^(http|https):\/\/www.nzz.ch\/.*/ |
| 147 | +// @include /^(http|https):\/\/www.republic.ru\/.*/ |
| 148 | +// @include /^(http|https):\/\/www.historyextra.com\/.*/ |
| 149 | +// @include /^(http|https):\/\/www.netdna-ssl.com\/.*/ |
| 150 | +// @include /^(http|https):\/\/www.startribune.com\/.*/ |
| 151 | +// @include /^(http|https):\/\/www.df.cl\/.*/ |
| 152 | +// @include /^(http|https):\/\/www.financialpost.com\/.*/ |
| 153 | +// @include /^(http|https):\/\/www.gelderlander.nl\/.*/ |
| 154 | +// @include /^(http|https):\/\/www.bndestem.nl\/.*/ |
| 155 | +// @include /^(http|https):\/\/www.bd.nl\/.*/ |
| 156 | +// @include /^(http|https):\/\/www.tubantia.nl\/.*/ |
| 157 | +// @include /^(http|https):\/\/www.pzc.nl\/.*/ |
| 158 | +// @include /^(http|https):\/\/www.destentor.nl\/.*/ |
| 159 | +// @include /^(http|https):\/\/www.ambito\/.*/ |
| 160 | +// @include /^(http|https):\/\/www.sueddeutsche.de\/.*/ |
| 161 | +// @include /^(http|https):\/\/www.spectator.us\/.*/ |
| 162 | +// @include /^(http|https):\/\/www.humo.be\/.*/ |
| 163 | +// @include /^(http|https):\/\/www.elmundo.es\/.*/ |
| 164 | +// @include /^(http|https):\/\/www.time.com\/.*/ |
| 165 | +// @include /^(http|https):\/\/www.zeit.de\/.*/ |
| 166 | +// @include /^(http|https):\/\/www.ampproject.org\/.*/ |
| 167 | +// @include /^(http|https):\/\/www.reuters.com\/.*/ |
| 168 | +// @include /^(http|https):\/\/www.expansion.com\/.*/ |
| 169 | +// @include /^(http|https):\/\/www.theathletic.com\/.*/ |
| 170 | +// @include /^(http|https):\/\/www.theathletic.co.uk\/.*/ |
| 171 | +// @include /^(http|https):\/\/www.hbrchina.org\/.*/ |
| 172 | +// @updateURL https://github.com/aidan-gibson/Safari-UserScripts/blob/master/archiveph.js |
| 173 | +// @downloadURL https://github.com/aidan-gibson/Safari-UserScripts/blob/master/archiveph.js |
11 | 174 | // ==/UserScript==
|
12 | 175 |
|
13 |
| -// grab from archive.is or archive.ph (one or other could be down. default prefer .ph) |
14 |
| -// if doesn't already exist, archive it |
15 |
| -// auto run on certain sites |
16 |
| -// safari should already b configured to automatically enable reader mode for both archive.is or archive.ph |
| 176 | +// the included regex ensures it doesn't run on homepages of news sites; it can't be theatlantic.com/, there must be SOMETHING after the last slash |
17 | 177 |
|
18 |
| -var title = document.title; |
19 |
| -var loc = window.location.href; |
| 178 | +// Instructions: |
| 179 | +// Must allow popups from iOS settings |
| 180 | +// Enable Safari reader mode for archive.is and archive.ph automatically |
| 181 | +// Using "Userscripts" app for iOS and iPadOS |
20 | 182 |
|
21 |
| -if (title == "Access Blocked") { |
22 |
| - window.open("http://web.archive.org/save/" + loc, "_blank"); |
23 |
| - window.open("http://archive.is/?run=1&url=" + loc, "_blank"); |
24 |
| -} |
25 |
| - |
26 |
| -//http://web.archive.org/save/URL |
27 |
| - |
28 |
| -//http://archive.is/?run=1&url= |
| 183 | +const loc = window.location.href; |
| 184 | +window.open("http://archive.is/?run=1&url=" + loc); |
0 commit comments