Fix locales, fix the popup basic template

This commit is contained in:
ilyaigpetrov 2024-07-30 19:50:23 +05:00
parent 3985973d06
commit 1a75f766e8
6 changed files with 33 additions and 57 deletions

View File

@ -10,36 +10,13 @@
"FOR_TESTING": {
"message": "FOR TESTING"
},
"IfToDecode": {
"message": "If to decode",
"description": ""
"Version": {
"message": "Version"
},
"IfToEncodeUrlTerminators": {
"message": "If to encode URL terminators",
"description": ""
},
"IfToDecodeMultipleTimes": {
"message": "If to decode multiple times",
"description": ""
"PacUpdated": {
"message": "Updated"
},
"Donate": {
"message": "Donate ❤",
"description": ""
},
"CopyUnicodeUrl": {
"message": "Copy Unicode URL",
"description": ""
},
"IconHint": {
"message": "Click to copy unicode URL into the clipboard",
"description": ""
},
"CopyUnicodeLinkToHighlight": {
"message": "Copy Unicode link to highlight",
"description": ""
},
"CopyUrlFromTheAddressBar": {
"message": "Copy URL from the address bar"
"message": "Donate ❤"
}
}

View File

@ -4,31 +4,19 @@
"description": "Name of the extension."
},
"ExtensionDescription": {
"message": "Копируйте юникодные ссылки в буфер обмена без ужасных кодировок с процентами или Punycode!",
"message": "Обход интернет-цензуры в России: https://git.io/ac-wiki",
"description": "Description of the extension."
},
"FOR_TESTING": {
"message": "FOR TESTING"
"message": "ДЛЯ ТЕСТОВ"
},
"IfToDecode": {
"message": "Декодировать",
"description": ""
"Version": {
"message": "Версия"
},
"IfToEncodeUrlTerminators": {
"message": "Кодировать знаки окончания URL",
"description": ""
"PacUpdated": {
"message": "Обновлялись"
},
"Donate": {
"message": "Поддержать ❤",
"description": ""
},
"CopyUnicodeUrl": {
"message": "Скопировать юникодную ссылку",
"description": ""
},
"IconHint": {
"message": "Кликните для копирования юникодной ссылки в буфер обмена",
"description": ""
"message": "Поддержать ❤"
}
}

View File

@ -31,7 +31,7 @@ export const render = ({ version, edition }) => {
"action": {
"default_title":
`__MSG___ | __MSG_Version__: ${version + localizedSuffix}`,
`__MSG_PacUpdated__ | __MSG_Version__: ${version + localizedSuffix}`,
"default_popup": "/src/pages/options/index.html"
},
"options_ui": {

View File

@ -3,8 +3,9 @@
<head>
<meta charset="utf-8">
<style>
:root {
background: url('./gsbg.png') no-repeat;
:root, html, body {
/*background: url('./gsbg.png') no-repeat;*/
z-index: 0;
padding: 0;
margin: 0;
}
@ -26,11 +27,20 @@
color: #bfbfbf;
}
}
img.gsbg {
z-index: -1;
position: relative;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
</style>
</head>
<body>
<img src="./gsbg.png" class="gsbg">
<header>
<div>PAC-script</div>
PAC-script:
</header>
<nav>
<ul>
@ -42,10 +52,10 @@
<input type="radio" value="anticensority" name="pacScript" id="anticensority">
<label for="anticensority">Антицензорити</label>
</li>
<!-- li>
<li>
<input type="radio" value="external" name="pacScript">
<label for="external">Внешний:</label> <input type="text">
</li-->
<label for="external">Внешний:</label> <input type="url">
</li>
<li>
<input type="radio" value="disabled" name="pacScript" id="disabled" checked>
<label for="disabled">Отключить / сброс</label>
@ -58,4 +68,4 @@
</footer>
<script src="./index.mjs" type="module"></script>
</body>
</html>
</html>

View File

@ -1,3 +1,4 @@
/*
import { storage } from '../../lib/common-apis.mjs';
donate.href = await storage.getAsync('donateUrl');
@ -16,7 +17,7 @@ options.forEach(([key, value], i) => {
chrome.contextMenus.update(key, { checked: target.checked });
};
});
*/
const textElements = document.querySelectorAll('[data-localize]');
textElements.forEach((e) => {
const ref = e.dataset.localize;

View File

@ -35,7 +35,7 @@ const ifAllArgsProvided = requiredFlags.reduce(
const currentDate = new Date().toISOString().split('T')[0].replaceAll('-', '');
const semver = process.env.npm_package_version;
const context = {
version: `${semver}.${currentDate}`,
version: `${currentDate}.${semver}`,
edition: args.edition,
};