MCPcopy Create free account
hub / github.com/doorbash/pm2-web / getSelectedText

Function getSelectedText

static/script.js:120–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118connect()
119
120function 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
130function pm2Action(type, id) {
131 const xmlHttp = new XMLHttpRequest();

Callers 2

connectFunction · 0.85
script.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected