| | |
| | | } |
| | | } |
| | | |
| | | window.prefixInput = function(input, prefix, wrapper = null, replace = false) { |
| | | window.prefixInput = function(input, prefix, wrapper = null, replace = false, name = false) { |
| | | if (!input) { |
| | | console.warn('prefixInput called with null/undefined input'); |
| | | return; |
| | |
| | | } |
| | | |
| | | input.id = newId; |
| | | if (name) { |
| | | input.name = newId; |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | return ui; |
| | | } |
| | | |
| | | window.sleep = async function (ms = 50) { |
| | | return new Promise(resolve => setTimeout(resolve, ms)); |
| | | }; |
| | | |
| | | class DebouncedActions { |
| | | constructor() { |
| | |
| | | updateMaxScroll(); |
| | | updateScrollProgress(lastY); |
| | | |
| | | |
| | | |
| | | window.decodeHTMLEntities = function(text) { |
| | | if (!window.decodeHelper) { |
| | | window.decodeHelper = document.createElement('textarea'); |
| | | } |
| | | |
| | | window.decodeHelper.innerHTML = text; |
| | | return window.decodeHelper.value; |
| | | } |