From 747c1a28d0d457874727bb6f7e35ca4371e95fd0 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 19 Oct 2021 11:29:59 +0530 Subject: [PATCH] hide 'Open in...' for already-converted docs --- www/common/drive-ui.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 2709e87d3..b56dee169 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -1303,6 +1303,14 @@ define([ if (!metadata || !Util.isPlainTextFile(metadata.fileType, metadata.title)) { hide.push('openincode'); } + + if (metadata && /\/(doc|presentation|sheet)\//.test(metadata.href)) { + console.error(metadata); // XXX + hide.push('openinsheet'); + hide.push('openindoc'); + hide.push('openinpresentation'); + } + if (!metadata || !Util.isSpreadsheet(metadata.fileType, metadata.title) || !priv.supportsWasm) { hide.push('openinsheet');