Rewrote URL references and redirects to be relative, not absolute, so server can...
[p2pool.git] / web-static / share.html
index f4b861e..620a3b3 100644 (file)
             function reload(currency_info) {
                 var share_hash = document.location.hash.substr(1);
                 if(share_hash == current_hash) return;
-                d3.json('/web/share/' + share_hash, function(share) {
+                d3.json('../web/share/' + share_hash, function(share) {
                     current_hash = share_hash;
                     var b = d3.select('body');
                     b.selectAll('*').remove();
                     var h1 = b.append('h1');
-                        h1.append('a').attr('href', '/static/').text('P2Pool');
+                        h1.append('a').attr('href', '../static/').text('P2Pool');
                         h1.append('span').text(' > Share ');
                         h1.append('a').attr('href', '#' + share_hash).text(share_hash.substr(-8));
                     if(share == null) {
@@ -87,7 +87,7 @@
                 });
             }
             
-            d3.json('/web/currency_info', function(currency_info) {
+            d3.json('../web/currency_info', function(currency_info) {
                 reload(currency_info);
                 setInterval(function(){ reload(currency_info) }, 100);
             });