From 2786edcdcfe0f9dd8dc5dcf975b37de799c20956 Mon Sep 17 00:00:00 2001 From: willerbee Date: Tue, 13 Oct 2020 15:19:16 +0800 Subject: [PATCH] Added commands to switch views --- public/js/commandline.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/public/js/commandline.js b/public/js/commandline.js index c63813c73..c0e30c78f 100644 --- a/public/js/commandline.js +++ b/public/js/commandline.js @@ -404,6 +404,34 @@ let commands = { display: "Next random theme", exec: () => randomiseTheme() }, + { + id: "viewTypingPage", + display: "View Typing Page", + exec: () => $('#top #menu .icon-button.view-start').click() + }, + { + id: "viewLeaderboards", + display: "View Leaderboards Page", + exec: () => $('#top #menu .icon-button.view-leaderboards').click() + }, + { + id: "viewAbout", + display: "View About Page", + exec: () => $('#top #menu .icon-button.view-about').click() + }, + { + id: "viewSettings", + display: "View Settings Page", + exec: () => $('#top #menu .icon-button.view-settings').click() + }, + { + id: "viewAccount", + display: "View Account Page", + exec: () => + $('#top #menu .icon-button.view-account').hasClass('hidden') ? + $('#top #menu .icon-button.view-login').click() : + $('#top #menu .icon-button.view-account').click() + }, { id: "bailOut", display: "Bail out...",