From 46afbd0e1dbb956de3dbff6fc7674d4bcdc775d7 Mon Sep 17 00:00:00 2001 From: Folyd Date: Sat, 22 Jun 2024 00:19:41 -0700 Subject: [PATCH] Remove rustc search statistics --- extension/manage/js/index.js | 4 ---- extension/script/add-search-index.js | 8 -------- extension/statistics.js | 5 ----- 3 files changed, 17 deletions(-) diff --git a/extension/manage/js/index.js b/extension/manage/js/index.js index 901449d..8005351 100644 --- a/extension/manage/js/index.js +++ b/extension/manage/js/index.js @@ -31,10 +31,6 @@ const STATS_MAP = { color: "#f50707", description: "Compile error index searches." }, - "rustc": { - color: "#0995cf", - description: "Rustc docs searches." - }, [TYPE_OTHER]: { color: "#ededed", description: "Others including any Rust version, Clippy lint (>), book (%), and caniuse/rfc (?) searches." diff --git a/extension/script/add-search-index.js b/extension/script/add-search-index.js index e347988..d8c54bb 100644 --- a/extension/script/add-search-index.js +++ b/extension/script/add-search-index.js @@ -37,14 +37,6 @@ searchIndex, }, }, "*"); - } else if (location.pathname.startsWith("/nightly/nightly-rustc/") && - location.hostname === "doc.rust-lang.org") { // rustc pages - window.postMessage({ - direction: 'rust-search-extension:rustc', - message: { - searchIndex: getSearchIndex(), - }, - }, "*"); } else { // stable/nightly pages const STD_CRATES = ['std', 'test', 'proc_macro']; diff --git a/extension/statistics.js b/extension/statistics.js index 3792315..5d32fd5 100644 --- a/extension/statistics.js +++ b/extension/statistics.js @@ -30,11 +30,6 @@ export const STATS_PATTERNS = [{ pattern: /^`?e\d{2,4}`?$/i, type: 6, }, -{ - name: "rustc", - pattern: /^\/\/.*/i, - type: 7, -}, { name: "other", pattern: /^[>%?]|(v?1\.).*/i,