- Choose color paletter for your website : https://realtimecolors.com
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
| function check(obj: any, key: string, value: string): boolean { | |
| const keys = Object.keys(obj) | |
| if (!keys.length) return false; | |
| if ( keys.includes(key) && obj[key] === value ) return true; | |
| const nested = keys.filter(key => typeof obj[key] === 'object') | |
| return nested.some(nestedKey => foo(obj[nestedKey], key, value)) | |
| } |
- Add env variable to
.envfile
NEXT_PUBLIC_GA_TRACKING_ID=
- Create tracking functions
export const GA_TRACKING_ID = process.env.NEXT_PUBLIC_GA_TRACKING_ID;
export const pageview = (url) => {
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
| function get_next_button() { | |
| return document.querySelector('button[data-e2e="arrow-right"]') | |
| } | |
| function get_current_video() { | |
| return document.querySelector('.tiktok-5uccoo-DivVideoContainer video') | |
| } | |
| function click_next_event(evt) { | |
| evt.target.click() |
Basic and extended regular expressions are two variations on the syntax of the specified pattern. Basic Regular Expression (BRE) syntax is the default in sed (and similarly in grep).
Use the POSIX-specified -E option (-r, --regexp-extended) to enable Extended Regular Expression (ERE) syntax.
characters
| case | BRE and ERE | Perl |
|---|---|---|
| any char except newline | . |
. |
| word | [[:alphanum:]] |
\w |
| digit | [[:digit:]] |
\d |