Parent Directory
|
Revision Log
|
Revision Graph
bringing firebug to drupal
| 1 | // $Id: |
| 2 | // Firebug Controls |
| 3 | |
| 4 | var firebug = {}; |
| 5 | |
| 6 | firebug.toggle = function(event) { |
| 7 | if (!this.opened) { |
| 8 | window.console.open(); |
| 9 | this.opened = true; |
| 10 | } else { |
| 11 | window.console.close(); |
| 12 | this.opened = false; |
| 13 | } |
| 14 | |
| 15 | return false; |
| 16 | }; |
| 17 | |
| 18 | // Global Killswitch. |
| 19 | if (Drupal.jsEnabled) { |
| 20 | $(document).ready(function() { |
| 21 | if (Drupal.settings.firebug.icon && !console.firebug) { |
| 22 | var link = $('<a href="#firebug" title="Firebug"><img src="'+ Drupal.settings.firebug.path +'/firebug/firebug3.jpg" alt="Firebug" /><a>').click(firebug.toggle); |
| 23 | $('<div id="firebug_icon"></div>').css({position: 'fixed', top: '5px', right: '10px'}).append(link).prependTo(document.body); |
| 24 | } |
| 25 | }); |
| 26 | } |
| ViewVC Help | |
| Powered by ViewVC 1.1.2 |