Yes, though it's a bit technical.
Copy the following code and paste it in a text editor so you can modify it. When you are done editing it, paste the resulting code into your HTML page just before the </body> tag.
<script type="text/javascript">
//<[CDATA[
var links = document.getElementsByTagName('a');
for (var l = 0; l < links.length; l++) {
if(links[l].href.match(/^http:\/\/www\.example\.com/)){
links[l].className += " snap_noshots";
}
}
//]]>
</script>
The snap_noshots in the code above turns Snap Shots off for links to the domain www.example.com. But perhaps you have Snap Shots on your page turned off by default and you only want to turn them on for certain domains. Then you would use snap_shots.
- snap_noshots turns Snap Shots off for www.example.com.
- snap_shots turns Snap Shots on for www.example.com.
But probably you do not want to link to www.example.com at all, so here's what to do:
- First, notice that in the code "www.example.com" is written like this:
www\.example\.com
- So, replace
www\.example\.com with whatever domain name you please, but it must be written in the same fashion, with a backslash before each dot.
If you only want to turn Snap Shots on or off for one domain, then you are now done modifying the code. Just paste the modified code into your page just before the </body> tag and republish if necessary.
But perhaps you want to turn Snap Shots on or off for two or more domain names. Here's how:
- Replace the line in the code that contains
www\.example\.com with this line: if(links[l].href.match(/^http:\/\/(www\.example1\.com|www\.example2\.com)/)){
- With this line, Snap Shots will look for either www.example1.com or www.example2.com. Notice in this new bit of code that the two domains are separated with a vertical bar (
| ).
- You can add more domains simply by adding a vertical bar before each new domain, as shown in this replacement line of code. And, of course, remember to put a backslash (
\) before any dots.
Finally, paste the modified code into your HTML page just before the </body> tag, republish if necessary, and you are done.