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
| <!-- app.component.html --> | |
| <my-top-bar (reset-clicked)="resetGame()"></my-top-bar> | |
| <my-top-message [time]="currentTime"></my-top-message> | |
| <my-cards [cards]="cards" (card-flipped)="startGame()" (all-cards-matched)="stopGame()"></my-cards> | |
| <my-pop-up-modal *ngIf="isGameCompleted" [time]="currentTime" (reset-clicked)="resetGame()"></my-pop-up-modal> |
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
| // app.component.ts | |
| import { Component, OnInit } from '@angular/core'; | |
| import * as shuffle from 'lodash/fp/shuffle'; | |
| @Component({ | |
| selector: 'app-root', | |
| templateUrl: './app.component.html', | |
| styleUrls: ['./app.component.css'] | |
| }) |
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
| // app.component.ts | |
| import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; // add this line | |
| // ... | |
| @NgModule({ | |
| declarations: [ | |
| // ... | |
| schemas: [CUSTOM_ELEMENTS_SCHEMA], // add this line | |
| }) | |
| export class AppModule { } |
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
| /* test webp support, add .webp class to body */ | |
| { | |
| canvas = typeof document === 'object' ? | |
| document.createElement('canvas') : {}; | |
| canvas.width = canvas.height = 1; | |
| if (canvas.toDataURL && canvas.toDataURL('image/webp').indexOf('image/webp') === 5) { | |
| document.querySelector('body').classList.add('webp') | |
| } | |
| } |
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
| const gid = (id) => document.getElementById(id); | |
| gid('idtype').value = "1"; // 1=IC | |
| gid('nric').value = "Replace_your_IC"; // e.g. 901231032468 | |
| gid('ic-numbern').value = "Replace_your_IC"; // e.g. 901231032468 | |
| checkic(); | |
| gid('msid').value = "Replace_your_MySejahteraID"; // your phone or email | |
| gid('phone').value = "Replce_your_phone"; | |
| gid('phone-numbern').value = "Replace_your_phone"; | |
| boxclickppv('kl'); // or replace with "selangor" |
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 puppeteer from 'puppeteer'; | |
| (async () => { | |
| const browser = await puppeteer.launch(); | |
| const page = await browser.newPage(); | |
| await page.goto('https://developer.chrome.com/blog/extend-recorder/'); | |
| // Use unique text as selector | |
| // It's not neccessary to specify full text in the selector |
OlderNewer