Sebastiankay commited on
Commit
9d98c33
·
1 Parent(s): fa60735

29. Sept. 2024, 19:52

Browse files
Files changed (1) hide show
  1. _res/_custom.js +6 -1
_res/_custom.js CHANGED
@@ -86,7 +86,10 @@ function gradioCustomJS() {
86
  // MARK: Selectors & Elements
87
  const gradioApp = document.querySelector("gradio-app")
88
  const gradioContainer = document.querySelector("body > gradio-app > div.gradio-container")
89
- const resolutionModalWrapper = document.querySelector("div#resolution_modal_wrapper")
 
 
 
90
  const alertModalElem = document.createElement("div")
91
  const alertModalElemP = document.createElement("p")
92
  const alertModalElemI = document.createElement("i")
@@ -104,7 +107,9 @@ function gradioCustomJS() {
104
  alertModalElem.append(alertModalElemP, alertModalElemButton)
105
  //alertModalElem.innerHTML = '<p></p>'
106
  resolutionModalWrapper.appendChild(alertModalElem)
 
107
 
 
108
  alertModalElemButton.addEventListener("click", () => {
109
  oldText = alertModalElemSpan.textContent
110
  alertModalElemButton.disabled = true
 
86
  // MARK: Selectors & Elements
87
  const gradioApp = document.querySelector("gradio-app")
88
  const gradioContainer = document.querySelector("body > gradio-app > div.gradio-container")
89
+ const resolutionModalWrapper = document.createElement("div")
90
+ resolutionModalWrapper.id = "resolution_modal_wrapper"
91
+ resolutionModalWrapper.style.display = "none"
92
+ resolutionModalWrapper.className = "resolution-modal-wrapper"
93
  const alertModalElem = document.createElement("div")
94
  const alertModalElemP = document.createElement("p")
95
  const alertModalElemI = document.createElement("i")
 
107
  alertModalElem.append(alertModalElemP, alertModalElemButton)
108
  //alertModalElem.innerHTML = '<p></p>'
109
  resolutionModalWrapper.appendChild(alertModalElem)
110
+ body.appendChild(resolutionModalWrapper)
111
 
112
+ // MARK: Alert Modal Events
113
  alertModalElemButton.addEventListener("click", () => {
114
  oldText = alertModalElemSpan.textContent
115
  alertModalElemButton.disabled = true