diff --git a/libraries.module b/libraries.module
index 6b47484..f82e7a9 100644
--- a/libraries.module
+++ b/libraries.module
@@ -6,6 +6,18 @@
  */
 
 /**
+ * Implements hook_init().
+ *
+ * Extends Drupal.settings to make the libraries path available to scripts.
+ */
+function libraries_init() {
+  $libraries = libraries_get_libraries();
+  foreach($libraries as $library=>$path) {
+    drupal_add_js(array('libraries' => array($library . 'Path' => $path)), 'setting');
+  }
+}
+
+/**
  * Gets the path of a library.
  *
  * @param $name
