diff --git l10n_client.js l10n_client.js index c610c5a..739dab8 100644 --- l10n_client.js +++ l10n_client.js @@ -12,7 +12,7 @@ jQuery.extend(Drupal, { switch(pressed) { case 'toggle': // Grab user-hilighted text & send it into the search filter - userSelection = window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text; + var userSelection = window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text; userSelection = String(userSelection); if(userSelection.length > 0) { Drupal.l10nClient.filter(userSelection);