User Tools

Site Tools


token:FrontBrowserJavaScript

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
token:FrontBrowserJavaScript [2020/08/09 23:48]
JMichaelTX Major rewrite; Add examples
token:FrontBrowserJavaScript [2023/09/19 01:03]
peternlewis
Line 1: Line 1:
-====== FrontBrowserJavaScript (v8+) Token ====== +~~REDIRECT>WebBrowserTokens~~
- +
-===== Purpose ===== +
- +
-*  Provide a quick and simple means to execute one line of JavaScript in the Front Browser, and return the results to an Action like [[action:​Set_Variable_to_Text|Set Variable to Text Action]]. +
-*  For executing more than one line, use the [[actions:​Execute_a_JavaScript_in_Browser|Execute JavaScript in Front Browser]] Action. +
-*  The front browser may be the front web browser of Safari, Google Chrome, or any of the Chrome-based browsers like Brave Browser. +
-* Similar Tokens exist for targeting a specific Browser. ​ See below. +
- +
-===== Format ===== +
- +
-Like all [[:​Tokens|Tokens]],​ this token uses `%` to denote it as a token, and to separate the root token from its parameter, a single line of JavaScript:​\\ +
-`%FrontBrowserJavaScript%<​One Line of JavaScript>%` +
- +
-===== Examples ===== +
- +
-==== 1. Get All Text on Web Page ==== +
- +
-`%FrontBrowserJavaScript%document.body.innerText;​%` +
- +
-==== 2. Get Full Page HTML ==== +
- +
-`%FrontBrowserJavaScript%document.getElementsByTagName("​html"​)[0].outerHTML;​%` +
- +
-==== 3. Get Text Identified by HTML tag and class ==== +
- +
-`%FrontBrowserJavaScript%document.querySelector('​div.someclassname'​).innerText;​%` +
- +
- +
-===== See Also ===== +
- +
-==== Tokens ==== +
- +
-=== Similar Tokens === +
- +
-* [[token:​SafariJavaScript|%SafariJavaScript%]] +
-* [[token:​ChromeJavaScript|%ChromeJavaScript%]] +
- +
-=== Related Tokens === +
- +
-* [[token:​SafariField|%SafariField%]] +
-* [[token:​SafariReadyState|%SafariReadyState%]] +
-* [[token:​SafariTitle|%SafariTitle%]] +
-* [[token:​SafariURL|%SafariURL%]] +
-* [[token:​ChromeField|%ChromeField%]] +
-* [[token:​ChromeReadyState|%ChromeReadyState%]] +
-* [[token:​ChromeTitle|%ChromeTitle%]] +
-* [[token:​ChromeURL|%ChromeURL%]] +
-* [[token:​FrontBrowserField|%FrontBrowserField%]] +
-* [[token:​FrontBrowserReadyState|%FrontBrowserReadyState%]] +
-* [[token:​FrontBrowserTitle|%FrontBrowserTitle%]] +
-* [[token:​FrontBrowserURL|%FrontBrowserURL%]] +
-* [[token:​FrontBrowser|%FrontBrowser%]] +
-* [[token:​FrontBrowserBundleID|%FrontBrowserBundleID%]] +
-* [[token:​FrontBrowserPath|%FrontBrowserPath%]] +
-* [[:​Tokens|See all Tokens]]+
  
token/FrontBrowserJavaScript.txt · Last modified: 2023/09/19 01:03 by peternlewis