By default WordPress doesn’t lets you use JavaScript in its default text widgets. There are some WordPress themes that automatically allows JS in text widgets after activation. Earlier we discussed about a plugin that allows you to use JavaScript inside your WordPress blog posts and pages, we have also posted a tutorial on a plugin that lets you use PHP in text widgets and another tutorial on plugin that lets you use PHP inside blog posts, pages and other content types etc.
Now this tutorial explains you how you can start using JavaScript in text widgets so that you can use Google Adsense and similar stuff in WordPress sidebar easily.
Enhanced Text Widget
Enhanced Text Widget is an enhanced version of default text widget that lets you have Text, HTML, CSS, JavaScript, Flash, WordPress Shortcodes and/or PHP as content with linkable widget title.
Plugin Options allows you to use Custom Title, URL, Widget CSS class, Content which supports Text, HTML, CSS, JavaScript, Flash, WordPress Shortcodes and PHP, Hide display title, Open URL in new window, Automatically add paragraphs, Do not output before/after_widget/title
Allow Javascript in Text Widgets (Intended For Multisite Networks)
Allow Javascript in Text Widgets is another free WordPress plugin intended for Multisite Networks. The plugin replaces default text widget with one that allows Javascript so that you can easily use Google Adsense and other JavaScripts in sidebar without using any other plugin.
Install and activate Allow Javascript in Text Widgets then visit Dashboard -> Appearance -> Widgets and start using JavaScript in your text widgets.