StopTheMadness for Safari
URL Scheme Rules and Web URL Rules

StopTheMadness for Safari has the ability to automatically open clicked links in other apps, according to your preferences. You can define rules in StopTheMadness that specify which links open in which apps. Rules are defined in two different ways: by URL scheme, for example mailto, or by full URL, for example, https://docs.google.com. In StopTheMadness, select the "URL Scheme Rules" tab to define the former and the "Web URL Rules" to define the latter. The Web URL Rules handle links with the http or https scheme, while the URL Scheme Rules handle links with all other schemes (not http or https). The reason for the difference is that web URLs have a strict format with domains and paths that are understood by every web browser, whereas URLs with custom schemes may have a completely private format understood by only one app.

For your security, this feature is triggered only by your click on a link. StopTheMadness only responds to trusted clicks. In other words, the StopTheMadness URL rules cannot be triggered by JavaScript in the web page. You have to manually click on a link.

Tip: This feature works with ⌘-click as well as normal click. The reason is that many people ⌘-click links by habit, and you might not realize that the link matches one of your rules until after you click. If one of your rules is matched, then the link will be opened in the specified app instead of in a new tab.

URL Scheme Rules

This feature is enabled by default, but there are no rules by default, so it has no effect until you define some rules. If you define some rules, but you want to temporarily disable the rules without deleting them, just uncheck the checkbox at the top.

URL Scheme Rules tab

To define a new rule, click the + button and enter a URL scheme. Do not add the ":" character at the end of the scheme. You can only define one rule per scheme, and you cannot define rules for the http or https schemes. (Use Web URL Rules for an http or https URL.)

The "Open Clicked Link With" popup menu allows you to specify what happens when you click a link in Safari that has a certain URL scheme. The menu lists every app that can handle the URL scheme. The menu also contains the items "Default app for scheme" and "Don't open clicked link". If you select "Default app for scheme", then clicking a link with that scheme in Safari will open the default handler for that scheme, whichever app it happens to be at the time you click the link. If you select "Don't open clicked link", then clicking a link in Safari with the specified URL scheme will do nothing! The click will be cancelled. You may want this option to avoid accidentally opening an app, for example.

Open Clicked Link With popup

StopTheMadness only handles clicks on links with URL schemes that you've specified in your rules. Links with other URL schemes are handled by Safari as usual.

To delete a rule, select it in the list and press the - button. You can also use the Delete main menu command or its keyboard shortcut.

If there are open web pages in Safari when you make changes to your URL Scheme Rules, you may need to reload the page in Safari if you want the new rules to immediately take effect inside that open web page.

Web URL Rules

This feature is enabled by default, but there are no rules by default, so it has no effect until you define some rules. If you define some rules, but you want to temporarily disable the rules without deleting them, just uncheck the checkbox at the top.

Web URL Rules tab

To define a new rule, click the + button, and then edit the URL. You can use http* to match both http and https URLs. Without the * character, the http or https scheme must be matched exactly in the link. You can also use the * in front of the URL domain to automatically match subdomains. For example, *google.com will match google.com or www.google.com or docs.google.com. Without the * character, the URL domain must be matched exactly in the link. URL paths are automatically matched; don't put a * character at the end of the URL. If you want to match only specific URL paths, you can put the path at the end of the URL. For example, https://www.google.com/maps will only match Google Maps, not Google Search.

Web URL Rules are evaluated in order. The first rule to match the clicked link determines the action. You can drag and reorder rules in the list. In most cases, the order of the rules shouldn't matter, unless you have multiple rules that cover the same URL domain.

The "Open Clicked Link With" popup menu allows you to specify what happens when you click a link in Safari that has a certain web URL. The menu lists every web browser on your Mac. The menu also contains the items "Default web browser" and "Don't open clicked link". If you select "Default web browser", then clicking a link with that URL in Safari will open your default web browser, whichever app it happens to be at the time you click the link. If you select "Don't open clicked link", then clicking a link in Safari with the specified URL will do nothing! The click will be cancelled. You may want this option to avoid accidentally opening certain web sites, for example.

Open Clicked Link With popup

StopTheMadness and Link Unshortener were designed to work together. Link Unshortener counts as a web browser, because it can handle http and https links! You may want to define rules for well known link shortening services such bit.ly, t.co, and apple.news.

StopTheMadness only handles clicks on links with URLs that you've specified in your rules. Links with other URLs are handled by Safari as usual.

To delete a rule, select it in the list and press the - button. You can also use the Delete main menu command or its keyboard shortcut.

If there are open web pages in Safari when you make changes to your Web URL Rules, you may need to reload the page in Safari if you want the new rules to immediately take effect inside that open web page.

Support: Safari Support

Home: Home Page