For example, the following script works for Google search results but not for DuckDuckGo's because Google results are returned on www.google.com while DDG's are on duckduckgo.com.
/* ==UserStyle==
@name red visited search results
@description turn visited search results red
@match *://*.duckduckgo.com/*
@match *://*.google.com/*
==/UserStyle== */
:visited {
color: red !important;
}
The workaround is to change the match pattern to @match *://duckduckgo.com/*, but:
-
This contravenes the rules for match patterns (as required by Userscripts):
If the host is *.hostname, then it matches the specified host or any of its subdomains.
-
Makes the script dependent on Duckduckgo not adding a subdomain in the future.
System Information:
macOS version: 11.2.1
Userscripts version: 3.0.2
Safari version: 14.0.3
For example, the following script works for Google search results but not for DuckDuckGo's because Google results are returned on
www.google.comwhile DDG's are onduckduckgo.com.The workaround is to change the match pattern to
@match *://duckduckgo.com/*, but:This contravenes the rules for match patterns (as required by Userscripts):
Makes the script dependent on Duckduckgo not adding a subdomain in the future.
System Information: