diff --git a/js/supertable.js b/js/supertable.js
index 10d0824..1bd8578 100644
--- a/js/supertable.js
+++ b/js/supertable.js
@@ -1,13 +1,18 @@
 (function ($) {
+  "use strict";
 
-Drupal.behaviors.views_supertable = {
-  attach: function (context) {
-  	  $("#edit-id-search").quicksearch("table tbody tr", {
-	      noResults: '#noresults',
-	      stripeRows: ['odd', 'even'],
-	      loader: 'span.loading'
-	    });  
-  }
-};
+  Drupal.behaviors.viewsSupertable = {
+    attach: function (context) {
+      if (typeof $.fn.quicksearch === 'undefined') { return; }
+
+      $("input#edit-id-search", context).once('viewsSupertable', function() {
+        $(this).quicksearch("table tbody tr", {
+          noResults: '#noresults',
+          stripeRows: ['odd', 'even'],
+          loader: 'span.loading'
+        });
+      });
+    }
+  };
 
 })(jQuery);
diff --git a/theme/views_supertable.theme.inc b/theme/views_supertable.theme.inc
index 0e2847d..3225d4f 100644
--- a/theme/views_supertable.theme.inc
+++ b/theme/views_supertable.theme.inc
@@ -29,9 +29,6 @@ function template_preprocess_views_supertable(&$vars) {
     $query += $view->exposed_raw_input;
   }
 
-  drupal_add_js('http://github.com/riklomas/quicksearch/raw/dev/jquery.quicksearch.js', 'external');
-  drupal_add_js(drupal_get_path('module', 'views_supertable') .'/js/supertable.js', 'file');
-
   $search_form = drupal_get_form('supertable_search_form');
   $vars['page_header'] = render($search_form);
 
@@ -193,16 +190,30 @@ function template_preprocess_views_supertable(&$vars) {
 
 function supertable_search_form($form, &$form_state) {
 
-   $form['fieldset'] = array(
+  $form['fieldset'] = array(
     '#type' => 'fieldset',
-   );
+  );
 
-   $form['fieldset']['id_search'] = array(
+  $form['fieldset']['id_search'] = array(
     '#title' => t('Search table'),
     '#type' => 'textfield',
     '#action' => '#',
     '#suffix' => "<span class='loading'>Loading...</span>",
-   );
-
-   return $form;
+  );
+
+  // Add jquery.quicksearch library.
+  // Have to use rawgit.com since github doesn't serve file MIME info anymore
+  // and newer browsers need text/javascript type.
+  $form['#attached']['js'][] = array(
+    'data' => '//rawgit.com/riklomas/quicksearch/f984f7f92ed8f24ef6d8aec0d47724eaf6f246ce/jquery.quicksearch.js',
+    'type' => 'external',
+  );
+
+  // Add module js.
+  $form['#attached']['js'][] = array(
+    'data' => drupal_get_path('module', 'views_supertable') . '/js/supertable.js',
+    'type' => 'file',
+  );
+
+  return $form;
 }
