| Index: include.preload.js |
| =================================================================== |
| --- a/include.preload.js |
| +++ b/include.preload.js |
| @@ -25,17 +25,21 @@ function setElemhideCSSRules(selectors) |
| if (elemhideElt && elemhideElt.parentNode) |
| elemhideElt.parentNode.removeChild(elemhideElt); |
| if (!selectors) |
| return; |
| elemhideElt = document.createElement("style"); |
| elemhideElt.setAttribute("type", "text/css"); |
| - document.documentElement.appendChild(elemhideElt); |
| + |
| + // Try to insert the style into the <head> tag, inserting directly under the |
| + // document root breaks dev tools functionality: |
| + // http://code.google.com/p/chromium/issues/detail?id=178109 |
| + (document.head || document.documentElement).appendChild(elemhideElt); |
| var elt = elemhideElt; // Use a local variable to avoid racing conditions |
| function setRules() |
| { |
| if (!elt.sheet) |
| { |
| // Stylesheet didn't initialize yet, wait a little longer |
| window.setTimeout(setRules, 0); |