|
273 | 273 |
|
274 | 274 | onClose: function () { |
275 | 275 | // TODO: This is absolutely temporary solution. |
276 | | - document.title = "(Brackets Live Preview has been closed) " + document.title; |
| 276 | + var body = document.getElementsByTagName("body")[0], |
| 277 | + overlay = document.createElement("div"), |
| 278 | + background = document.createElement("div"), |
| 279 | + status = document.createElement("div"); |
| 280 | + |
| 281 | + overlay.style.width = "100%"; |
| 282 | + overlay.style.height = "100%"; |
| 283 | + overlay.style.zIndex = 2227; |
| 284 | + overlay.style.position = "absolute"; |
| 285 | + overlay.style.top = 0; |
| 286 | + overlay.style.left = 0; |
| 287 | + |
| 288 | + background.style.backgroundColor = "#fff"; |
| 289 | + background.style.opacity = 0.5; |
| 290 | + background.style.width = "100%"; |
| 291 | + background.style.height = "100%"; |
| 292 | + background.style.position = "absolute"; |
| 293 | + background.style.top = 0; |
| 294 | + background.style.left = 0; |
| 295 | + |
| 296 | + status.textContent = "Live Development Session has Ended"; |
| 297 | + status.style.width = "100%"; |
| 298 | + status.style.color = "#fff"; |
| 299 | + status.style.backgroundColor = "#666"; |
| 300 | + status.style.position = "absolute"; |
| 301 | + status.style.top = 0; |
| 302 | + status.style.left = 0; |
| 303 | + status.style.padding = "0.2em"; |
| 304 | + status.style.verticalAlign = "top"; |
| 305 | + status.style.textAlign = "center"; |
| 306 | + overlay.appendChild(background); |
| 307 | + overlay.appendChild(status); |
| 308 | + body.appendChild(overlay); |
| 309 | + |
| 310 | + // change the title as well |
| 311 | + document.title = "(Brackets Live Preview: closed) " + document.title; |
277 | 312 | }, |
278 | 313 |
|
279 | 314 | setDocumentObserver: function (documentOberver) { |
|
0 commit comments