1. some Drupal modules use hook_page_alter to add js to the $page['page_bottom'] region.
$page_bottom and $page['page_bottom'] are explained here: http://drupal.org/update/modules/6/7#hook_footer
2. I now want to change the scope of other js to be at the bottom of the page but at the top of $page['page_bottom'] so as to come before the inline js injected in 1.
I can't seem to do it.
in hook_js_alter, scope can be header, footer. $page_bottom, $page, $page['page_bottom'] are not available to hook_js_alter.
in hook_js_alter:
$script['scope'] = 'footer'; works
but
$script['scope'] = $page_bottom; does not.
While group and weight work within hook_js_alter, they can't be used to alter the position vs. js added using hook_page_alter.