If the visiting browser doesn't have Javascript enabled he gets something like
"info(picture of the at-character)example [dot] com".

Is there a way to add some custom text here that this e.g. reads
"info(picture of the at-character)example [dot] com (Note: please activate Javascript in your browser in order to have a automatic mailto-link for all mailadresses on this website)"

TIA

Comments

peterx’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

You could add a message but you have to detect the lack of Javascript and there are other modules designed for that.

You cannot rely on browser information before you generate the page because the "agent" string is often fake for various reasons. The only reliable way to detect Javascript is to present an intermediate page then redirect with the redirection different based on the use of Javascript. Google hates redirects of that nature and will drop your site right down the list.

You are then left with the option of always displaying the Javascript message and using Javascript to remove the message. People will see the message during the whole page flash before Javascript changes the page.

Google and other bots will see the version without Javascript. Your entries in Google will show the Javascript message instead of the information you want.

You need a different module, one attached to the first page view, to test for Javascript and to set something in the visitor's session. Drupal 7's Ajax code does something like that. The code adds nojs to the end of the URL in a link then Javascript changes nojs to ajax.

A test of that scope is beyond this module because this module does not run on every page.