Linting and remove duplicate code

This commit is contained in:
2021-05-10 09:41:47 +00:00
parent f342c20b91
commit f4ca95d436
14 changed files with 1356 additions and 3754 deletions

View File

@@ -1,30 +1,28 @@
import { registerCard } from "card-tools/src/editor";
const bases = [customElements.whenDefined('home-assistant-main'), customElements.whenDefined('hui-view')];
const bases = [
customElements.whenDefined("home-assistant-main"),
customElements.whenDefined("hui-view"),
];
Promise.race(bases).then(() => {
const LitElement = customElements.get('home-assistant-main')
? Object.getPrototypeOf(customElements.get('home-assistant-main'))
: Object.getPrototypeOf(customElements.get('hui-view'));
const LitElement = customElements.get("home-assistant-main")
? Object.getPrototypeOf(customElements.get("home-assistant-main"))
: Object.getPrototypeOf(customElements.get("hui-view"));
const html = LitElement.prototype.html;
const css = LitElement.prototype.css;
class BrowserPlayerEditor extends LitElement {
setConfig(config) {
}
render() {
return html`
<div>
Nothing to configure.
</div>
`;
}
setConfig(config) {}
render() {
return html` <div>Nothing to configure.</div> `;
}
}
if(!customElements.get("browser-player-editor")) {
if (!customElements.get("browser-player-editor")) {
customElements.define("browser-player-editor", BrowserPlayerEditor);
window.customCards = window.customCards || [];
window.customCards.push({type:"browser-player", name: "Browser Player", preview: true});
window.customCards.push({
type: "browser-player",
name: "Browser Player",
preview: true,
});
}
});