(text: string)
| 192 | } |
| 193 | |
| 194 | export function fullscreenNotification(text: string) { |
| 195 | if (api.settings.get('floatButtonStealth')) return; |
| 196 | const fullscreenElement = |
| 197 | document.fullscreenElement || |
| 198 | // @ts-ignore |
| 199 | document.mozFullScreenElement || |
| 200 | // @ts-ignore |
| 201 | document.webkitFullscreenElement || |
| 202 | document.msFullscreenElement; |
| 203 | |
| 204 | if (fullscreenElement) { |
| 205 | // eslint-disable-next-line jquery-unsafe-malsync/no-xss-jquery |
| 206 | const flashmEl = j |
| 207 | .$( |
| 208 | j.html(` |
| 209 | <div style=" |
| 210 | all: initial; |
| 211 | position: absolute; |
| 212 | bottom: 0; |
| 213 | left: 0; |
| 214 | right: 0; |
| 215 | color: white; |
| 216 | display: none; |
| 217 | z-index: 20000; |
| 218 | "> |
| 219 | <div style=" |
| 220 | background: rgba(50, 50, 50, 0.6); |
| 221 | color: white; |
| 222 | padding: 10px 15px 10px; |
| 223 | margin-left: auto; |
| 224 | margin-right: auto; |
| 225 | max-width: 60%; |
| 226 | display: table; |
| 227 | font-family: Helvetica,Arial,sans-serif; |
| 228 | text-align: center; |
| 229 | ">${text}</div> |
| 230 | </div> |
| 231 | `), |
| 232 | ) |
| 233 | .appendTo(j.$(fullscreenElement)); |
| 234 | |
| 235 | flashmEl |
| 236 | .slideDown(400) |
| 237 | .delay(2000) |
| 238 | .slideUp(400, () => { |
| 239 | flashmEl.remove(); |
| 240 | }); |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | /* eslint-disable */ |
| 245 | // https://stackoverflow.com/questions/5203407/how-to-detect-if-multiple-keys-are-pressed-at-once-using-javascript |
no test coverage detected