rate-the-docs
Version:
Feedback widget for Read the Docs documentation
14 lines (11 loc) • 344 B
JavaScript
import initWidget from "./widget";
function onDocumentReady(callback) {
if (document.attachEvent ? document.readyState === "complete" : document.readyState !== "loading"){
callback();
} else {
document.addEventListener('DOMContentLoaded', callback);
}
}
onDocumentReady(function() {
initWidget(window.RATETHEDOCS_OPTIONS)
});