rust-search-extension/extension/script/add-search-index.js
2020-04-17 18:50:18 +08:00

12 lines
No EOL
351 B
JavaScript

(function() {
// Parse crate info from location pathname.
let [_, crateVersion, crateName] = location.pathname.slice(1).split("/");
window.postMessage({
direction: "rust-search-extension",
message: {
crateName,
crateVersion,
searchIndex: window.searchIndex,
},
}, "*");
})();