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 support page #1562

Merged
merged 2 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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>Free starter dictionaries: <a href="https://github.com/yomidevs/kaikki-to-yomitan/blob/master/downloads.md" rel="noreferrer noopener">Yomitan Wiktionary Dictionaries</a></li>
jamesmaa marked this conversation as resolved.
Show resolved Hide resolved
<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 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>
jamesmaa marked this conversation as resolved.
Show resolved Hide resolved
<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 source code! Start by reading our <a href="https://github.com/yomidevs/yomitan/blob/master/CONTRIBUTING.md" rel="noreferrer noopener">Contribution Guidelines</a>.</li>
jamesmaa marked this conversation as resolved.
Show resolved Hide resolved
</ul>
</div></div></div></div>
</div>
</div>
<div class="content-right"></div>
</div></div>

</body>
</html>
Loading