diff --git a/code/smartphone.js b/code/smartphone.js index 56e0c57c..f246b3a8 100644 --- a/code/smartphone.js +++ b/code/smartphone.js @@ -157,3 +157,9 @@ window.runOnSmartphonesAfterBoot = function() { window.MAX_DRAWN_LINKS = 200; window.MAX_DRAWN_FIELDS = 100; } + +window.useAndroidPanes = function() { + // isSmartphone is important to disable panes in desktop mode + return (typeof android !== 'undefined' && android && android.addPane && window.isSmartphone()); +} + diff --git a/plugins/bookmarks-by-zaso.user.js b/plugins/bookmarks-by-zaso.user.js index a69c40d7..339233ef 100644 --- a/plugins/bookmarks-by-zaso.user.js +++ b/plugins/bookmarks-by-zaso.user.js @@ -948,7 +948,7 @@ $('body').append(window.plugin.bookmarks.htmlBkmrksBox); $('#bookmarksBox').css("display", "none").addClass("mobile"); - if(typeof android !== 'undefined' && android && android.addPane) + if(window.useAndroidPanes()) android.addPane("plugin-bookmarks", "Bookmarks", "ic_action_star"); window.addHook('paneChanged', window.plugin.bookmarks.onPaneChanged); diff --git a/plugins/portal-counts.user.js b/plugins/portal-counts.user.js index 60a41ec9..63a83d1d 100644 --- a/plugins/portal-counts.user.js +++ b/plugins/portal-counts.user.js @@ -184,7 +184,7 @@ window.plugin.portalcounts.getPortals = function (){ var total = self.enlP + self.resP + self.neuP; var title = total + ' ' + (total == 1 ? 'portal' : 'portals'); - if(typeof android !== 'undefined' && android && android.addPane) { + if(window.useAndroidPanes()) { $('
Nothing to show! |