[HN Gopher] I ported the Firefox Archive.today extension to Safari
       ___________________________________________________________________
        
       I ported the Firefox Archive.today extension to Safari
        
       Author : codingpanic
       Score  : 111 points
       Date   : 2023-04-11 10:35 UTC (12 hours ago)
        
 (HTM) web link (apps.apple.com)
 (TXT) w3m dump (apps.apple.com)
        
       | wubbert wrote:
       | [dead]
        
       | pbj1968 wrote:
       | Maybe include some more verbose instructions on the screen that
       | displays on my iPad when I attempt to open the app. Following
       | instructions from other posters on this thread has it working
       | beautifully. Thanks!
        
         | codingpanic wrote:
         | Will do, thanks for the advice!
        
       | therealmarv wrote:
       | 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='http
       | s://archive.is/?run=1&url=%27+encodeURIComponent(document.locatio
       | n)
       | 
       | Other bookmarklet examples (12ft, Google Cache):                 
       | javascript:location.href='https://12ft.io/proxy?q=%27+encodeURICo
       | mponent(document.location)                 javascript:location.hr
       | ef='https://webcache.googleusercontent.com/search?q=cache:%27+loc
       | ation.href;{}
        
         | runjake wrote:
         | You beat me to it.
         | 
         | Personally, I have been using this variant:
         | javascript:location.href = '//archive.ph/newest/' +
         | location.href.split('?')[0];
        
         | maliker wrote:
         | 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 wrote:
           | archive.md/newest/<url> works.
        
         | dundarious wrote:
         | 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.
        
           | KMnO4 wrote:
           | 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.
        
             | codetrotter wrote:
             | Sounds intriguing. I currently copy the URL of any page I
             | am interested in and then open a new tab, click the
             | favourite for archive.is and then paste the URL and hit
             | save. Then I do the same with web.archive.org/save
             | 
             | If shortcuts can make this process faster and require fever
             | steps when I use them, I would like to have a shortcut for
             | each of those two archive sites.
             | 
             | Anyone have good shortcut to share for either of the two
             | archive sites?
             | 
             | I found some but neither of the ones I tried were quite
             | perfect. The one for Wayback Machine navigated there but
             | did not automatically start the save. The one for
             | archive.is activated reader mode after archiving.
        
               | dundarious wrote:
               | I would not seek perfection from a Shortcut. A 90%
               | solution is commonly achievable though. I shared an
               | archive.ph one in another comment.
               | 
               | As for Reader mode, I think you just need to go to the
               | site again, hit "aA", "Website settings", and disable
               | "Use Reader mode automatically".
        
           | LordDragonfang wrote:
           | 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)
        
       | codingpanic wrote:
       | 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 wrote:
         | Congrats man, this should be useful!
        
       | Tempest1981 wrote:
       | 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 wrote:
         | 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!
        
           | codingpanic wrote:
           | Issue fixed, and a new build has been submitted
        
           | Tempest1981 wrote:
           | Ah, yep, changing the permissions from "Ask" to "Allow" is a
           | workaround:
           | 
           | Settings > Safari > Extensions > Archive Page > All Websites
           | > Allow
        
       | louhike wrote:
       | Is it region lock? I cannot access the page from France.
        
         | codingpanic wrote:
         | Apple has some SSL export restrictions I've yet to successfully
         | navigate. Will have this fixed in the next version.
        
           | louhike wrote:
           | Thanks!
        
       | js2 wrote:
       | 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 wrote:
         | 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 wrote:
           | New build submitted.
        
             | HeavyFeather wrote:
             | 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.
        
               | codingpanic wrote:
               | 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.
        
               | HeavyFeather wrote:
               | 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.
        
       | Sporktacular wrote:
       | Thank you. Nice to see some love given to Safari.
        
       | [deleted]
        
       | dundarious wrote:
       | 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 wrote:
         | Can you share the shortcut or explain how it works. I dont have
         | much experience with custom shortcuts yet.
        
           | dundarious wrote:
           | 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).
        
       | marban wrote:
       | Surprised that this sailed through MAS's review.
        
       | [deleted]
        
       | xylo wrote:
       | Here's my bookmark that works on Web, iOS, iPad
       | javascript: (function() {(function(){var url
       | =window.location.href; let newUrl        ="https://archive.ph/sub
       | mit/?url="+encodeURIComponent(url.split('?')[0]);
       | window.open(newUrl, "_self");})()})()
        
       | LeoNatan25 wrote:
       | It only redirects to the Archive homepage.
        
         | CameronBanga wrote:
         | 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.
        
           | codingpanic wrote:
           | This will no longer be needed with the next release, awaiting
           | app review approval.
        
         | codingpanic wrote:
         | This should be the expected behavior when pressing the button
         | on a new Safari tab. Otherwise, should redirect to the URL your
         | current open tab is displaying.
        
           | LeoNatan25 wrote:
           | Then something in the UX is broken. From your store images, I
           | understood that clicking on that tab menu item, it would
           | display last archive date and ask to rearchive, no?
           | 
           | There is a reason why most Safari extensions apps do not just
           | show an icon and a label, but actually explain how to use
           | their embedded extensions.
        
             | codingpanic wrote:
             | The extension is open source, I'm open to new ideas on how
             | to improve this further. The current Edge/Firefox
             | extensions just error out, and this was not acceptable for
             | this version of the extension per the AppStore rules.
             | 
             | You can make any suggestions here:
             | https://github.com/gnormandin/Archive-Page/issues
        
       | brainzap wrote:
       | thank you
        
       | KiDD wrote:
       | It isn't loading the website url into the archive search
        
         | codingpanic wrote:
         | New build submitted that will fix this issue.
        
       ___________________________________________________________________
       (page generated 2023-04-11 23:01 UTC)