How to automatically run actions on an URL
-
fluffybunnyflipflops last edited by
Hi all. I read Reddit a lot and posts often have links to various news websites with a paywall. You can often circumvent these paywalls by pasting the URL into archive.ph. Is there a way to:
- set up a shortcut, macro, or context action that will
- take the URL in the URL bar, copy it to clipboard
- amend the URL in the URL bar to archive.ph
- paste the URL in the search box
- press the 'save' button.
-
sgunhouse Moderator Volunteer last edited by
@fluffybunnyflipflops Should be easier than that. Opera thinks the Save button belongs to a Search field, meaning you could add it as a search engine. Hence you should be able to write a scriptlet (short javaxcript code) to do all that. Without using the clipboard. Though i can't look at the code while on my tablet, so I can't do that until I get home.
-
sgunhouse Moderator Volunteer last edited by
Hmm ... maybe not. The search URL has a "submitid" in it which may need to vary. The URL I got was
https://archive.ph/submit/?submitid=VbBHa8poOdCfAmPgUR%2BLyD9d4He7yw6EowYGGLIth7v0w%2BAle436FKEcy7Thpds4&url=%s
(In case it got wrapped, that's all one line.)
Well, one way to find out - try it.
-
sgunhouse Moderator Volunteer last edited by
@sgunhouse Well, archived this page as it existed at the time. See https://archive.ph/ooH5M. Now I need to think of a second page to archive to see if the same URL works twice. I'll have to think for a minute ...
-
sgunhouse Moderator Volunteer last edited by
@sgunhouse Okay, that may be a valid search URL then (that doesn't actually search).
Second test was https://archive.ph/Z4EKw (you can see the page from there)..
-
fluffybunnyflipflops last edited by
@sgunhouse Yeah, that works. I took your URL and replace %s with a paywalled Telegraph URL
It redirected to https://archive.ph/nHe56.
-
fluffybunnyflipflops last edited by
@sgunhouse How can I turn this into an automated action? Ideally, I'd like to right-click on a URL and select 'Archive.ph' (or something similar) and the paywalled URL opens in a new tab using the archive.ph URL above.
-
sgunhouse Moderator Volunteer last edited by
@fluffybunnyflipflops Unfortunately Opera doesn't let you customize menus. Someone who knows javascript might be able to write it as a bookmarklet. Alternatively (and probably the easiest), add it as a search engine and use that. That is, if the URL is already in your address bar, type your search shortcut (I assigned it as "s", so I just type s and a space before the URL) and press Enter. If the text of the URL is on the page somewhere, select it and use Search with > and select "archive.ph". Otherwise, copy the URL then in the address bar type your search shortcut and then paste the URL.
-
fluffybunnyflipflops last edited by
@sgunhouse Thanks, I've got that working. It's not quite a slick as I was hoping but it's certainly a lot better than copying and pasting URLs. Thanks for your help!