refactored script.js to DokuWikis jQuery mode