User Tools

Site Tools


token:WebBrowserTokens

Differences

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

Link to this comparison view

Next revision
Previous revision
token:WebBrowserTokens [2023/09/19 04:56] – created peternlewistoken:WebBrowserTokens [2023/09/19 04:59] (current) peternlewis
Line 7: Line 7:
 The tokens come in three forms, for example `%SafariTitle%`,  `%ChromeTitle%`,  `%FrontBrowserTitle%`. They will access the front (or most recently front) Safari-like, Chrome-like, or either web browser respectively. The tokens come in three forms, for example `%SafariTitle%`,  `%ChromeTitle%`,  `%FrontBrowserTitle%`. They will access the front (or most recently front) Safari-like, Chrome-like, or either web browser respectively.
  
-Keyboard Maestro and Keyboard Maestro Engine must have Automation security permission to control the browser, and for most of the tokens, the browser must have `Allow JavaScript From Apple Events` [[assistance:Allow_JavaScript_From_Apple_Events|enabled]].+Keyboard Maestro and Keyboard Maestro Engine must have Automation security permission to control the browser, and for most of the tokens, the browser must have [[assistance:Allow_JavaScript_From_Apple_Events#Allow_JavaScript_From_Apple_Events|Allow JavaScript From Apple Events enabled]].
  
 The information is gotten from the specified web browser’s front window, or front window’s tab. You can retrieve includes: The information is gotten from the specified web browser’s front window, or front window’s tab. You can retrieve includes:
Line 42: Line 42:
 ==== 1. Get All Text on Web Page ==== ==== 1. Get All Text on Web Page ====
  
-`%FrontBrowserJavaScript%document.body.innerText;%`+`%FrontBrowserJavaScript%document.body.innerText%`
  
 ==== 2. Get Full Page HTML ==== ==== 2. Get Full Page HTML ====
  
-`%FrontBrowserJavaScript%document.getElementsByTagName("html")[0].outerHTML;%`+`%FrontBrowserJavaScript%document.getElementsByTagName("html")[0].outerHTML%`
  
 ==== 3. Get Text Identified by HTML tag and class ==== ==== 3. Get Text Identified by HTML tag and class ====
  
-`%FrontBrowserJavaScript%document.querySelector('div.someclassname').innerText;%`+`%FrontBrowserJavaScript%document.querySelector('div.someclassname').innerText%`
  
 ===== Full List ===== ===== Full List =====
token/WebBrowserTokens.1695099416.txt.gz · Last modified: by peternlewis

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki