瀏覽代碼

Use hash to pass config path. Fix #67.

Herbert Vojčík 9 年之前
父節點
當前提交
b556c386c0
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      index.html
  2. 1 1
      index.js

+ 1 - 1
index.html

@@ -11,7 +11,7 @@
 
     <div id="includes">
       <script type='text/javascript'>
-        var base = decodeURIComponent(window.location.search.slice(1)).replace(/\/$/, "");
+        var base = decodeURIComponent(window.location.hash.slice(1)).replace(/\/$/, "");
         var script = document.createElement("script");
         script.src = base + "/config.js";
         document.getElementsByTagName("head")[0].appendChild(script);

+ 1 - 1
index.js

@@ -3,7 +3,7 @@ define(["require"], function (require) {
         pageUrl: function () {
             var a = document.createElement("a");
             a.href = require.toUrl("..");
-            return require.toUrl('./index.html') + "?" + encodeURIComponent(a.href);
+            return require.toUrl('./index.html') + "#" + encodeURIComponent(a.href);
         },
         popup: function () {
             window.open(this.pageUrl(), "Helios", "menubar=no, width=1000, height=600");