June 17, 2021 at 6:29 am #27542
Werner
Participant
With $(CurText) it’s the same problem.
JavaScript Macro:
#title=”Search engine”
#tooltip=”Search”,1031
if (document.selection.Text !=”) {
var string = document.selection.Text;
string = string.replace(/ /gi, “%20”);
alert(string);
var url = ‘https: //www. bing.com/search?q=’ + string;
window.open(url, ‘w’); // not work!
}