Skip to content

Instantly share code, notes, and snippets.

View pottedmeat's full-sized avatar

Neil Roberts pottedmeat

View GitHub Profile
<html>
<head>
<style>
.grid {
display: flex;
flex-direction: column;
height: 300px;
}
.header {
define([
'./base'
], function (Update) {
// avoid the data: cascade because we may need to use (table)[x] syntax
var table = '//*[@id="content"]//*[contains(concat(" ", @class, " "), " panel ")][not(contains(concat(" ", @class, " "), " hidden "))]//ha-table';
function header_named(name) {
return {
'by' :'xpath',
'data': table + '//th//*[contains(text(), "' + name + '")]/ancestor::th'