3,240,867
edits
mNo edit summary |
mNo edit summary |
||
Line 39: | Line 39: | ||
function doSearch(word) { | |||
if (!word) return; | if (!word) return; | ||
word = word.replace(/[\r\n ]+/g, " "); | word = word.replace(/[\r\n ]+/g, " ").trim(); | ||
if (!word || word.length > 70) return; | if (!word || word.length > 70) return; | ||
browser.tabs.create({ | browser.tabs.create({ | ||
"url": "https:// | "url": "https://www.thefreedictionary.com/_/search.aspx?word=" + encodeURIComponent(word) | ||
}); | }); | ||
} | |||
} |