Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 879 Bytes

File metadata and controls

28 lines (19 loc) · 879 Bytes

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`)