Advertisement
Multivit4min

Untitled

Mar 19th, 2016
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. <div id="viewer"><center style="padding:100px"><i class="fa fa-spinner fa-3x fa-spin"></i></div>
  2.  
  3.  
  4. <script>
  5. function replaceAll(str, find, replace) {
  6. return str.replace(new RegExp(escapeRegExp(find), 'g'), replace);
  7. }
  8. function escapeRegExp(str) {
  9. return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
  10. }
  11.  
  12. $(function(){
  13. $.get("{{ webviewer_url }}", function(data, status){
  14. document.getElementById('viewer').innerHTML = replaceAll(data, '{{ webviewer_local_directory }}/cache', '{{ webviewer_url }}/cache/');
  15. });
  16. });
  17. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement