rocca commited on
Commit
ef30362
·
verified ·
1 Parent(s): 1858ce5

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +7 -0
index.html CHANGED
@@ -51,6 +51,13 @@
51
 
52
  <body>
53
 
 
 
 
 
 
 
 
54
  <button onclick="readmeCtn.hidden=!readmeCtn.hidden">ℹ️ toggle readme</button>
55
  <pre hidden id="readmeCtn">
56
  <b>Note: This should work for any OpenAI-compatible API server.</b>
 
51
 
52
  <body>
53
 
54
+ <script>
55
+ window.hashParams = document.location.hash ? Object.fromEntries(document.location.hash.slice(1).split(";").map(kv => kv.split("="))) : ({});
56
+ if(window.hashParams.serverOrigin) localStorage.serverOrigin = window.hashParams.serverOrigin;
57
+ if(window.hashParams.modelName) localStorage.modelName = window.hashParams.modelName;
58
+ if(window.hashParams.apiKey) localStorage.apiKey = window.hashParams.apiKey;
59
+ </script>
60
+
61
  <button onclick="readmeCtn.hidden=!readmeCtn.hidden">ℹ️ toggle readme</button>
62
  <pre hidden id="readmeCtn">
63
  <b>Note: This should work for any OpenAI-compatible API server.</b>