Supported XML tags - Schmiddiii/qute-cookie-block GitHub Wiki

Here is a list of all supported XML tags, ordered from "neccessary" to "sometimes usefull".

click

Clicks the given element. This is done by running the javascript code document.querySelector("element").click() using qutebrowsers jseval.

Required argument: element

The selector of the element to click. You can recieve the selector by inspecting the element and copying the selector in the dev-tools. For more information check the creating blockers page.

Examples

<click element="body > div > button"/>
<click element="#SHORTCUT_FOCUSABLE_DIV > div:nth-child(6) > div._3q-XSJ2vokDQrvdG6mR__k > section > div > section > section > form:nth-child(1) > button"/>

remove

Removes the given element from the dom. This is done by running the javascript code document.querySelector("element").remove() using qutebrowsers jseval.

Required argument: element

The selector of the element to remove. For more information, check the click-tag.

Examples

<remove element="body > div > button"/>
<remove element="#SHORTCUT_FOCUSABLE_DIV > div:nth-child(6) > div._3q-XSJ2vokDQrvdG6mR__k > section > div > section > section > form:nth-child(1) > button"/>

wait

Wait the given amount of time. This is usefull when the page needs to load more content after clicking a button.

Optional argument: time

The time to wait in milliseconds. Note that this has to be a natural number. The default time is 500ms.

Examples

<wait/>             <!-- Wait 500ms -->
<wait time="1000"/> <!-- Wait one second -->

js

Run the given javascript. This might be needed for removing a element from the DOM.

Required argument: source

The javascript code to execute.

Examples

<js source="alert('Hi')"/>

debug

Debug prints using qutebrowsers message-error, message-info or message-warning. This is mainly usefull after waiting to check when the waiting is over and whether you have waited long enought.

Optional argument: type

The type of the message. This can be one of error, info or warning. This will be info by default.

Optional argument: msg

The message to send. This is "Debug" by default.

Examples

<debug/>                                  <!-- Prints "Debug" using message-info -->
<debug type="error"/>                     <!-- Prints "Debug" using message-error -->
<debug type="warning" msg="Hello World"/> <!-- Prints "Hello World" using message-warning -->
⚠️ **GitHub.com Fallback** ⚠️