Hatch now inserts its attribute into the root documentElement instead of
the body. This is part of the move to using content_scripts instead of
declarativeContent for the extension.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
<link rel="stylesheet" href="[% ctx.base_path %]/staff/css/style.css" />
<link rel="stylesheet" href="[% ctx.base_path %]/staff/css/print.css" type="text/css" media="print" />
</head>
- <body hatch-is-welcome-here>
+ <body>
<toast></toast>
<!-- load the navbar template inline since it's used on every page -->
service.openHatch = function() {
// When the Hatch extension loads, it tacks an attribute onto
- // the page body to indicate it's available.
-
- if (!$window.document.body.getAttribute('hatch-is-open')) {
+ // the top-level documentElement to indicate it's available.
+ if (!$window.document.documentElement.getAttribute('hatch-is-open')) {
console.debug("Hatch is not available");
return;
}