{"id":13583451,"url":"https://github.com/imurray/redirectify","last_synced_at":"2025-04-06T18:32:21.614Z","repository":{"id":54159024,"uuid":"123783500","full_name":"imurray/redirectify","owner":"imurray","description":"Browser extension to redirect pages based on rules. Intended to stop the browser following links straight to the PDF of a paper, but instead to go first to the HTML index page for the paper.","archived":false,"fork":false,"pushed_at":"2024-06-06T09:03:53.000Z","size":51,"stargazers_count":155,"open_issues_count":6,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-05T23:41:52.749Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imurray.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-04T11:49:23.000Z","updated_at":"2024-09-17T17:48:06.000Z","dependencies_parsed_at":"2024-11-05T23:34:19.086Z","dependency_job_id":"6f180eb9-22a8-4a9e-9ecc-78d298d7560f","html_url":"https://github.com/imurray/redirectify","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imurray%2Fredirectify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imurray%2Fredirectify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imurray%2Fredirectify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imurray%2Fredirectify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imurray","download_url":"https://codeload.github.com/imurray/redirectify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247531233,"owners_count":20953919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:03:29.367Z","updated_at":"2025-04-06T18:32:20.182Z","avatar_url":"https://github.com/imurray.png","language":"JavaScript","readme":"# Redirectify\n\n\u003e :warning: **The Chrome version of this extension is currently in a [separate branch for Chrome](https://github.com/imurray/redirectify/tree/manifest3).**\n\u003e This branch is for the Firefox version.\n\u003e In theory I intend to unify the two versions, but no promises if/when I'll find the time.\n\nLinks to academic papers in emails and on websites often point to the PDF of the\npaper. However, on sites like [arXiv](https://arxiv.org/), I'd much rather be\npointed to the HTML page. The index page is quick to load, and has meta-data not\navailable in the PDF, such as the version history. I've given up trying to ask\npeople not to deep-link to PDFs, and have instead written a browser extension to\ndo what I want.\n\nInstall links: [Firefox](https://addons.mozilla.org/en-US/firefox/addon/redirectify/) and [Chrome](https://chrome.google.com/webstore/detail/redirectify/mhjmbfadcbhilcfdhkkepffbnjaghfie)\n\nAfter installing this extension, links to PDFs on quite a few academic pages\n(listed below) redirect to an HTML index page, unless you clicked on the link\nfrom the main site.\n\n* ACL Anthology: [this pdf link](https://www.aclweb.org/anthology/W19-4427.pdf) redirects to [this webpage](https://www.aclweb.org/anthology/W19-4427)\n* ACM: [this pdf link](https://dl.acm.org/ft_gateway.cfm?id=2670318\u0026ftid=1557218\u0026dwn=1\u0026CFID=12379622\u0026CFTOKEN=cdcc86cc1f6f814d-6AE9FE9E-CF62-4ED9-0EE360EB7CBB2E50) redirects to [this webpage](https://dl.acm.org/citation.cfm?id=2670318)\n* arXiv: [this pdf link](https://arxiv.org/pdf/1602.07527.pdf) redirects to [this webpage](https://arxiv.org/abs/1602.07527)\n* bioRxiv: [this pdf link](https://www.biorxiv.org/content/biorxiv/early/2017/09/18/113480.full.pdf) redirects to [this webpage](https://www.biorxiv.org/content/early/2017/09/18/113480)\n* Citeseerx: [this pdf link](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.115.6700\u0026rep=rep1\u0026type=pdf) redirects to [this webpage](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.115.6700)\n* Indico: [this pdf link](https://indico.cern.ch/event/24728/attachments/424989/590020/Kraft-Journal_Radiation_Research.07.pdf) redirects to [this webpage](https://indico.cern.ch/event/748043/contributions/3326031/)\n* JMLR: [this pdf link](http://www.jmlr.org/papers/volume17/16-272/16-272.pdf) redirects to [this webpage](http://www.jmlr.org//papers/v17/16-272.html)\n* JSTOR: [this pdf link](https://www.jstor.org/stable/pdf/105741.pdf?refreqid=excelsior) redirects to [this webpage](https://www.jstor.org/stable/105741)\n* NeurIPS: [this old-style pdf link](https://papers.nips.cc/paper/6084-fast-free-inference-of-simulation-models-with-bayesian-conditional-density-estimation.pdf) redirects to [this webpage](https://papers.nips.cc/paper/6084-fast-free-inference-of-simulation-models-with-bayesian-conditional-density-estimation). And [this new-style pdf link](https://papers.neurips.cc/paper/2016/file/6aca97005c68f1206823815f66102863-Paper.pdf) redirects to [this webpage](https://papers.neurips.cc/paper/2016/hash/6aca97005c68f1206823815f66102863-Abstract.html).\n* OpenReview: [this pdf link](https://openreview.net/pdf?id=rkdU7tCaZ) redirects to [this webpage](https://openreview.net/forum?id=rkdU7tCaZ)\n* PMLR: [this pdf link](http://proceedings.mlr.press/v9/murray10a/murray10a.pdf) redirects to [this webpage](http://proceedings.mlr.press/v9/murray10a.html)\n* Project Euclid: [this pdf link](https://projecteuclid.org/download/pdfview_1/euclid.ba/1480129463) redirects to [this webpage](https://projecteuclid.org/euclid.ba/1480129463). (Supporting URLs containing `Download?urlid=` turned out to be complicated. I may have to remove those rules if they cause too many issues.)\n* Research Gate: [this pdf link](https://www.researchgate.net/profile/Freek_Stulp/publication/268382567_Path_Integral_Reinforcement_Learning/links/5565ab6208ae94e957207459/Path-Integral-Reinforcement-Learning.pdf) redirects to [this webpage](https://www.researchgate.net/publication/268382567_Path_Integral_Reinforcement_Learning)\n* Semantic Scholar: [this pdf link](https://pdfs.semanticscholar.org/2a72/6fc0ea9fd9206b0fc08e69a3ebbdb9aedbcb.pdf) redirects to [this webpage](https://www.semanticscholar.org/paper/Comparing-Topic-Models-for-a-Movie-Recommendation-Bergamaschi-Po/2a726fc0ea9fd9206b0fc08e69a3ebbdb9aedbcb)\n\nI gave the extension a fairly generic name. The redirect rules are stored in\na list at the top of the code, and can easily be added to. However, making this\nlist updatable within the extension is unlikely to happen soon, partly because\nof time, partly because allowing any URL to be redirected opens up security issues.\n\n\n## Download\n\nIf you just want to use the extension as it is, get it from one of the official addon\nsites:\n\n* [Redirectify for Firefox](https://addons.mozilla.org/en-US/firefox/addon/redirectify/)\n\n* [Redirectify for Chrome](https://chrome.google.com/webstore/detail/redirectify/mhjmbfadcbhilcfdhkkepffbnjaghfie)\n\nUntil the branches are unified, the Chome and Firefox versions are likely to offer a slightly different set of redirects.\nThe Firefox version should work in Firefox for Android. It used to be\n[a bit of a pain to install Firefox extensions on Android](https://blog.mozilla.org/addons/2020/09/29/expanded-extension-support-in-firefox-for-android-nightly/),\nbut may be easier now.\n\n\n## Alternatives\n\n* [arxiv-url-replacer](https://github.com/jithurjacob/arxiv-url-replacer) a\n  different Chrome extension for arXiv, with a GUI. Edits links in pages, instead of\n  intercepting requests. A similar approach could be taken using\n  [TamperMonkey](https://tampermonkey.net/), which would immediately work in\n  multiple browsers. It can be tricky to catch all links though.\n\n* [Allen.YL Lee](https://twitter.com/allenyllee) points out that\n  a bookmarklet could be used to escape from a PDF after the fact, and\n  [provides an example](https://gist.github.com/allenyllee/0c90341680459203df6453b5d60d28f2).\n\nAnd see the forks of this Github repo.\n\n\n## Hacking\n\nThe code is written as a WebExtension for Firefox. It did work in Chrome, but\nGoogle are pulling support for the API it uses.\nThere's currently a [separate branch for Chrome](https://github.com/imurray/redirectify/tree/manifest3).\nMy intention is to move back towards a single code-base, but I want to wait for\nMozilla to settle on what their manifest v3 support will be, and I may not find\nthe time.\n\nIf you want to add to the redirect rules, you currently have to edit the source\ncode. To run the extension from the source:\n\n* Firefox: go to `about:debugging` and click \"Load Temporary Add-on\".\n  Select either of the files in the `src` directory. See [Mozilla's\n  WebExtensions documentation](https://developer.mozilla.org/en-US/Add-ons/WebExtensions)\n  for more details.\n\n* Chrome: see the [separate branch for Chrome](https://github.com/imurray/redirectify/tree/manifest3)\n\nIf proposing code, please check both of the following:\n\n* Requests for PDFs from external sites or the location bar are redirected.\n\n* Each redirect ends up at an HTML page with a link to the PDF, and clicking\n  that link does give the PDF.\n\nIf you add support for a new site, please add an example PDF URL to `test_cases`.\n\nExperience suggests I might take ages to look at proposed changes; sorry.\nI don't want to pester 100s of people with permissions warnings, so I\nwill delay adding support for new sites until I'm forced to make a major update (if ever).\nEventually I hope to make the rules configurable, opt-in, and use optional permissions.\nBut it's been years, and I haven't found the time to do it yet.\n\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimurray%2Fredirectify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimurray%2Fredirectify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimurray%2Fredirectify/lists"}