This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.from(document.querySelectorAll('path')).forEach(path => path.dispatchEvent(new Event('mouseover'))); | |
const sectors = Array.from(document.querySelectorAll('path')).filter(path => path.style.stroke === 'rgb(68, 68, 68)'); | |
getCurrentSeats = function() { return Array.from(document.querySelectorAll('#svg-wrapper circle')).length - Array.from(document.querySelectorAll('#svg-wrapper circle')).filter(circle => circle.style.fill === "url(\"#taken-seat\")").length }; | |
async function run() { | |
let freeSeatsAll = 0; | |
let i = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { MyService } from './my.service'; | |
// Adapt code to your needs, it's just a component's bootstrap | |
@Component({ | |
selector: 'app-copy', | |
template: ` | |
<div class="container" (keyup)="onKeyUp($event)" (keydown)="onKeyDown($event)" tabindex="1"> | |
<div>...some data... (click me and press ctrl + c)</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |