Hide downloads section of sidebar for apps with no downloads #1221
Co-authored-by:Nhori Lopchan Tamang <nlopchantamang@hubspot.com> Co-authored-by:Ashley Zeldin <ashley.zeldin@gmail.com>
This commit is contained in:
Родитель
b2c361cd4e
Коммит
a839c6472b
|
@ -5,7 +5,6 @@ const {getPlatformFromUserAgent, getPlatformLabel} = require('platform-utils')
|
|||
|
||||
module.exports = function updateAppDownloadLinks () {
|
||||
const links = Array.from(document.querySelectorAll('a.app-download'))
|
||||
|
||||
// No downloads links found on the page.
|
||||
if (!links.length) return
|
||||
|
||||
|
@ -15,6 +14,7 @@ module.exports = function updateAppDownloadLinks () {
|
|||
if (!matches.length) {
|
||||
// No downloads found for the detected OS, probably android/ios
|
||||
// Hide all links and let them click view all files if wanted
|
||||
links[0].parentNode.style.display = 'none'
|
||||
}
|
||||
|
||||
links.forEach(link => {
|
||||
|
|
Загрузка…
Ссылка в новой задаче