Skip to content

Commit dc4611c

Browse files
committed
Final bugfixes before 0.7
1 parent 207b189 commit dc4611c

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ <h4 class="cookies-per-second-counter">Cookies Per Second: <span id="cookiesPerS
2626
<a href="404.html" target="_blank" id="githubHyperlink"> <!-- this HREF is changed programmatically in main.ts in the event of a fork and a different GitHub repo link. -->
2727
<img class="github" src="img/github-mark.svg" alt="github">
2828
</a>
29-
<h5 class="version-number pointer">Version: <span id="versionNumber">null</span></h5>
29+
<h5 id="versionNumberHolder" class="version-number pointer">Version: <span id="versionNumber">null</span></h5>
3030
<div id="versionSwitchInfo" class="version-switch-info">
3131
<p style="margin:0px; color:black; text-align:center;" id="versionSwitchInfoText">Clicking this will switch to the null branch.</p>
3232
</div>

src/ts/main.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export interface GameSaveData {
6767
export class Game implements SaveProvider<GameSaveData> {
6868
// --- Important game-wide constants ---
6969
public static readonly VERSION: string = "0.7";
70-
public static readonly VERSION_BRANCH: VersionBranch = (location.pathname == "/develop/index.html" || location.pathname == "/develop") ? 2 : (location.pathname == "/beta/index.html" || location.pathname == "/beta") ? 1 : 0;
70+
public static readonly VERSION_BRANCH: VersionBranch = (location.pathname == "/develop/index.html" || location.pathname == "/develop" || location.pathname == "/develop/") ? 2 : (location.pathname == "/beta/index.html" || location.pathname == "/beta" || location.pathname == "/beta/") ? 1 : 0;
7171
public static readonly IN_DEVELOPMENT: boolean = (location.hostname === "localhost" || location.hostname === "127.0.0.1") ? true : false; // automatically toggles if hosted locally
7272
public static readonly GITHUB_REPO: string = "https://github.com/clickercookie/clickercookie.github.io";
7373
public static readonly CREDITS: Record<string, string> = {
@@ -218,9 +218,7 @@ export class Game implements SaveProvider<GameSaveData> {
218218
// change version displayed
219219
document.getElementById("versionNumber").innerText = branchQuickSwitch(Game.VERSION, `${Game.VERSION} Beta`, `${Game.VERSION} Develop`);
220220
document.getElementById("versionSwitchInfoText").innerText = (Game.VERSION_BRANCH === VersionBranch.MAIN) ? "Clicking this will switch to the beta branch" : "Clicking this will switch to the main branch";
221-
if (Game.VERSION_BRANCH === VersionBranch.BETA || Game.VERSION_BRANCH === VersionBranch.DEVELOP) // show the developer mode switch
222-
document.getElementById("devForm").style.display = "block";
223-
221+
224222
if (Game.IN_DEVELOPMENT)
225223
document.title = `cc_${Game.VERSION}_${Game.VERSION_BRANCH}_dev`;
226224

@@ -280,13 +278,13 @@ export class Game implements SaveProvider<GameSaveData> {
280278
// misc
281279
document.getElementById("cookie").addEventListener("click", () => {this.cookieClicked()});
282280
if (Game.VERSION_BRANCH === VersionBranch.MAIN) {
283-
document.getElementById("versionNumber").addEventListener("click", () => { Game.switchToBranch(VersionBranch.BETA) });
281+
document.getElementById("versionNumberHolder").addEventListener("click", () => { Game.switchToBranch(VersionBranch.BETA) });
284282
} else { // develop or beta
285-
document.getElementById("versionNumber").addEventListener("click", () => { Game.switchToBranch(VersionBranch.MAIN) });
283+
document.getElementById("versionNumberHolder").addEventListener("click", () => { Game.switchToBranch(VersionBranch.MAIN) });
286284
}
287-
288-
document.getElementById("versionNumber").addEventListener("mouseover", () => {versionNumberMousedOver()});
289-
document.getElementById("versionNumber").addEventListener("mouseout", () => {versionNumberMousedOver(true)});
285+
286+
document.getElementById("versionNumberHolder").addEventListener("mouseover", () => {versionNumberMousedOver()});
287+
document.getElementById("versionNumberHolder").addEventListener("mouseout", () => {versionNumberMousedOver(true)});
290288

291289
// start intervals (should be right at the end)
292290
this.AUTOSAVE_INTERVAL.start();

0 commit comments

Comments
 (0)