How to remove a "new" indicator when clicking on a link? I'm showing a list of content in a view and there is a red &quot;new&quot; indicator (field content: has new content) next to the title link. The problems is that when you click a link to read the content and then click back the &quot;new&quot; indicator is still shown.
I don't want to reload the list page every time I click the back button. I'm thinking about using some javascript/css to remove the &quot;new&quot; indicator when you click on the link. Is there a &quot;Drupal&quot; way of doing this?
Screenshot:
The theme function used to add that marker is theme_mark(). You can override that theme function to avoid it adds the "new" marker. Supposing that you override theme_mark() with mymodule_theme_mark(), you could use the following code:

function mymodule_theme_mark($variables) {
  global $user;

  if (!empty($user-&gt;uid) &amp;&amp; $variables['type'] == MARK_NEW) {
    $variables['type'] = MARK_READ;
  }

  return theme_mark($variables);
}


The theme function is used, for example, in node_admin_nodes(), and in theme_node_recent_content(); the latter function calls the theme function using the following code.

$output .= theme('mark', array('type' =&gt; node_mark($node-&gt;nid, $node-&gt;changed)));
$output .= '&lt;/div&gt;&lt;div class="node-author"&gt;';
$output .= theme('username', array('account' =&gt; user_load($node-&gt;uid)));


Even better, since preprocess functions are called also for theme function not using a template file, you can use the following code.

function mymodule_preprocess_theme_mark(&amp;$variables) {
  global $user;

  if (!empty($user-&gt;uid) &amp;&amp; $variables['type'] == MARK_NEW) {
    $variables['type'] = MARK_READ;
  }
}


This code is preferable because:


What you really need to do is changing the value of a variable passed to the theme function, not altering the output of the theme function, and the preprocess function is perfect for this case
The code works also when another module override the theme function, while the code I shown earlier makes the assumption no other module overrode the theme function