diff --git tinybrowser.module tinybrowser.module
index af80807..ba26cd6 100644
--- tinybrowser.module
+++ tinybrowser.module
@@ -34,7 +34,7 @@ function tinybrowser_get_tinymce_root() {
 function tinybrowser_init() {
   if (module_exists("tinytinymce") || module_exists("fckeditor") || module_exists("ckeditor")) {
     if (tinybrowser_access()) {
-      drupal_add_js(drupal_get_path('module', 'tinybrowser') .'/tinybrowser/tb_tinymce.js.php');
+      tinybrowser_add_js();
       $_SESSION['tinybrowser_module'] = TRUE;
     }
   }
@@ -53,7 +53,7 @@ function tinybrowser_wysiwyg_plugin($editor, $version) {
       }
       if (!isset($integrated[$editor])) {
         $integrated[$editor] = TRUE;
-        drupal_add_js(drupal_get_path('module', 'tinybrowser') .'/tinybrowser/tb_tinymce.js.php');
+        tinybrowser_add_js();
         $_SESSION['tinybrowser_module'] = TRUE;
       }
       return array(
@@ -74,7 +74,7 @@ function tinybrowser_wysiwyg_plugin($editor, $version) {
       }
       if (!isset($integrated[$editor])) {
         $integrated[$editor] = TRUE;
-        drupal_add_js(drupal_get_path('module', 'tinybrowser') .'/tinybrowser/tb_tinymce.js.php');
+        tinybrowser_add_js();
         $_SESSION['tinybrowser_module'] = TRUE;
       }
       $popup_win_size = variable_get('tinybrowser_popup_window_size', '770x480');
@@ -109,7 +109,7 @@ function tinybrowser_wysiwyg_plugin($editor, $version) {
       }
       if (!isset($integrated[$editor])) {
         $integrated[$editor] = TRUE;
-        drupal_add_js(drupal_get_path('module', 'tinybrowser') .'/tinybrowser/tb_tinymce.js.php');
+        tinybrowser_add_js();
         $_SESSION['tinybrowser_module'] = TRUE;
       }
       $popup_win_size = variable_get('tinybrowser_popup_window_size', '770x480');
@@ -1012,7 +1012,7 @@ function tinybrowser_textarea($element) {
     }
   }
   if ($ids && isset($ids[$element['#id']])) {
-    drupal_add_js(drupal_get_path('module', 'tinybrowser') .'/tinybrowser/tb_standalone.js.php');
+    tinybrowser_add_js(TRUE);
     $element['#description'] .= '<div class="tinybrowser-inline-wrapper">'
       . t('Insert !image or !link.',
         array(
@@ -1027,3 +1027,16 @@ function tinybrowser_textarea($element) {
   return $element;
 }
 
+/**
+ * Add needed JS files.
+ */
+function tinybrowser_add_js($standalone = FALSE) {
+  $filename = 'tb_tinymce';
+  
+  if ($standalone) {
+    $filename = 'tb_standalone';
+  }
+  
+  // Don't preprocess files!
+  drupal_add_js(drupal_get_path('module', 'tinybrowser') . "/tinybrowser/$filename.js.php", 'module', 'header', FALSE, TRUE, FALSE);
+}
\ No newline at end of file
diff --git tinybrowser.userpage.inc tinybrowser.userpage.inc
index d0fb984..6d27f69 100644
--- tinybrowser.userpage.inc
+++ tinybrowser.userpage.inc
@@ -23,7 +23,7 @@ function tinybrowser_user_page_access($account, $user = FALSE) {
  * Contents of user account page
  */
 function tinybrowser_user_page($account) {
-  drupal_add_js(drupal_get_path('module', 'tinybrowser') .'/tinybrowser/tb_standalone.js.php');
+  tinybrowser_add_js(TRUE);
   $content  = '<p>';
   $content .= '<div id="tabs">';
   $content .= t('Please use the link below to browse files') . '<br/>';
