Linting and remove duplicate code
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user