()
| 118 | connect() |
| 119 | |
| 120 | function getSelectedText() { |
| 121 | var text = ""; |
| 122 | if (typeof window.getSelection != "undefined") { |
| 123 | text = window.getSelection().toString(); |
| 124 | } else if (typeof document.selection != "undefined" && document.selection.type == "Text") { |
| 125 | text = document.selection.createRange().text; |
| 126 | } |
| 127 | return text; |
| 128 | } |
| 129 | |
| 130 | function pm2Action(type, id) { |
| 131 | const xmlHttp = new XMLHttpRequest(); |