Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timer to singleplayer (#257) #297

Merged
merged 5 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/admin/category-reports.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions client/admin/category-reports.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getBonusPartLabel } from '../utilities/index.js';
import { getBonusPartLabel } from '../scripts/utilities/index.js';
const ALTERNATE_SUBCATEGORIES = {
Literature: ['Drama', 'Long Fiction', 'Poetry', 'Short Fiction', 'Misc Literature'],
History: [],
Expand Down Expand Up @@ -236,4 +236,4 @@ document.getElementById('new-category').addEventListener('input', function () {
}
});
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render( /*#__PURE__*/React.createElement(Reports, null));
root.render( /*#__PURE__*/React.createElement(Reports, null));
2 changes: 1 addition & 1 deletion client/admin/category-reports.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getBonusPartLabel } from '../utilities/index.js';
import { getBonusPartLabel } from '../scripts/utilities/index.js';

const ALTERNATE_SUBCATEGORIES = {
Literature: ['Drama', 'Long Fiction', 'Poetry', 'Short Fiction', 'Misc Literature'],
Expand Down
2 changes: 1 addition & 1 deletion client/admin/geoword/category-stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/admin/geoword/category-stats.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { escapeHTML, titleCase } from '../../utilities/strings.js';
import { escapeHTML, titleCase } from '../../scripts/utilities/strings.js';

const division = decodeURIComponent(window.location.pathname.split('/')[5]);
const packetName = window.location.pathname.split('/')[4];
Expand Down
2 changes: 1 addition & 1 deletion client/admin/geoword/compare.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link id="custom-css" href="/bootstrap/dark.css" rel="stylesheet">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/admin/geoword/compare.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { escapeHTML } from '../../utilities/strings.js';
import { escapeHTML } from '../../scripts/utilities/strings.js';

function removeParentheses (answer) {
return answer.replace(/[([].*/g, '');
Expand Down
2 changes: 1 addition & 1 deletion client/admin/geoword/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/admin/geoword/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { titleCase } from '../../utilities/strings.js';
import { titleCase } from '../../scripts/utilities/strings.js';

fetch('/api/geoword/packet-list')
.then(response => response.json())
Expand Down
2 changes: 1 addition & 1 deletion client/admin/geoword/leaderboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/admin/geoword/leaderboard.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { escapeHTML, titleCase } from '../../utilities/strings.js';
import { escapeHTML, titleCase } from '../../scripts/utilities/strings.js';

const division = decodeURIComponent(window.location.pathname.split('/')[5]);
const packetName = window.location.pathname.split('/')[4];
Expand Down
2 changes: 1 addition & 1 deletion client/admin/geoword/protests.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/admin/geoword/protests.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { escapeHTML, titleCase } from '../../utilities/strings.js';
import { escapeHTML, titleCase } from '../../scripts/utilities/strings.js';

const division = decodeURIComponent(window.location.pathname.split('/')[5]);
const packetName = window.location.pathname.split('/')[4];
Expand Down
2 changes: 1 addition & 1 deletion client/admin/geoword/stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/admin/geoword/stats.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { titleCase } from '../../utilities/strings.js';
import { titleCase } from '../../scripts/utilities/strings.js';

const division = decodeURIComponent(window.location.pathname.split('/')[5]);
const packetName = window.location.pathname.split('/')[4];
Expand Down
2 changes: 1 addition & 1 deletion client/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/admin/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import account from '../accounts.js';
import account from '../scripts/accounts.js';

const username = await account.getUsername();
if (username) {
Expand Down
2 changes: 1 addition & 1 deletion client/api-docs/bonus-by-id.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/api-docs/check-answer.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/api-docs/frequency-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/api-docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/api-docs/multiplayer/room-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/api-docs/num-packets.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/api-docs/packet-bonuses.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/api-docs/packet-tossups.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/api-docs/packet.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/api-docs/random-bonus.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/api-docs/random-name.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/api-docs/random-tossup.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/api-docs/report-question.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/api-docs/schemas.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/api-docs/set-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/api-docs/tossup-by-id.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/backups/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/database/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
14 changes: 7 additions & 7 deletions client/database/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { stringifyBonus, stringifyTossup } from './stringify.js';
import { downloadQuestionsAsText, downloadBonusesAsCSV, downloadTossupsAsCSV, downloadQuestionsAsJSON } from './download.js';
import account from '../accounts.js';
import api from '../api/index.js';
import CategoryManager from '../utilities/category-manager.js';
import { attachDropdownChecklist, getDropdownValues } from '../utilities/dropdown-checklist.js';
import { getBonusPartLabel } from '../utilities/index.js';
import { insertTokensIntoHTML } from '../utilities/insert-tokens-into-html.js';
import account from '../scripts/accounts.js';
import api from '../scripts/api/index.js';
import CategoryManager from '../scripts/utilities/category-manager.js';
import { attachDropdownChecklist, getDropdownValues } from '../scripts/utilities/dropdown-checklist.js';
import { getBonusPartLabel } from '../scripts/utilities/index.js';
import { insertTokensIntoHTML } from '../scripts/utilities/insert-tokens-into-html.js';
const paginationShiftLength = window.screen.width > 992 ? 10 : 5;
const CATEGORY_BUTTONS = [['Literature', 'primary'], ['History', 'success'], ['Science', 'danger'], ['Fine Arts', 'warning'], ['Religion', 'secondary'], ['Mythology', 'secondary'], ['Philosophy', 'secondary'], ['Social Science', 'secondary'], ['Current Events', 'secondary'], ['Geography', 'secondary'], ['Other Academic', 'secondary'], ['Trash', 'secondary']];
const SUBCATEGORY_BUTTONS = [['American Literature', 'primary'], ['British Literature', 'primary'], ['Classical Literature', 'primary'], ['European Literature', 'primary'], ['World Literature', 'primary'], ['Other Literature', 'primary'], ['American History', 'success'], ['Ancient History', 'success'], ['European History', 'success'], ['World History', 'success'], ['Other History', 'success'], ['Biology', 'danger'], ['Chemistry', 'danger'], ['Physics', 'danger'], ['Other Science', 'danger'], ['Visual Fine Arts', 'warning'], ['Auditory Fine Arts', 'warning'], ['Other Fine Arts', 'warning']];
Expand Down Expand Up @@ -1163,4 +1163,4 @@ function QueryForm() {
}));
}
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render( /*#__PURE__*/React.createElement(QueryForm, null));
root.render( /*#__PURE__*/React.createElement(QueryForm, null));
12 changes: 6 additions & 6 deletions client/database/index.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { stringifyBonus, stringifyTossup } from './stringify.js';
import { downloadQuestionsAsText, downloadBonusesAsCSV, downloadTossupsAsCSV, downloadQuestionsAsJSON } from './download.js';

import account from '../accounts.js';
import api from '../api/index.js';
import CategoryManager from '../utilities/category-manager.js';
import { attachDropdownChecklist, getDropdownValues } from '../utilities/dropdown-checklist.js';
import { getBonusPartLabel } from '../utilities/index.js';
import { insertTokensIntoHTML } from '../utilities/insert-tokens-into-html.js';
import account from '../scripts/accounts.js';
import api from '../scripts/api/index.js';
import CategoryManager from '../scripts/utilities/category-manager.js';
import { attachDropdownChecklist, getDropdownValues } from '../scripts/utilities/dropdown-checklist.js';
import { getBonusPartLabel } from '../scripts/utilities/index.js';
import { insertTokensIntoHTML } from '../scripts/utilities/insert-tokens-into-html.js';

const paginationShiftLength = window.screen.width > 992 ? 10 : 5;

Expand Down
2 changes: 1 addition & 1 deletion client/database/stringify.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getBonusPartLabel } from '../utilities/index.js';
import { getBonusPartLabel } from '../scripts/utilities/index.js';

function stringifyBonus (bonus, includeMetadata = false) {
let textdata = '';
Expand Down
2 changes: 1 addition & 1 deletion client/frequency-list/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
5 changes: 3 additions & 2 deletions client/frequency-list/subcategory.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down Expand Up @@ -67,7 +67,8 @@
<div class="container-xl mt-3 mb-5 pb-5">
<p class="">
<span class="lead" id="numbering-info">
The <span id="limit">50</span> most frequent answers in <span id="subcategory-name"></span> <span id="question-type">questions</span>:
The <span id="limit">50</span> most frequent answers in <span id="subcategory-name"></span> <span
id="question-type">questions</span>:
</span>
<span class="float-end" id="numbering-info">
<a href="/frequency-list">Back to all frequency lists</a>
Expand Down
2 changes: 1 addition & 1 deletion client/geoword/category-stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<link href="/bootstrap/light.css" rel="stylesheet">
<link href="/bootstrap/dark.css" rel="stylesheet" id="custom-css">
<script type="module" src="/apply-theme.js"></script>
<script type="module" src="/scripts/apply-theme.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion client/geoword/category-stats.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { escapeHTML, titleCase } from '../../../../../../../utilities/index.js';
import { escapeHTML, titleCase } from '../../../../../../../scripts/utilities/index.js';

const packetName = window.location.pathname.split('/').pop();
const packetTitle = titleCase(packetName);
Expand Down
Loading
Loading