Readit News logoReadit News
therealmarv · 3 years ago
You don't need an extension for that and allow questionable privacy settings like "access to all websites". Just use a bookmarklet (create a new bookmark e.g. in your top bar and add this code as URL):

  javascript:location.href='https://archive.is/?run=1&url=%27+encodeURIComponent(document.location)
Other bookmarklet examples (12ft, Google Cache):

  javascript:location.href='https://12ft.io/proxy?q=%27+encodeURIComponent(document.location)

 
 javascript:location.href='https://webcache.googleusercontent.com/search?q=cache:%27+location.href;{}

dundarious · 3 years ago
Shortcuts are good for this type of functionality as well, and as a bonus, can be used from within apps like Twitter via the share sheet.
LordDragonfang · 3 years ago
For any non-Apple-users browsing this comment thread, "Shortcuts" is Apple's visual-scripting automation language for iOS and MacOS.

https://en.wikipedia.org/wiki/Shortcuts_(app)

KMnO4 · 3 years ago
Shortcuts are actually very underrated since they can run JS on webpages. A lot of things are possible that wouldn’t otherwise be possible on iOS.
runjake · 3 years ago
You beat me to it.

Personally, I have been using this variant:

  javascript:location.href = '//archive.ph/newest/' + location.href.split('?')[0];

maliker · 3 years ago
I've been doing this for years but missed the run=1 argument in archive.today to go directly to the latest copy instead of the list of all copies. Thank you!
dundarious · 3 years ago
archive.md/newest/<url> works.
codingpanic · 3 years ago
Finally published my first anything on the Apple AppStore by porting the Archive.Today extension to Safari. Works on iPad, iPhone, and Mac.

I was tired of copying and pasting when I wanted to use the Archive service on HN articles, so here you go!

stevanl · 3 years ago
Congrats man, this should be useful!
dundarious · 3 years ago
Congrats to the author.

I’ve been using a homemade Shortcut for the same purpose. They’re great when you want a bit of control over such things. For example, expanding the url (following all redirects) before sending it to archive.ph/md/is, 12ft.io, or Reading List, etc. It’s very annoying having t.co urls in Reading List in particular.

devracca · 3 years ago
Can you share the shortcut or explain how it works. I dont have much experience with custom shortcuts yet.
dundarious · 3 years ago
https://www.icloud.com/shortcuts/9053ccad1b4c4c688537ebf4716...

You can edit the resulting url before opening it or copying it, and choose between archive.ph, .md, etc. Editing is useful if you want to get rid of utm_source arguments, etc.

Apple’s Shortcuts is just a hodgepodge of built in functions, the best way to learn is just to try build something like this. You’ll be searching a few times for the little function you want until you find the right name for it. As far as discoverability goes, it’s OK, gets the job done. Naming things is weird too — let’s say you make a Text block, then you can only seem to name it when you reference it elsewhere (Select Magic Variable, scroll and tap it, then highlight it and Rename from the menu).

js2 · 3 years ago
Note: you have to both enable the extension and set its permissions for "All Websites" to "Allow". If you have its permissions set to "Ask" then it will take you to archive.ph but not actually load the current tab's URL.

This explains the behavior folks are commenting on here where it appears not to work.

codingpanic · 3 years ago
Thanks for the feedback, I'll work on fixing this. Alternatively, you can also open an issue here: https://github.com/gnormandin/Archive-Page/issues
codingpanic · 3 years ago
New build submitted.
Tempest1981 · 3 years ago
Thank you!

Just tried it at Bloomberg.com and wsj.com -- it redirected me to https://archive.ph/ and then again to https://archive.ph/

I'm on latest iOS.

codingpanic · 3 years ago
Yeah, there should be two redirects. The first is searching for the URL you entered, the second should either newly cache the page, or load the cached page. Same behavior as firefox.

If this is not what you are seeing, please open an issue on the github at: https://github.com/gnormandin/Archive-Page/issues

So I can keep track of issues encountered.

Thanks!

Tempest1981 · 3 years ago
Ah, yep, changing the permissions from "Ask" to "Allow" is a workaround:

Settings > Safari > Extensions > Archive Page > All Websites > Allow

codingpanic · 3 years ago
Issue fixed, and a new build has been submitted
Sporktacular · 3 years ago
Thank you. Nice to see some love given to Safari.

Deleted Comment

xylo · 3 years ago
Here's my bookmark that works on Web, iOS, iPad

  javascript: (function() {(function(){var url =window.location.href; let newUrl 
  ="https://archive.ph/submit/?url="+encodeURIComponent(url.split('?')[0]); 
  window.open(newUrl, "_self");})()})()