summaryrefslogtreecommitdiff
path: root/js/common.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-21 10:35:39 +0300
committerAndrew Dolgov <[email protected]>2021-02-21 10:35:39 +0300
commitfb471652c00abec604e07c2383685c0e352c897e (patch)
treedfa709287b28318173c8c327ee358a1f28667e1d /js/common.js
parent9e56896bd428114ff9bfd979c2d4ff8d93f99485 (diff)
parent3b8d69206ccc24b41b45acd55f0c63681e749fd1 (diff)
Merge branch 'wip-filter-stuff'
Diffstat (limited to 'js/common.js')
-rwxr-xr-xjs/common.js22
1 files changed, 0 insertions, 22 deletions
diff --git a/js/common.js b/js/common.js
index e85862990..df1bf8690 100755
--- a/js/common.js
+++ b/js/common.js
@@ -400,25 +400,3 @@ const Notify = {
}
};
-// http://stackoverflow.com/questions/6251937/how-to-get-selecteduser-highlighted-text-in-contenteditable-element-and-replac
-/* exported getSelectionText */
-function getSelectionText() {
- let text = "";
-
- if (typeof window.getSelection != "undefined") {
- const sel = window.getSelection();
- if (sel.rangeCount) {
- const container = document.createElement("div");
- for (let i = 0, len = sel.rangeCount; i < len; ++i) {
- container.appendChild(sel.getRangeAt(i).cloneContents());
- }
- text = container.innerHTML;
- }
- } else if (typeof document.selection != "undefined") {
- if (document.selection.type == "Text") {
- text = document.selection.createRange().textText;
- }
- }
-
- return text.stripTags();
-}