Live data from Hacker News

I ported the Firefox Archive.today extension to Safari

apps.apple.com

31–40 of 47 posts

Re: I ported the Firefox Archive.today extension to Safari

#31

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+encodeURIComponen…

You beat me to it.

Personally, I have been using this variant:

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

Re: I ported the Firefox Archive.today extension to Safari

#33

Earlier quoted context omitted.

I don’t see any changes on the repo. The permissions in your case should just be activeTab and storage. That’s it. You can run the extension via chrome.browserAction.onClick and it will receive the URL. You also don’t need the tabs permission just to create a tab.

The issue is that if you do not set permissions in the manifest, clicking allow in the safari UI would only return a blank URI, "". The original extension in this case would also just return an error. I've modified the manifest so that it is asking Safari for wider permissions, so that when the permission is granted by the user, the proper URL is returned.

I think that’s a Safari bug with activeTab, you just have to click twice.

Regardless, with activeTab you can just inject script into the page itself through which you can open a regular popup.

    chrome.scripting.executeScript({
      func: () => window.open(' archive.ph' + location.href)
    })
Currently the extension will suggest that it needs access to every page the user visits, occasionally opening a popup automatically if I remember correctly.

For something that’s a glorified bookmarklet, that’s a lot to ask.

Re: I ported the Firefox Archive.today extension to Safari

#34

It only redirects to the Archive homepage.

You need to go into the Extension preference page for the extension, and hit the "Allow Access" permission box for allowing access to web url/link information. I can't remember exact wording, but should essentially be one option here and you have to enable it so that it has permission to pass along URL.

Re: I ported the Firefox Archive.today extension to Safari

#35

It only redirects to the Archive homepage.

You need to go into the Extension preference page for the extension, and hit the "Allow Access" permission box for allowing access to web url/link information. I can't remember exact wording, but should essentially be one option here and you have to enable it so that it has permission to pass along URL.

This will no longer be needed with the next release, awaiting app review approval.

Re: I ported the Firefox Archive.today extension to Safari

#36

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.

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!

Ah, yep, changing the permissions from "Ask" to "Allow" is a workaround:

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

Re: I ported the Firefox Archive.today extension to Safari

#37

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+encodeURIComponen…

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.

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)

Re: I ported the Firefox Archive.today extension to Safari

#38

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+encodeURIComponen…

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.

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.

Re: I ported the Firefox Archive.today extension to Safari

#40

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.

Can you share the shortcut or explain how it works. I dont have much experience with custom shortcuts yet.
Post reply on HN