-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check crate version compatibility in docs.rs
- Loading branch information
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
(function () { | ||
if (!window.searchState?.descShards) { | ||
let button = document.querySelector(".add-to-extension"); | ||
if (button) { | ||
button.classList.add("add-to-extension-disabled"); | ||
button.onclick = (event) => { | ||
// Prevent click event propagation to parent element. | ||
event.stopImmediatePropagation(); | ||
}; | ||
} | ||
let content = document.querySelector(".add-to-extension-content"); | ||
if (content) { | ||
content.innerHTML = `<p>This crate version is not supported by Rust Search Extension. <br><br>After Rust Search Extension v2.0 has been released, we only support crate published after 2024-04-20.</p>`; | ||
} | ||
console.log("No searchState.descShards found, cannot add this crate to Rust Search Extension."); | ||
} | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters