mirror of
https://github.com/huhu/rust-search-extension
synced 2024-11-15 16:07:57 +00:00
13 lines
No EOL
393 B
JavaScript
13 lines
No EOL
393 B
JavaScript
(function() {
|
|
// Parse crate info from location pathname.
|
|
let [crateName, crateVersion] = location.pathname.slice(1).split("/");
|
|
crateName = crateName.replace("-", "_");
|
|
window.postMessage({
|
|
direction: "rust-search-extension",
|
|
message: {
|
|
crateName,
|
|
crateVersion,
|
|
searchIndex: window.searchIndex,
|
|
},
|
|
}, "*");
|
|
})(); |