From ce25f86708d60510deaeb95c462f04c380d8940f Mon Sep 17 00:00:00 2001 From: YiHui Liu Date: Thu, 21 Nov 2024 12:00:56 +0800 Subject: [PATCH] Feat: new aps style --- JournalViewer | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/JournalViewer b/JournalViewer index 4cafdcc..88f11e6 100644 --- a/JournalViewer +++ b/JournalViewer @@ -15,27 +15,25 @@ (function () { 'use strict'; - // APS + // Old APS let aps_sidebar = document.getElementById("article-sidebar"); - if (aps_sidebar) - aps_sidebar.remove(); + if (aps_sidebar) { aps_sidebar.remove(); } let aps_content = document.getElementById("article-content"); - if (aps_content) - aps_content.style.width = "100%"; + if (aps_content) { aps_content.style.width = "100%"; } + + // New APS + let aps_sidebar_n = document.getElementById("sidebar-wrapper"); + if (aps_sidebar_n) { aps_sidebar.remove(); } // Science Direct let sd_sidebar = document.getElementsByClassName("u-display-block-from-md col-lg-6 col-md-8 pad-right u-padding-s-top")[0]; - if (sd_sidebar) - sd_sidebar.remove(); + if (sd_sidebar) { sd_sidebar.remove(); } let sd_content = document.getElementsByClassName("col-lg-12 col-md-16 pad-left pad-right u-padding-s-top")[0]; - if (sd_content) - sd_content.style.width = "75%"; + if (sd_content) { sd_content.style.width = "75%"; } // Nature let nature_sidebar = document.getElementsByClassName("c-article-extras u-hide-print")[0]; - if (nature_sidebar) - nature_sidebar.remove(); + if (nature_sidebar) { nature_sidebar.remove(); } let nature_content = document.getElementsByClassName("c-article-main-column u-float-left js-main-column")[0]; - if (nature_content) - nature_content.style.width = "100%"; + if (nature_content) { nature_content.style.width = "100%"; } })();