There is a bug in ProofreadPages that break this feature. So, there isn't any bug in your code.

User:Beau and I have made a patch that fix this bug and add an option in preferences menu.
We are waiting for a code review and then this patch will be added in the  next update.

You can create a new bug report on bugzilla and say that a lot of people are waiting for this patch.

https://gerrit.wikimedia.org/r/#q,I01d1a914fb07b91988420c138b8c01e48fcafccf,n,z

Thomas PT (User:Tpt)

Alex Brollo <alex.brollo@gmail.com> a écrit :

After ResourceLoader implementation, we poor basic js scripts inventors are crying... 

Well, I'd like to emulate with a local js script the toolbox button switching lateral vs. vertical layout for proofread edit window. 
Does any of you know where can I find the needed js code?

I tried too to set, as suggested by www.mediawiki.org/wiki/Extension:Proofread_Page,
var proofreadpage_default_layout='horizontal';
into my vector.js to obtain a default vertical layout with no result. Some users love this layout, I'd like to help them! Where am I wrong? 

Alex brollo (it:ws)