I never get any help here... Oh well, I found it out myself and I'll share my little fix here. I know it is NEVER a good idea to edit sourcecode, but oh well... You'll just have to have a .txt of things to remember when upgrading.
So, I wanted to toggle the regular visual editor on desktop mode, and the mobile on mobile mode. My fix detects if the user is on a mobile or desktop and changes the edit link.
change the addEditButton function in MinervaNeue/resources/skins.minerva.editor/init.js to this:
function addEditButton( section, container ) {
if( navigator.userAgent.match(/Android/i)
|| navigator.userAgent.match(/webOS/i)
|| navigator.userAgent.match(/iPhone/i)
|| navigator.userAgent.match(/iPad/i)
|| navigator.userAgent.match(/iPod/i)
|| navigator.userAgent.match(/BlackBerry/i)
|| navigator.userAgent.match(/Windows Phone/i)
){
var detectmob = true;
}
else {
var detectmob = false;
}
if (detectmob === false) {
return $( '<a class="edit-page">' )
.attr( {
href: window.location.href + '&veaction=edit§ion=' + section,
title: $( container ).attr( 'title' )
} )
.text( mw.msg( 'mobile-frontend-editor-edit' ) )
.prependTo( container );
}
else if(detectmob === true) {
return $( '<a class="edit-page">' )
.attr( {
href: '#/editor/' + section,
title: $( container ).attr( 'title' )
} )
.text( mw.msg( 'mobile-frontend-editor-edit' ) )
.prependTo( container );
}
}
And there you go! A better way to do this is through an extension, I havent made one before and I needed a quick fix. I guess you maybe could fix this in LocalSettings.php in some way.