A bookmarklet containing
window.location.replace("https://scribe.rip"+location.pathname+location.search+location.hash) works if you click it manually.
What's the best solution to redirect these pages? Use JS to detect Medium pages using a heuristic? Detect IP addresses like uBlock Origin does (https://github.com/gorhill/uBlock/wiki/Permissions#access-ip-address-and-hostname-information)?
A while back I added support for medium's redirectUrl query param. When scribe sees redirectUrl in the query params, it will look for the post id there instead of in the URLs path. Many (all?) custom domains first get routed through a URL that looks like this:
https://medium.com/m/global-identity?redirectUrl=<original, escaped blog post url>
If you're using the redirector extension mentioned in the FAQ, it will see this medium.com URL and automatically redirect to Scribe, properly rendering the page. When I clicked on your link above, this is what happened for me in my browser.
Is this something you've tried at all? If so, do you feel like it solves the problem?
I didn't install Redirector because I didn't want an extra extension and already had Violentmonkey for userscripts. (But it seems Redirector is faster to redirect than Violentmonkey, even when it's set to
In any case, neither Violentmonkey set to
@include /^https?://(?:.*\.)*(?<!link\.)medium\.com(/.*)?$/, nor Redirector set to
^https?://(?:.*\.)*(?<!link\.)medium\.com(/.*)?$, redirect the above site. And looking at Firefox's network inspector with "persist logs" enabled, the page does not redirect me through
I found that global-identity is only triggered on the first visit to a Medium domain (or first refresh after clearing that domain's cookies, by clicking Firefox's Lock ("Site information for blogg.bekk.no") → "Clear cookies and site data"). Subsequent page refreshes, navigating back and clicking on the same link, and clicking on a link to a different page on the same domain don't cause a global-identity redirect. Logging into medium.com on a different tab and refreshing the custom domain triggers global-identity (logging into Medium on the custom domain doesn't). Logging out from the custom domain, or logging out from medium.com and refreshing the custom domain, both triggers global-identity.
In summary, I think the global-identity redirect only occurs on first visit to a custom Medium domain, or when the logged-in state changes. And this isn't reliable enough to redirect all visits to a Medium proxy domain to scribe.rip.
Gotcha, thanks for the research. Anecdotally, this is not my experience on my version of Firefox, but that doesn't help you much, now does it? 😂
Other than Scribe supporting that redirect, I'm not sure what else the Scribe website can do. Scribe can only act when a user is on scribe.rip (or its other instances) and not before. This has to be handled by the browser or an extension to the browser, and I'm not interested in writing an extension at this time.
One thing you could do is block medium.com entirely. All Scribe needs to render an article is the post ID a the end of the URL. In your post example it would be
fb0b36601557. Visiting https://scribe.rip/fb0b36601557 works. When you get to a website like bekk, you could grab the post id and be on your way.