{"id":17527083,"url":"https://github.com/git-shawn/Rerouter","last_synced_at":"2025-03-06T06:31:35.266Z","repository":{"id":62278351,"uuid":"415072915","full_name":"git-shawn/Rerouter","owner":"git-shawn","description":"Rerouter automatically opens Google Maps directions in Apple Maps.","archived":false,"fork":false,"pushed_at":"2023-08-30T03:24:26.000Z","size":11658,"stargazers_count":21,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-08-30T10:50:24.604Z","etag":null,"topics":["apple-maps","google-maps","safari-extension","swiftui"],"latest_commit_sha":null,"homepage":"https://www.fromshawn.dev/rerouter","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/git-shawn.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}},"created_at":"2021-10-08T17:27:13.000Z","updated_at":"2023-08-23T21:59:55.000Z","dependencies_parsed_at":"2023-01-23T05:16:05.798Z","dependency_job_id":null,"html_url":"https://github.com/git-shawn/Rerouter","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-shawn%2FRerouter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-shawn%2FRerouter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-shawn%2FRerouter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-shawn%2FRerouter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/git-shawn","download_url":"https://codeload.github.com/git-shawn/Rerouter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242161719,"owners_count":20081932,"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":["apple-maps","google-maps","safari-extension","swiftui"],"created_at":"2024-10-20T15:03:07.848Z","updated_at":"2025-03-06T06:31:34.820Z","avatar_url":"https://github.com/git-shawn.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# Rerouter 🗺\n\nRerouter is an unobtrusive Safari Extension made to do just one thing—open Google Maps links in Apple Maps. Setup is easy and rerouting happens privately and automatically. Next time you search for \"hikes near me\" you can get to the trail quicker than ever before.\n\nAvailable for iOS and macOS.\n\n[**Download Here**](https://apps.apple.com/us/app/id1589151155)\n\n\u003ca href=\"https://testflight.apple.com/join/gQHgloIz\"\u003e\u003cimg alt=\"Join TestFlight Beta\" src=\"https://raw.githubusercontent.com/git-shawn/QR-Pop/main/GitHubResources/TestflightButton.png\" width=\"180\"\u003e\u003c/a\u003e\n\n## Privacy 🕵️\n\nRerouter performs all processing directly on your device and does not collect any user data. \n\n[**Privacy Policy**](https://www.fromshawn.dev/rerouter/privacy-policy)\n\n## How it Works 🛠️\nRerouter starts by testing the page's URL against this regex defined by Google:\n\n```\n(http(s?)://)?\n((maps\\.google\\.{TLD}/)|\n ((www\\.)?google\\.{TLD}/maps/)|\n (goo.gl/maps/))\n.*\n```\n\nIf there's a match, Rerouter will then begin to parse the `data=` parameter of the Google Maps URL. Occasionally, the data parameter may contain encoded values representing coordinates that can be extracted and sent to Apple Maps. More often, however, the data portion only contains a proprietary \"Place ID.\"\n\nIf no useful information can be extracted, Rerouter will then begin examining the path for indicators that can be converted. This includes parameters such as `dir/`, `/@Lat,Long,Z`, etc. \nIf no useful information can be found in the path, Rerouting fails. To avoid this, Rerouter will attempt to expand the link via an ephemeral `URLSession` to hopefully fetch a viable path.\n\nAs a single page application, Google Maps is constantly and silently changing the path of its URL. Rerouter observes all changes in the DOM tree while the user is navigating a Google Maps webpage in an attempt to find a URL that can be successfully converted. When one is found, observing ends and the user is prompted to open Apple Maps.\n\nDue to the server-side nature of Apple's [Universal Links](https://developer.apple.com/ios/universal-links/) system, it is unlikely that Rerouter can redirect a link *before* the user is sent to the Google Maps app. Because of this, Rerouter may not work with Google Maps installed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-shawn%2FRerouter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgit-shawn%2FRerouter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-shawn%2FRerouter/lists"}