You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
487 B
14 lines
487 B
(function() { |
|
const activeElement = document.activeElement; |
|
var inputs = ["input", "select", "textarea"]; |
|
|
|
if (activeElement && inputs.indexOf(activeElement.tagName.toLowerCase()) !== -1) { |
|
return activeElement.value; |
|
} else { |
|
if (window.location.href.startsWith("https://web.telegram.org/") && activeElement.hasAttribute("placeholder")) { |
|
return activeElement.textContent; |
|
} else { |
|
return undefined; |
|
} |
|
} |
|
})();
|
|
|