Get floating Webview uuid from javascript

id it possible to get a floating web view's uuid from its html using javascript?

Not directly, do you have an example how you'd use that? Maybe there is a good workaround.

This would give you all of your configured floating menu webviews in an array:

let allWebViewsString = await get_triggers({trigger_id: 778});
let allWebViews = JSON.parse(allWebViewsString);

Example Output:

[
  {
    "BTTTriggerBelongsToPreset" : "demo_master",
    "BTTLastUpdatedAt" : 1782129961.0620589,
    "BTTTriggerType" : 778,
    "BTTTriggerTypeDescriptionReadOnly" : "Web View \/ HTML Item",
    "BTTTriggerTypeDescription" : "Web View Item",
    "BTTTriggerParentUUID" : "7A9DAA36-107C-4B11-8D9B-12B2A8BA0168",
    "BTTTriggerClass" : "BTTTriggerTypeFloatingMenu",
    "BTTUUID" : "DF11B681-C916-4FD5-A876-6C3A76445B76",
    "BTTAdditionalConfiguration" : "Webview Menu Item: Launcher Webview Template_webview_item",
    "BTTOrder" : 0,
    "BTTTriggerName" : "Webview Menu Item: Launcher Webview Template_webview_item",
    "BTTMenuConfig" : {
      "BTTMenuAlwaysUseLightMode" : 1,
      "BTTMenuAttributedText" : "{\\rtf1\\ansi\\ansicpg1252\\cocoartf2869\n\\cocoatextscaling0\\cocoaplatform0{\\fonttbl\\f0\\fnil\\fcharset0 HelveticaNeue;}\n{\\colortbl;\\red255\\green255\\blue255;\\red255\\green255\\blue255;}\n{\\*\\expandedcolortbl;;\\cssrgb\\c100000\\c100000\\c100000;}\n\\deftab720\n\\pard\\pardeftab720\\qc\\partightenfactor0\n\n\\f0\\fs44 \\cf2 \\expnd0\\expndtw0\\kerning0\nNew Item}",
      "BTTMenuElementIdentifier" : "Launcher Webview Template_webview_item",
      "BTTMenuHoverEndAnimationDuration" : 0.15,
      "BTTMenuHoverStartAnimationDuration" : 0.15,
      "BTTMenuItemBackgroundColor" : "255.000000, 255.000000, 255.000000, 0.000000",
      "BTTMenuItemBackgroundColorDark" : "108.442, 96.000, 190.435, 166.991",
      "BTTMenuItemBackgroundColorHover" : "90.000000, 90.000000, 180.000000, 0.000000",
      "BTTMenuItemBackgroundColorHoverDark" : "90.000, 90.000, 180.000, 166.991",
      "BTTMenuItemBackgroundType" : 4,
      "BTTMenuItemBackgroundTypeDark" : 4,
      "BTTMenuItemBorderColor" : "255.000, 255.000, 255.000, 255.000",
      "BTTMenuItemBorderColorDark" : "255.000, 255.000, 255.000, 255.000",
      "BTTMenuItemBorderColorHover" : "255.000, 255.000, 255.000, 255.000",
      "BTTMenuItemBorderColorHoverDark" : "255.000, 255.000, 255.000, 255.000",
      "BTTMenuItemIconColor1" : "255.000, 255.000, 255.000, 255.000",
      "BTTMenuItemMaxHeight" : 2000,
      "BTTMenuItemMaxWidth" : 2000,
      "BTTMenuItemMinHeight" : 100,
      "BTTMenuItemMinWidth" : 100,
      "BTTMenuItemResizeImage" : 3,
      "BTTMenuItemText" : "https:\/\/www.google.com\/search?q={BTTLauncherPromptInputWithoutKeyword}",
      "BTTMenuItemVisibleWhileActive" : 1,
      "BTTMenuItemVisibleWhileInactive" : 1,
      "BTTMenuTextMinimumScaleFactor" : 0.3,
      "BTTMenuUseStyleForSubmenu" : 0
    },
    "BTTMenuAvailability" : 0,
    "BTTMenuName" : "Launcher Webview Template_webview_item",
    "BTTGestureNotes" : "Web View Item",
    "BTTBelongsToApp" : "Global"
  }
]

I have a number of web view actions that call the same html code, it's a lot easier to have one. html file that can pick up whatever web view is using it than it is to have a separate html file for each web view

You can inject JavaScript into the html file on load, this would also allow you to add the UUID or any other identifier via JS:

Or you could set a custom user agent that can be queried via javascript.