-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Run JavaScript before change detection
You can run JavaScript before performing change detection and filters/triggers, this is handy for filling in fields, clicking buttons and other actions
Under Watch Settings
> Request
> Execute JavaScript before change detection
Available in 0.39.17
Requires Playwright driver enabled, or is included in the paid subscriptions
At http://www.quotationspage.com/random.php ( shared watch import link https://changedetection.io/share/qvQ8NFFxQsMa )
document.querySelector("input[name=homesearch]").value="cause and effect";
document.querySelector("input[name=startsearch]").click();
document.querySelector("input[name=username]").value="big-john";
document.querySelector("input[name=password]").value="secret";
document.querySelector("input[type=submit]").click();
document.querySelector("input[type=text]").value="stripes on a tiger never fade";
document.querySelector("input[value='Google Search']").click();
Basically just search for the <span>
containing Reject all
and click it
document.evaluate("//span[contains(., 'Reject all')]", document, null, XPathResult.ANY_TYPE, null ).iterateNext().click();
https://edition.cnn.com ( shared watch import link https://changedetection.io/share/-ANRwLTBCNMa )
document.getElementById('onetrust-accept-btn-handler').click();
BestBuy will often ask for a 'local' or 'country' store, we simply click on the USA flag link from the English section of the site https://changedetection.io/share/pkhEFXeb8Cka
In that above shared link, we will be watching BestBuy for changes in GTX 4090 graphic card prices
Or set these
"Execute JavaScript before change detection"
setInterval(function(){
document.evaluate("//div[@lang='en']//a[@class='us-link']", document, null, XPathResult.ANY_TYPE, null ).iterateNext().click();
},1000);
"CSS/JSON/XPATH Filter" to .shop-sku-list-item
"Remove Elements" (optional, to cut down noise) to
.image-link
.embedded-badge
.variation-info
.sku-list-item-compare-checkbox