Refactored access to Dokuwiki's getSelection (helper.php,script.js).