File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
devdocs-macos/user-scripts Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 11( function ( ) {
2- var original = document . addEventListener ;
2+ // Need to patch app.views.Mobile.detect internals to force desktop mode.
3+ var original = window . matchMedia ;
34 var patcher = function ( ) {
4- // Force desktop mode.
5- if ( arguments [ 0 ] === 'DOMContentLoaded' ) {
6- app . views . Mobile . detect = function ( ) {
7- return false ;
8- } ;
9- document . addEventListener = original ;
10- }
11- original . apply ( null , arguments ) ;
5+ return { matches : false } ;
126 } ;
13- document . addEventListener = patcher ;
7+ window . matchMedia = patcher ;
148
159 var afterInit = function ( ) {
1610 if ( typeof app . settings === 'object' ) {
11+ window . matchMedia = original ;
1712 window . webkit . messageHandlers . vcBus . postMessage ( { type : 'afterInit' } ) ;
1813 } else {
1914 requestAnimationFrame ( afterInit ) ;
You can’t perform that action at this time.
0 commit comments