This file contains 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
// Type definitions | |
type LogLevel = 'log' | 'info' | 'warn' | 'error'; | |
interface XPathGeneratorEvent extends MouseEvent { | |
currentTarget: Element | null; | |
target: Element | null; | |
} | |
function log(level: LogLevel, message: string, error: Error | null = null): void { | |
const timestamp = new Date().toISOString(); |
This file contains 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 log(level, message, error = null) { | |
const timestamp = new Date().toISOString(); | |
console[level](`[${timestamp}] ${message}`, error); | |
} | |
function isClickableElement(element) { | |
const clickableTags = ['A', 'BUTTON', 'INPUT', 'SELECT', 'TEXTAREA', 'IMG']; | |
return clickableTags.includes(element.tagName) || | |
element instanceof SVGElement || | |
element.onclick != null || |
This file contains 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
type LogLevel = 'info' | 'warn' | 'error'; | |
function log(level: LogLevel, message: string, error: Error | null = null): void { | |
const timestamp = new Date().toISOString(); | |
console[level](`[${timestamp}] ${message}`, error); | |
} | |
function isClickableElement(element: Element): boolean { | |
const clickableTags = ['A', 'BUTTON', 'INPUT', 'SELECT', 'TEXTAREA', 'IMG']; | |
return clickableTags.includes(element.tagName) || |
This file contains 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
type LogLevel = 'info' | 'warn' | 'error'; | |
function log(level: LogLevel, message: string, error: Error | null = null): void { | |
const timestamp = new Date().toISOString(); | |
console[level](`[${timestamp}] ${message}`, error); | |
} | |
function isClickableElement(element: Element): boolean { | |
const clickableTags = ['A', 'BUTTON', 'INPUT', 'SELECT', 'TEXTAREA']; | |
return clickableTags.includes(element.tagName) || |
This file contains 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 log(level, message, error = null) { | |
const timestamp = new Date().toISOString(); | |
console[level](`[${timestamp}] ${message}`, error); | |
} | |
function isClickableElement(element) { | |
const clickableTags = ['A', 'BUTTON', 'INPUT', 'SELECT', 'TEXTAREA']; | |
return clickableTags.includes(element.tagName) || | |
element instanceof SVGElement || | |
element.onclick != null || |
This file contains 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
type LogLevel = 'info' | 'warn' | 'error'; | |
function log(level: LogLevel, message: string, error: Error | null = null): void { | |
const timestamp = new Date().toISOString(); | |
console[level](`[${timestamp}] ${message}`, error); | |
} | |
function generateRobustXPath(element: Element): string[] { | |
try { | |
const xpaths: string[] = []; |
This file contains 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
// Author : Sudeep | |
function playAlong() { | |
setTimeout(function() { | |
try { | |
var playerinfo = document.querySelector("div.avatar-3QF_VA.wrapper-1VLyxH").ariaLabel | |
playerinfo = playerinfo.split(",") | |
var allItems = document.querySelectorAll('.item-3XjbnG') | |
if (playerinfo.includes('Offline')) { | |
console.log(`${playerinfo[0]} is ${playerinfo[1]}`) |
This file contains 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
https://abp.oisd.nl/ | |
https://raw.githubusercontent.com/notracking/hosts-blocklists/master/adblock/adblock.txt | |
https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt | |
||www.geeksforgeeks.org/wp-content/themes/iconic-one/js/gfg.min.js |
This file contains 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
These will work on Fedora versions: | |
sudo rpm -e --nodeps totem-* |
This file contains 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 java.util.Scanner; | |
public class LeapYear { | |
public static void main(String[] args) { | |
Scanner scan = new Scanner(System.in); | |
System.out.print("Give a year:"); | |
int year = Integer.parseInt(scan.nextLine()); | |
if (year % 100 == 0 && year % 400 == 0) { |
NewerOlder