From a8de1e92d73a673dc7404e5aa82de1df35f834be Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 22 Aug 2006 09:00:31 +0000 Subject: - Patch #76637 by timnc: streamline JavaScript addition and add settings storage. --- misc/drupal.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'misc/drupal.js') diff --git a/misc/drupal.js b/misc/drupal.js index 4fd536463..6fb336b56 100644 --- a/misc/drupal.js +++ b/misc/drupal.js @@ -21,6 +21,19 @@ if (isJsEnabled()) { document.documentElement.className = 'js'; } +Drupal = { }; + +Drupal.extend = function(obj) { + for (var i in obj) { + if (this[i]) { + Drupal.extend.apply(this[i], [obj[i]]); + } + else { + this[i] = obj[i]; + } + } +} + /** * Make IE's XMLHTTP object accessible through XMLHttpRequest() */ -- cgit v1.2.3