? .git
Index: devel_themer.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/devel/devel_themer.js,v
retrieving revision 1.17.2.7
diff -u -p -r1.17.2.7 devel_themer.js
--- devel_themer.js	7 Apr 2009 12:43:06 -0000	1.17.2.7
+++ devel_themer.js	2 Jun 2009 15:50:19 -0000
@@ -2,26 +2,58 @@
 
 if (Drupal.jsEnabled) {
   $(document).ready(function () {
+    var runFirstTime = false;
     lastObj = false;
     thmrSpanified = false;
     strs = Drupal.settings.thmrStrings;
+
     $('body').addClass("thmr_call").attr("id", "thmr_" + Drupal.settings.page_id);
-    $('body.thmr_call,span.thmr_call')
-    .hover(
-      function () {
-        if (themerEnabled && this.parentNode.nodeName != 'BODY' && $(this).attr('thmr_curr') != 1) {
-          $(this).css('outline', 'red solid 1px');
-        }
-      },
-      function () {
-        if (themerEnabled && $(this).attr('thmr_curr') != 1) {
-          $(this).css('outline', 'none');
-        }
-      }
-    );
 
     var themerEnabled = 0;
     var themerToggle = function () {
+      if(!runFirstTime) {
+        document.body.innerHTML =
+          document.body.innerHTML.replace(
+            /<!-- thmr_call_(begin|end):(.*) -->/g,
+            function(match, type, id) {
+                return type == 'begin' ?
+                    '<span id="' + id + '" class="thmr_call">' :
+                    '</span>';
+            }
+        );
+        runFirstTime = true;
+
+        $('body.thmr_call,span.thmr_call')
+        .hover(
+          function () {
+            if (themerEnabled && this.parentNode.nodeName != 'BODY' && $(this).attr('thmr_curr') != 1) {
+              $(this).css('outline', 'red solid 1px');
+            }
+          },
+          function () {
+            if (themerEnabled && $(this).attr('thmr_curr') != 1) {
+              $(this).css('outline', 'none');
+            }
+          }
+        );
+
+        $('#themer-popup')
+          .draggable({
+            opacity: .6,
+            handle: $('#themer-popup .topper')
+          })
+          //.prepend(strs.toggle_throbber)
+        ;
+    
+        // close box
+        $('#themer-popup .topper .close').click(function() {
+          themerToggle();
+        });
+        
+        $('#themer-toggle')
+          .click(themerToggle);
+      }
+
       themerEnabled = 1 - themerEnabled;
       $('#themer-toggle :checkbox').attr('checked', themerEnabled ? 'checked' : '');
       $('#themer-popup').css('display', themerEnabled ? 'block' : 'none');
@@ -41,25 +73,13 @@ if (Drupal.jsEnabled) {
         }
       }
     };
+
     $(Drupal.settings.thmr_popup)
       .appendTo($('body'));
 
     $('<div id="themer-toggle"><input type="checkbox" />'+ strs.themer_info +'</div>')
       .appendTo($('body'))
       .click(themerToggle);
-
-    $('#themer-popup')
-      .draggable({
-        opacity: .6,
-        handle: $('#themer-popup .topper')
-      })
-      //.prepend(strs.toggle_throbber)
-    ;
-
-    // close box
-    $('#themer-popup .topper .close').click(function() {
-      themerToggle();
-    });
   });
 }
 
@@ -272,4 +292,4 @@ function thmrRebuildPopup(objs) {
   }
   // stop throbber
   //$('#themer-popup img.throbber').hide();
-}
\ No newline at end of file
+}
Index: devel_themer.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/devel/devel_themer.module,v
retrieving revision 1.32.2.23
diff -u -p -r1.32.2.23 devel_themer.module
--- devel_themer.module	22 Apr 2009 19:22:49 -0000	1.32.2.23
+++ devel_themer.module	2 Jun 2009 15:50:19 -0000
@@ -504,7 +504,7 @@ function devel_themer_exit() {
 
 function devel_theme_call_marker($name, $counter, $type) {
   $id = "thmr_". $counter;
-  return array("<span id=\"$id\" class=\"thmr_call\">", "</span>\n");
+  return array("<!-- thmr_call_begin:$id -->", "<!-- thmr_call_end:$id -->\n");
 }
 
 // just hand out next counter, or return current value
