From fff1fab3cdf6b6c27606292739d577aa2f61969c Mon Sep 17 00:00:00 2001 From: "D. Rimron-Soutter" Date: Tue, 30 Dec 2025 18:03:09 +0000 Subject: [PATCH] Remove some bad style bits, fix wiki tables, remove flashbang, add history to topbar --- i18n/en.json | 2 +- includes/NextBestNetworkTemplate.php | 35 +- public/custom/css/custom.css | 14070 +------------------ public/custom/js/custom.js | 10312 +------------- public/custom/js/custom.js.LICENSE.txt | 2 - resources/styles/custom.scss | 16 + resources/styles/nextbestnetwork.scss | 2 - resources/styles/nextbestnetwork/_toc.scss | 2 +- 8 files changed, 46 insertions(+), 24395 deletions(-) diff --git a/i18n/en.json b/i18n/en.json index 06c05f9..292af60 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -26,7 +26,7 @@ "nextbestnetwork-sidebar-left": "", "nextbestnetwork-sidebar-left-btnclass": "btn btn-primary", "nextbestnetwork-sidebar-left-wrapperclass": "btn-group mb-1", - "nextbestnetwork-sidebar-right": "EDIT-EXT,TOC", + "nextbestnetwork-sidebar-right": "EDIT-EXT,HISTORY,TOC", "nextbestnetwork-sidebar-right-btnclass": "btn btn-primary", "nextbestnetwork-sidebar-right-wrapperclass": "btn-group mb-1", "nextbestnetwork-sidebar-right-dropdownclass": "dropdown-menu-end", diff --git a/includes/NextBestNetworkTemplate.php b/includes/NextBestNetworkTemplate.php index 5a43774..501b09c 100644 --- a/includes/NextBestNetworkTemplate.php +++ b/includes/NextBestNetworkTemplate.php @@ -380,8 +380,23 @@ class NextBestNetworkTemplate extends BaseTemplate { if(preg_match( '/specialpages|whatlinkshere/', $key )) { $divideditems[] = []; } + unset($item['icon']); $divideditems[$key] = $item; } + + // Add page history link at bottom + $views = $this->data['view_urls']; + if( isset( $views['history'] ) ) { + if ( + array_key_exists( 'attributes', $views['history'] ) && false !== strpos( $views['history']['attributes'], 'selected' ) + || array_key_exists( 'class', $views['history'] ) && false !== strpos( $views['history']['class'], 'selected' ) + ) { + $divideditems['history'] = array_shift( $this->data['namespace_urls'] ); + } else { + $divideditems['history'] = $views['history']; + } + } + return [[ 'href' => '#', 'html' => $html, @@ -1239,29 +1254,29 @@ $skin->renderBrand(); echo '