Remove inline JS from specific page type? This is an answer how to unset js from specific page types:
https://stackoverflow.com/questions/10138660/how-to-remove-css-and-js-from-a-certain-content-type-in-drupal-7
And I've made it for Syntax Highlighter module's js:

function tlito_theme_js_alter(&amp;$js) {
  if (arg(0) != 'node') {
    unset($js['sites/all/libraries/syntaxhighlighter/scripts/shCore.js']);
    unset($js['sites/all/libraries/syntaxhighlighter/scripts/shAutoloader.js']);
    unset($js['sites/all/modules/syntaxhighlighter/syntaxhighlighter.min.js']);
    unset($js['images/syntaxhighlighter.autoloader.js']);
  }
}


And everything is ok but also module adds inline JS that gives error on pages where js ar removed. Inline js is this:

&lt;script type="text/javascript"&gt;
&lt;!--//--&gt;&lt;![CDATA[//&gt;&lt;!--
SyntaxHighlighter.defaults.toolbar = false;
//--&gt;&lt;!]]&gt;
&lt;/script&gt;


How can I remove inline js from $scripts in my template.php ?
Put this inside tlito_theme_js_alter().

foreach ($js as $key =&gt; $value) {
  // Skip if data is not a string or is not inline.
  if (!is_string($value['data']) || $value['type'] !== 'inline') {
    continue;
  }
  // Remove SyntaxHighlighter.defaults.toolbar inline js.
  if (strpos($value['data'], 'SyntaxHighlighter.defaults.toolbar') !== FALSE) {
    // Remove from the js array &amp; exit loop.
    unset($js[$key]);
    break;
  }
}