summaryrefslogtreecommitdiff
path: root/misc/drupal.js
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-04-26 00:59:24 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-04-26 00:59:24 +0000
commitcf9f223cf5aa9a489db3520992ce7b85dcbfa220 (patch)
treec0bf7eb1c41873bbd5a70a61033174bac81341a4 /misc/drupal.js
parentfde09054f6dbc9a2fadff96ec03a69f31fddfaf2 (diff)
downloadbrdo-cf9f223cf5aa9a489db3520992ce7b85dcbfa220.tar.gz
brdo-cf9f223cf5aa9a489db3520992ce7b85dcbfa220.tar.bz2
#444352 by kkaefer: Remove the 4.7-era JS killswitch.
Diffstat (limited to 'misc/drupal.js')
-rw-r--r--misc/drupal.js26
1 files changed, 10 insertions, 16 deletions
diff --git a/misc/drupal.js b/misc/drupal.js
index 9e6d9c406..b0cf64ce1 100644
--- a/misc/drupal.js
+++ b/misc/drupal.js
@@ -16,11 +16,6 @@ if ($ === undefined) {
(function($) {
/**
- * Set the variable that indicates if JavaScript behaviors should be applied.
- */
-Drupal.jsEnabled = document.getElementsByTagName && document.createElement && document.createTextNode && document.documentElement && document.getElementById;
-
-/**
* Attach all registered behaviors to a page element.
*
* Behaviors are event-triggered actions that attach to page elements, enhancing
@@ -317,17 +312,16 @@ Drupal.ahahError = function(xmlhttp, uri) {
return message.replace(/\n/g, '<br />');
};
-// Global Killswitch on the <html> element.
-if (Drupal.jsEnabled) {
- // Global Killswitch on the <html> element.
- $(document.documentElement).addClass('js');
- // 'js enabled' cookie.
- document.cookie = 'has_js=1; path=/';
- // Attach all behaviors.
- $(document).ready(function() {
- Drupal.attachBehaviors(this, Drupal.settings);
- });
-}
+// Class indicating that JS is enabled; used for styling purpose.
+$('html').addClass('js');
+
+// 'js enabled' cookie.
+document.cookie = 'has_js=1; path=/';
+
+// Attach all behaviors.
+$(function() {
+ Drupal.attachBehaviors(document, Drupal.settings);
+});
/**
* The default themes.