From 9172f277119c7131a4e17d132b8b7ddccf3547b2 Mon Sep 17 00:00:00 2001 From: RicardoTM05 <..> Date: Tue, 20 Jan 2026 14:24:16 -0600 Subject: [PATCH] Add Extensions support Add SkinMenu on app-region support Rename ExecuteScript to Execute Add .js file support to Execute command Fix minor bugs Corrections to ini files --- README.md | 1681 +++++++++++++++-- .../WebView2/BangCommand/BangCommand.ini | Bin 34810 -> 34662 bytes .../Skins/WebView2/Calendar/Calendar.ini | 4 +- Resources/Skins/WebView2/Clock/Clock.ini | 6 +- WebView2/Plugin.cpp | 323 +++- WebView2/Plugin.h | 39 +- WebView2/WebView2.cpp | 415 ++-- 7 files changed, 2119 insertions(+), 349 deletions(-) diff --git a/README.md b/README.md index 1bf468b..5eb4e46 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,39 @@ --- +## 🚀 Quick Navigation + +
| 🚀 What Can You Build? | +🚀 Quick Start | +❓ Draggable WebView2 Skin | +🆘 Troubleshooting | +
| 🎯 Key Features | +⚙️ Measure | +☄️ Virtual Host Setup | +📄 License | +
| 📋 Requirements | +🔥 JavaScript Integration | +💡 Examples | +🤝 Contributing | +
| 📥 Installation | +🌉 RainmeterAPI Bridge | +🛠️ Building from Source | +🙏 Acknowledgments | +
| Option | -Description | -Default | -Example | +Option | +Description | +Default | +Examples |
|---|---|---|---|---|---|---|---|
URL |
-🌐 HTML file or web URL Supports: file:///, http://, https:// |
-Required | -file:///#@#index.html |
+WebView Options | |||
W |
-📏 Width in pixels | -800 | -1920 |
+
+||||
AutoStart |
+
+Automatically load WebView on skin load. + 0 = Disabled,
+1 = Enabled
+ |
+1 |
+AutoStart=0 |
||||
H |
-📏 Height in pixels | -600 | -1080 |
+URL |
+
+The URL WebView will navigate to when it starts. +This is the URL the Navigate Home command navigates to.+Supports: file paths and web URLs +Supported schemes: file:///, http://, https://, view-source:+Relative paths are also supported: URL=file.html+Paths are relative to #CURRENTPATH#.+When HostPath is set to a valid folder path, this option is relative to that folder and will navigate to the default virtual host: https://rootconfig/file.html+See Setting Up a Virtual Host. + |
+Required | +
+URL=file:///#@#file.html+ URL=http://example.com+ URL=path\to\file.html+ URL=path\to\img.gif+ URL=file.html
+ |
X |
-↔️ Horizontal position offset | -0 | -100 |
+Virtual Host Options | |||
Y |
-↕️ Vertical position offset | -0 | -50 |
+
+||||
HostSecurity |
+
+Set a preferred protocol for the virtual host: + 0 = http (not secure), 1 = https (secure)+Https allows to use JavaScript APIs that are normally blocked by CORS. +See Setting Up a Virtual Host. + |
+1 |
+HostSecurity=0 |
||||
Hidden |
-👁️ Start hidden 0 = visible, 1 = hidden |
-0 | -1 |
+HostOrigin |
+
+Set a preferred host name for the virtual host: + 0 = current-config (not shared), 1 = rootconfig (shared)+When current-config 0 is used, the local storage is isolated to the current skin's origin, eg. https://illustro-clock+When rootconfig 1 is used, the local storage is shared between all configs that are part of the same suite, eg. https://illustro+See Setting Up a Virtual Host. + |
+1 |
+HostOrigin=0 |
Clickthrough |
-🖱️ Mouse interaction 0 = interactive, 1 = clickthrough |
-0 | -1 |
+HostPath |
+
+The path to the folder that contains the index.html that the virtual host will load.+When this option is set to a folder path, the URL option will become relative to the path set on this option.+See Setting Up a Virtual Host. + |
+"" |
+
+HostPath=path\to\folder+ HostPath=#CURRENTPATH#+ HostPath=#@#
+ |
DynamicVariables |
-🔄 Enable live updates | -0 | -1 |
+Window Options | |||
W800W=1920H600H=1080X0X=100Y0Y=50| + | ZoomFactor |
+Site zoom factor | +1.0 |
+ZoomFactor=1.5 |
+
|---|---|---|---|---|
Hidden |
+
+Window visibility + + 0 = Visible,
+1 = Hidden
+
+ |
+0 |
+Hidden=1 |
+|
Clickthrough |
+
+Mouse interaction mode + + 0 = Interactive,
+1 = Click Through,
+2 = Press CTRL to toggle+This option is very usefull to drag the skin, while set to 2 press CTRL to drag the skin and RMB to open the Skin Menu.
+
+ |
+2 |
+Clickthrough=1 |
+|
| Browser Options | +||||
UserAgent |
++Custom user-agent string override | -+ | "" |
+UserAgent=MyBrowser/1.0 |
+
ZoomControl |
+
+Allow user-controlled zoom through: + CTRL+SCROLL, CTRL + PLUS, CTRL + MINUS and CTRL + 0+ 0 = Disabled,
+1 = Enabled
+ |
+1 |
+ZoomControl=0 |
+|
NewWindow |
+
+Allow opening links in a new window + 0 = Disabled,
+1 = Enabled
+ |
+0 |
+NewWindow=1 |
+|
Notifications |
+
+Override JavaScript's Notification API permission. + 0 = Deny,
+1 = Allow
+ |
+0 |
+Notifications=1 |
+|
AssistiveFeatures |
+
+Allow Print, Find and Caret Browsing features.+ 0 = Disabled,
+1 = Enabled
|
+1 |
+AssistiveFeatures=0 |
|
| Action | +Description | +Example | +
|---|---|---|
| WebView State Actions | +||
OnWebViewLoadAction |
++ Triggers when WebView starts. + | +OnWebViewLoadActio=[!log "WebView2 loaded succesfully!"] |
+
OnWebViewFailAction |
++Triggers when WebView fails. + | +OnWebViewFailAction=[!log "WebView2 failed :("] |
+
OnWebViewStopAction |
++Triggers when WebView stops. + | +OnWebViewStopAction=[!log "WebView2 has stopped!"] |
+
OnStateChangeAction |
++Triggers when WebView initialization or navigation states change. + | +OnStateChangeAction=[!UpdateMeasure #CURRENTSECTION#][!UpdateMeter CurrentState][!Redraw] |
+
| Navigation Actions | +||
OnUrlChangeAction |
++Triggers when the current URL changes. + | +OnUrlChangeAction=[!UpdateMeasure #CURRENTSECTION#][!UpdateMeter CurrentURL][!Redraw] |
+
OnPageLoadStartAction |
++Triggers when navigation starts. + | +OnPageLoadStartAction=[!log "Navigation has started!"] |
+
OnPageLoadingAction |
++Triggers when the page starts loading. + | +OnPageLoadingAction=[!log "Page is loading!"] |
+
OnPageDOMLoadAction |
++Triggers when the DOM content is loaded. + | +OnPageDOMLoadAction=[!log "DOM content loaded!"] |
+
OnPageFirstLoadAction |
++Triggers the first time a page is loaded. + | +OnPageFirstLoadAction=[!log "First time on this page!"] |
+
OnPageReloadAction |
++Triggers when the page is reloaded. + | +OnPageReloadAction=[!log "Page has been reloaded!"] |
+
OnPageLoadFinishAction |
++Triggers when the navigation is finished. + | +OnPageLoadFinishAction=[!log "Navigation has finished!"] |
+
| Command | +Description | +Example | +
|---|---|---|
| WebView | +||
WebView Start |
+Starts the WebView instance. | +[!CommandMeasure WebView2 "WebView Start"] |
+
WebView Stop |
+Stops the WebView instance. | +[!CommandMeasure WebView2 "WebView Stop"] |
+
WebView Restart |
+Restarts the WebView instance. | +[!CommandMeasure WebView2 "WebView Restart"] |
+
| Navigate | +||
Navigate Home |
+Navigates to URL option. |
+[!CommandMeasure WebView2 "Navigate Home"] |
+
Navigate Back |
+Navigates to the previous page. | +[!CommandMeasure WebView2 "Navigate Back"] |
+
Navigate Forward |
+Navigates to the next page. | +[!CommandMeasure WebView2 "Navigate Forward"] |
+
Navigate Reload |
+Reloads the current page. | +[!CommandMeasure WebView2 "Navigate Reload"] |
+
Navigate Stop |
+Stops any navigation. | +[!CommandMeasure WebView2 "Navigate Stop"] |
+
Navigate URL |
+Navigates to a URL. | +[!CommandMeasure WebView2 "Navigate http://example.com"] |
+
| Open | +||
Open DevTools |
+Opens DeveloperTools. | +[!CommandMeasure WebView2 "Open DevTools"] |
+
Open TaskManager |
+Opens the web task manager. | +[!CommandMeasure WebView2 "Open TaskManager"] |
+
| Execute | +||
+Execute Script+ Execute File.js+ |
+Executes given JS script or .js script file | +
+[!CommandMeasure WebView2 "Execute alert('Hello Rainmeter!')"] + [!CommandMeasure WebView2 "Execute #@#script.js"]
+ |
+
| Option | +Description | +Default | +
|---|---|---|
| Environment Options | +||
Extensions |
+Allows to use extensions. | +false |
+
FluentOverlayScrollBars |
+Enable Fluent Overlay scrollbars. | +true |
+
TrackingPrevention |
+Enables Microsoft Edge tracking prevention. | +true |
+
BrowserArguments |
+Additional command-line arguments passed to the WebView2 browser process. | +--allow-file-access-from-files |
+
BrowserLocale |
+Sets the browser UI locale. Use system to follow the OS language.+Locales need to be in the format of BCP 47 Language Tags. e.g: + en-US es-MX fr-FR+A list of locales can be found here + |
+system |
+
| Controller Options | +||
PrivateMode |
+Enables private mode, also commonly called incognito mode. | +false |
+
ScriptLocale |
+
+Locale used for JavaScript APIs such as date, time, and number formatting. +Use system to follow the OS language.+Locales need to be in the format of BCP 47 Language Tags. e.g: + en-US es-MX fr-FR+A list of locales can be found here + |
+system |
+
| Core Options | +||
StatusBar |
+Shows or hides the browser status bar. | +true |
+
PinchZoom |
+Enables pinch-to-zoom gestures. | +true |
+
SwipeNavigation |
+Enables swipe gestures for back and forward navigation. | +true |
+
SmartScreen |
++Enables SmartScreen protection. More info. + | +true |
+
| Profile Options | +||
DownloadsFolderPath |
+Custom folder path where downloaded files are saved. Empty uses the system default. | + |
+
ColorScheme |
+Controls the browser color scheme (light, dark, or system). |
+system |
+
PasswordAutoSave |
+Allows automatic saving of passwords. | +false |
+
GeneralAutoFill |
+Enables form autofill for non-password fields. | +true |
+
Drag the skin
+you can drag over everything
+ +hold CTRL and drag over the button
This is a very simple HTML page.
+Hold CTRL to drag the skin
+Press CTRL + RMB to open SkinMenu.
+ + + +``` +| + |
🕐 Clock Animated liquid clock with smooth animations |
-+ |
📅 Calendar Interactive month view calendar |
-+ |
⚙️ Config Reader Read options from measures and sections |
-+ |
🔧 Utilities Demonstrate all API functions |
+
+
+▶️ Youtube Player +Youtube Player iFrame API example + |