forked from FooSoft/yomichan
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add support page * Comments
- Loading branch information
Showing
3 changed files
with
91 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright (C) 2024 Yomitan Authors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import {ThemeController} from '../app/theme-controller.js'; | ||
import {Application} from '../application.js'; | ||
import {SettingsController} from './settings/settings-controller.js'; | ||
|
||
await Application.main(true, async (application) => { | ||
const settingsController = new SettingsController(application); | ||
await settingsController.prepare(); | ||
|
||
/** @type {ThemeController} */ | ||
const themeController = new ThemeController(document.documentElement); | ||
themeController.prepare(); | ||
const optionsFull = await application.api.optionsGetFull(); | ||
const {profiles, profileCurrent} = optionsFull; | ||
const defaultProfile = (profileCurrent >= 0 && profileCurrent < profiles.length) ? profiles[profileCurrent] : null; | ||
if (defaultProfile !== null) { | ||
themeController.theme = defaultProfile.options.general.popupTheme; | ||
themeController.siteOverride = true; | ||
themeController.updateTheme(); | ||
} | ||
|
||
document.body.hidden = false; | ||
|
||
document.documentElement.dataset.loaded = 'true'; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1"> | ||
<title>Support Yomitan</title> | ||
<link rel="icon" type="image/png" href="/images/icon16.png" sizes="16x16"> | ||
<link rel="icon" type="image/png" href="/images/icon19.png" sizes="19x19"> | ||
<link rel="icon" type="image/png" href="/images/icon32.png" sizes="32x32"> | ||
<link rel="icon" type="image/png" href="/images/icon38.png" sizes="38x38"> | ||
<link rel="icon" type="image/png" href="/images/icon48.png" sizes="48x48"> | ||
<link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64"> | ||
<link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128"> | ||
<link rel="stylesheet" type="text/css" href="/css/material.css"> | ||
<link rel="stylesheet" type="text/css" href="/css/settings.css"> | ||
<script src="/js/pages/support-main.js" type="module"></script> | ||
</head> | ||
<body hidden> | ||
|
||
<!-- Main content --> | ||
<div class="content-outer"><div class="content scrollbar"> | ||
<div class="content-left"></div> | ||
<div class="content-center"> | ||
|
||
<span tabindex="-1" id="content-scroll-focus"></span> | ||
|
||
<h1>Support Yomitan ❤️</h1> | ||
|
||
<h2>Here are some ways to support Yomitan:</h2> | ||
<div class="settings-group"> | ||
<div class="settings-item"><div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label"> | ||
<ul> | ||
<li>Leave us a review on the Firefox/Chrome/Edge store! <a href="https://addons.mozilla.org/en-US/firefox/addon/yomitan/">Firefox</a> | <a href="https://chromewebstore.google.com/detail/yomitan/likgccmbimhjbgkjambclfkhldnlhbnn">Chrome</a> | <a href="https://microsoftedge.microsoft.com/addons/detail/yomitan/idelnfbbmikgfiejhgmddlbkfgiifnnn">Edge</a></li> | ||
<li>Report any bugs or feedback on our <a href="https://github.com/yomidevs/yomitan/issues/new/choose" rel="noreferrer noopener">Github Issues</a>.</li> | ||
<li>Contribute to the Yomitan project! Start by reading our <a href="https://github.com/yomidevs/yomitan/blob/master/CONTRIBUTING.md" rel="noreferrer noopener">Contribution Guidelines</a>.</li> | ||
</ul> | ||
</div></div></div></div> | ||
</div> | ||
</div> | ||
<div class="content-right"></div> | ||
</div></div> | ||
|
||
</body> | ||
</html> |