How to override certain function in a module to disable the return value
The value returned from the implementations of hook_footer() is used from theme('closure').

function theme_closure($main = 0) {
  $footer = module_invoke_all('footer', $main);
  return implode("\n", $footer) . drupal_get_js('footer');
}


That function is called from template_preprocess_page(), which uses the following code:

  // Closure should be filled last.
  $variables['closure']           = theme('closure');

  if ($node = menu_get_object()) {
    $variables['node'] = $node;
  }


If you want not to print the value returned by hook_footer(), you have the following options. As you are talking of articles, I get you mean nodes whose content type is "article"; if you used the word articles to mean nodes, then remove the part that checks the value of the type property. 


Empty $variables['closure'] inside a preprocess function, which can be implemented in a module, or a theme (inside template.php). The following code is the code I would write for a theme.

function mytheme_preprocess_page(&amp;$variables) {
  if (!empty($variables['node']) &amp;&amp; $variables['node']-&gt;type == 'article' &amp;&amp; !$variables['node']-&gt;status) {
    $variables['closure'] = '';
  }
}


If you are not interested in the content type of the node, then the code becomes the following one:

function mytheme_preprocess_page(&amp;$variables) {
  if (!empty($variables['node']) &amp;&amp; !$variables['node']-&gt;status) {
    $variables['closure'] = '';
  }
}

In the page.tpl.php file you normally find the following code to print the value returned from hook_footer():

&lt;?php print $closure; ?&gt;


Replace that line with the following one:

&lt;?php if (!empty($node) &amp;&amp; $node-&gt;type != 'article' &amp;&amp; $node-&gt;status): ?&gt;
  &lt;?php print $closure; ?&gt;
&lt;?php endif; ?&gt;


If you just need not to print the value of $closure when a node is not published, independently from the content type of the node, then the code simply becomes:

&lt;?php if (!empty($node) &amp;&amp; $node-&gt;status): ?&gt;
  &lt;?php print $closure; ?&gt;
&lt;?php endif; ?&gt;



In this way, you can remove the value added to $closure from all the implementations of hook_footer(). You can also remove the part added from a specific module, if the module always adds the same string.

If you want to change the value returned from your implementation of hook_footer(), you can use menu_get_object() to get the node object associated to the page, if there is one.

function mymodule_footer() {
  $node = menu_get_object();

  if (!empty($node) &amp;&amp; $node-&gt;type == 'article' &amp;&amp; !$node-&gt;status) {
    return '';
  }

  // Return the value you would return when the node is published.
}