[misc] Backport changes in the overwritten xwiki.js file