diff --git a/MixItUp.Base/Model/Overlay/OverlayEndpointV3Model.cs b/MixItUp.Base/Model/Overlay/OverlayEndpointV3Model.cs
index 0ecec2302..37c7a45c7 100644
--- a/MixItUp.Base/Model/Overlay/OverlayEndpointV3Model.cs
+++ b/MixItUp.Base/Model/Overlay/OverlayEndpointV3Model.cs
@@ -14,6 +14,8 @@ public class OverlayEndpointV3Model
[DataMember]
public string Name { get; set; }
+ [DataMember]
+ public string Head { get; set; } = OverlayResources.OverlayEndpointDefaultHead;
[DataMember]
public string HTML { get; set; } = OverlayResources.OverlayEndpointDefaultHTML;
[DataMember]
diff --git a/MixItUp.Base/OverlayResources.Designer.cs b/MixItUp.Base/OverlayResources.Designer.cs
index 5d0adf44b..844912c46 100644
--- a/MixItUp.Base/OverlayResources.Designer.cs
+++ b/MixItUp.Base/OverlayResources.Designer.cs
@@ -591,6 +591,15 @@ public static string OverlayEndpointDefaultCSS {
}
}
+ ///
+ /// Looks up a localized string similar to .
+ ///
+ public static string OverlayEndpointDefaultHead {
+ get {
+ return ResourceManager.GetString("OverlayEndpointDefaultHead", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to
///
@@ -983,12 +992,14 @@ public static string OverlayItemHideAndSendParentMessageRemoveJavascript {
/// <script src="/scripts/video.min.js"></script>
///
/// <link rel="stylesheet" type="text/css" href="/scripts/animate.min.css">
+ ///
+ /// {Head}
///
/// <style type="text/css">
/// {CSS}
/// </style>
///</head>
- ///<body style="background-color: transparent; overflow: hidden; position: absolute; width: 100%; max- [rest of string was truncated]";.
+ ///<body style="background-color: transparent; overflow: hidden; position: absolute; [rest of string was truncated]";.
///
public static string OverlayItemIFrameHTML {
get {
diff --git a/MixItUp.Base/OverlayResources.resx b/MixItUp.Base/OverlayResources.resx
index d5806d5a6..54e3bbafe 100644
--- a/MixItUp.Base/OverlayResources.resx
+++ b/MixItUp.Base/OverlayResources.resx
@@ -1112,6 +1112,9 @@ sendParentMessage({ Type: "WidgetLoaded", ID: "{ID}" });
{CSS}
+
+
+
@@ -1615,6 +1618,8 @@ sendParentMessage({ Type: "Remove", ID: "{ID}" });
<script src="/scripts/video.min.js"></script>
<link rel="stylesheet" type="text/css" href="/scripts/animate.min.css">
+
+ {Head}
<style type="text/css">
{CSS}
diff --git a/MixItUp.Base/Resources.Designer.cs b/MixItUp.Base/Resources.Designer.cs
index c10a020a6..d27723ff8 100644
--- a/MixItUp.Base/Resources.Designer.cs
+++ b/MixItUp.Base/Resources.Designer.cs
@@ -10658,6 +10658,15 @@ public static string Hangman {
}
}
+ ///
+ /// Looks up a localized string similar to Head.
+ ///
+ public static string Head {
+ get {
+ return ResourceManager.GetString("Head", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Header.
///
diff --git a/MixItUp.Base/Resources.resx b/MixItUp.Base/Resources.resx
index 28eaa0828..0f0a49afd 100644
--- a/MixItUp.Base/Resources.resx
+++ b/MixItUp.Base/Resources.resx
@@ -10784,4 +10784,7 @@ We have detected that you have more than 1 Overlay Endpoint created, meaning the
Latest Subscription Gifter
+
+ Head
+
\ No newline at end of file
diff --git a/MixItUp.Base/Services/OverlayV3Service.cs b/MixItUp.Base/Services/OverlayV3Service.cs
index 828e3a1f5..2b00d5023 100644
--- a/MixItUp.Base/Services/OverlayV3Service.cs
+++ b/MixItUp.Base/Services/OverlayV3Service.cs
@@ -277,6 +277,11 @@ public OverlayEndpointV3Model GetOverlayEndpoint(Guid id)
public void ConnectOverlayEndpointService(OverlayEndpointV3Model overlayEndpoint)
{
+ if (string.IsNullOrEmpty(overlayEndpoint.Head))
+ {
+ overlayEndpoint.Head = OverlayResources.OverlayEndpointDefaultHead;
+ }
+
if (string.IsNullOrEmpty(overlayEndpoint.HTML))
{
overlayEndpoint.HTML = OverlayResources.OverlayEndpointDefaultHTML;
@@ -633,6 +638,7 @@ public async Task EndBatching()
public void RefreshItemIFrameHTMLCache()
{
this.itemIFrameHTML = OverlayResources.OverlayItemIFrameHTML;
+ this.itemIFrameHTML = OverlayV3Service.ReplaceProperty(this.itemIFrameHTML, nameof(this.Model.Head), this.Model.Head);
this.itemIFrameHTML = OverlayV3Service.ReplaceProperty(this.itemIFrameHTML, nameof(this.Model.HTML), this.Model.HTML);
this.itemIFrameHTML = OverlayV3Service.ReplaceProperty(this.itemIFrameHTML, nameof(this.Model.CSS), this.Model.CSS);
this.itemIFrameHTML = OverlayV3Service.ReplaceProperty(this.itemIFrameHTML, nameof(this.Model.Javascript), this.Model.Javascript);
diff --git a/MixItUp.Base/ViewModel/Overlay/OverlayEndpointV3EditorViewModel.cs b/MixItUp.Base/ViewModel/Overlay/OverlayEndpointV3EditorViewModel.cs
index 857309118..8997a5da1 100644
--- a/MixItUp.Base/ViewModel/Overlay/OverlayEndpointV3EditorViewModel.cs
+++ b/MixItUp.Base/ViewModel/Overlay/OverlayEndpointV3EditorViewModel.cs
@@ -11,6 +11,17 @@ public class OverlayEndpointV3EditorViewModel : UIViewModelBase
{
public event EventHandler OnCloseRequested = delegate { };
+ public string Head
+ {
+ get { return this.head; }
+ set
+ {
+ this.head = value;
+ this.NotifyPropertyChanged();
+ }
+ }
+ private string head;
+
public string HTML
{
get { return this.html; }
@@ -52,12 +63,14 @@ public OverlayEndpointV3EditorViewModel(OverlayEndpointV3Model endpoint)
{
this.endpoint = endpoint;
+ this.Head = endpoint.Head;
this.HTML = endpoint.HTML;
this.CSS = endpoint.CSS;
this.Javascript = endpoint.Javascript;
this.SaveCommand = this.CreateCommand(() =>
{
+ this.endpoint.Head = this.Head;
this.endpoint.HTML = this.HTML;
this.endpoint.CSS = this.CSS;
this.endpoint.Javascript = this.Javascript;
diff --git a/MixItUp.WPF/Windows/Overlay/OverlayEndpointV3EditorWindow.xaml b/MixItUp.WPF/Windows/Overlay/OverlayEndpointV3EditorWindow.xaml
index fec7825c5..4065c4e7a 100644
--- a/MixItUp.WPF/Windows/Overlay/OverlayEndpointV3EditorWindow.xaml
+++ b/MixItUp.WPF/Windows/Overlay/OverlayEndpointV3EditorWindow.xaml
@@ -39,6 +39,18 @@
+
+
+
+
+
+
+
+
+
+
+
+