in hook_preprocess_node, how to tell if node is being edited? In hook_preprocess_node (or other themable hook), what is the easiest way to tell if node is being edited? I would like to add some javascript only when viewing the node, not editing.
hook_preprocess_node() doesn't get fired for node edit pages so you don't need to do any checks, you can just add your JS as normal.