Skip to content

ColdSpirit0/web-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

web-utils

Repo for site: https://coldspirit0.github.io/web-utils/

Utils

Userscripts

Xpath helper

Install: https://coldspirit0.github.io/web-utils/userscripts/xpath-helper.user.js

Replacement for the integrated $x() function in the browser. You can use CSS selectors and extended xpath selectors with class() function.

Usage:

Note: you have to use backticks ` in the function and double quotes " as string delimiters.

$x(`//*[class("some-class")]`)
// same as:
$x(`//*[contains(concat(" ", @class, " "), " some-class ")]`)
// or:
$x(`.some-class`)