Skip to content

Instantly share code, notes, and snippets.

@joates
Created May 20, 2014 13:10
Show Gist options
  • Save joates/7b5dd747ffab31b84063 to your computer and use it in GitHub Desktop.
Save joates/7b5dd747ffab31b84063 to your computer and use it in GitHub Desktop.
;(function (d) {
Drupal.behaviors.noThanksIllUseJavascript = {
attach: function (context, settings) {
// initialize
while(d.body.firstChild) {
d.body.removeChild(d.body.firstChild)
}
// your javascript code here..
//console.log('settings:', settings)
}
}
})(document)
@joates
Copy link
Author

joates commented May 20, 2014

DON'T USE THIS

it's just a joke.. it destroys all the DOM children that Drupal created (clears the page ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment