<div id="viewer"><center style="padding:100px"><i class="fa fa-spinner fa-3x fa-spin"></i></div>
<script>
function replaceAll(str, find, replace) {
return str.replace(new RegExp(escapeRegExp(find), 'g'), replace);
}
function escapeRegExp(str) {
return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
}
$(function(){
$.get("{{ webviewer_url }}", function(data, status){
document.getElementById('viewer').innerHTML = replaceAll(data, '{{ webviewer_local_directory }}/cache', '{{ webviewer_url }}/cache/');
});
});
</script>
Comments