Anonymous

Ask at the forum if you have an Ancient or Modern Greek query!

MediaWiki:Common.js: Difference between revisions

From LSJ
m
no edit summary
mNo edit summary
mNo edit summary
Line 39: Line 39:




$(function () {
function doSearch(word) {
        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://lsj.gr/index.php?search=" + encodeURIComponent(word)
"url": "https://www.thefreedictionary.com/_/search.aspx?word=" + encodeURIComponent(word)
});
});
window.close();
}
}());