Skip to content

Commit

Permalink
Add support page (#1562)
Browse files Browse the repository at this point in the history
* Add support page

* Comments
  • Loading branch information
jamesmaa authored Nov 5, 2024
1 parent dc174a9 commit e7cfac4
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ext/info.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@ <h2 id="links">Links</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>Information and downloadable dictionaries: <a href="https://github.com/yomidevs/yomitan#yomitan" rel="noreferrer noopener">Homepage</a></li>
<li>Support and source code: <a href="https://github.com/yomidevs/yomitan" rel="noreferrer noopener">Github</a></li>
<li>Information and user guide: <a href="https://yomitan.wiki" rel="noreferrer noopener">Homepage</a></li>
<li>Recommended dictionaries: <a href="https://yomitan.wiki/dictionaries/">Yomitan Dictionaries</a></li>
<li>Source code: <a href="https://github.com/yomidevs/yomitan" rel="noreferrer noopener">Github</a></li>
<li>Release notes: <a href="https://github.com/yomidevs/yomitan/releases" rel="noreferrer noopener" data-href-format="https://github.com/yomidevs/yomitan/releases/tag/{version}" id="release-notes-this-version-link">This version</a> | <a href="https://github.com/yomidevs/yomitan/releases" rel="noreferrer noopener">All versions</a></li>
<li>More extension information: <a href="/permissions.html">Permissions</a> | <a href="/legal.html">Licenses</a> | <a href="/issues.html">Issues</a></li>
<li>Enjoying Yomitan? Help us by writing 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>Bugs? Report them here: <a href="https://github.com/yomidevs/yomitan/issues/new/choose" rel="noreferrer noopener">Github Issues</a></li>
<li>More extension information: <a href="https://yomitan.wiki/privacy/">Permissions</a> | <a href="/legal.html">Licenses</a> | <a href="/issues.html">Issues</a></li>
<li>Enjoying Yomitan? Help us by leaving 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>
</ul>
</div></div></div></div>
</div>
Expand Down
41 changes: 41 additions & 0 deletions ext/js/pages/support-main.js
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';
});
44 changes: 44 additions & 0 deletions ext/support.html
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>

0 comments on commit e7cfac4

Please sign in to comment.