Skip to content

Commit

Permalink
Reverse localhost check
Browse files Browse the repository at this point in the history
  • Loading branch information
expitau committed May 14, 2024
1 parent 3bf730f commit dc78d35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/bookmarklet-iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<body>
<script>
let isActive = true;
let wikiTab = window.open(window.location.host == 'expitau.com' ? 'https://expitau.com/InfiniteCraftWiki' : `http://${window.location.host}/web/index.html`);
let wikiTab = window.open(window.location.host.includes('localhost') ? `http://${window.location.host}/web/index.html` : 'https://expitau.com/InfiniteCraftWiki');

let lastSaveData = [];
let saveData = [];
Expand Down
9 changes: 6 additions & 3 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Infinite Craft Wiki</title>
<meta name="description" content="Explore over 3M crafting recipes from Infinite Craft!">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-PCW5J4G9KX"></script>
<script>
Expand Down Expand Up @@ -106,7 +109,8 @@ <h2 style="margin-top: 0; margin-bottom: 0">Import your Infinite Craft data</h2>
<p>
<i>
Importing your game data allows The Wiki to show you which elements you have already
crafted and simplify crafting recipes using your existing elements. It will NOT show any new discoveries, or elements the wiki doesn't know about yet.
crafted and simplify crafting recipes using your existing elements. It will NOT show any
new discoveries, or elements the wiki doesn't know about yet.
</i>
</p>
<p>
Expand Down Expand Up @@ -489,8 +493,7 @@ <h3>Used in</h3>

const CHUNK_WORKER_PATH = 'loadChunkWorker.js';
const DATA_PREFIX = 'data/';
const IFRAME_PATH = window.location.host == 'expitau.com' ? 'https://expitau.com/InfiniteCraftWiki/bookmarklet-iframe'
: `http://${window.location.host}/web/bookmarklet-iframe.html`;
const IFRAME_PATH = window.location.host.includes('localhost') ? `http://${window.location.host}/web/bookmarklet-iframe.html` : 'https://expitau.com/InfiniteCraftWiki/bookmarklet-iframe';

// Vue app
const app = new Vue({
Expand Down

0 comments on commit dc78d35

Please sign in to comment.