Debian Codegraph @

inst/rmd/h/rmarkdown/rmd_loader.js

raw symbols SCIP
1 /*jshint browser:true, strict:false, curly:false, indent:3*/
2 (function(){
3 try {
4 window.setTimeout(function() {
5 // if the document has loaded in an error state after the loader
6 // appears, hide the loader gracefully
7 var intervalId = window.setInterval(function() {
8 if ($("#__reactivedoc__").hasClass("shiny-output-error"))
9 $("#rmd_loader").fadeOut(400);
10 // once loading is finished (which Shiny indicates by hiding the
11 // rmd_loader), initialize slidy if it exists, and stop the timer
12 if (!$("#rmd_loader").is(":visible")) {
13 // initialize slidy after load completes
14 if (typeof window.w3c_slidy != "undefined") {
15 w3c_slidy.mouse_click_enabled = false; // interferes with Shiny input
16 w3c_slidy.init();
17 }
18 window.clearInterval(intervalId);
19 }
20 }, 500);
21 $("#rmd_loader").fadeIn(400);
22 },
23 // fade the loader into view after 200 ms
24 200);
25 }
26 catch (e) {
27 // ignore failures here; the loading status is nonessential
28 }
29 })();