Skip to content

Commit

Permalink
Added languages: en, cs
Browse files Browse the repository at this point in the history
  • Loading branch information
ultronstudio committed Mar 8, 2023
1 parent 4791549 commit f103524
Show file tree
Hide file tree
Showing 11 changed files with 150 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
config/
37 changes: 37 additions & 0 deletions _locales/cs/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"extName": {
"name": "HopHub",
"description": "Jméno rozšíření",
"message": "HopHub"
},
"extDesc": {
"name": "Upraví styly webu GitHub tak, aby vypadala jako vaše oblíbená stránka s obsahem pro dospělé.",
"description": "Popis rozšíření",
"message": "Upraví styly webu GitHub tak, aby vypadala jako vaše oblíbená stránka s obsahem pro dospělé."
},
"extPopup_ExtLocaleName": {
"name": "Jazyk rozšíření",
"description": "Jazyk rozšíření (název)",
"message": "Jazyk rozšíření"
},
"extPopup_ExtLocaleValue": {
"name": "Čeština",
"description": "Jazyk rozšíření (hodnota)",
"message": "Čeština"
},
"extPopup_ExtVersionName": {
"name": "Verze rozšíření",
"description": "Verze rozšíření (název)",
"message": "Verze rozšíření"
},
"extPopup_ExtVersionValue": {
"name": "1.0.0",
"description": "Verze rozšíření (hodnota)",
"message": "1.0.0"
},
"extPopup_ExtDownloadHere": {
"name": "Ke stažení zde",
"description": "Odkaz na stažení (název)",
"message": "Ke stažení zde"
}
}
37 changes: 37 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"extName": {
"name": "HopHub",
"description": "Extension name",
"message": "HopHub"
},
"extDesc": {
"name": "Styles the GitHub page to look like your favorite adult site.",
"description": "Description of extension",
"message": "Styles the GitHub page to look like your favorite adult site."
},
"extPopup_ExtLocaleName": {
"name": "Extension language",
"description": "Extension language (title)",
"message": "Extension language"
},
"extPopup_ExtLocaleValue": {
"name": "English",
"description": "Extension language (value)",
"message": "English"
},
"extPopup_ExtVersionName": {
"name": "Extension version",
"description": "Extension version (title)",
"message": "Extension version"
},
"extPopup_ExtVersionValue": {
"name": "1.0.0",
"description": "Extension version (value)",
"message": "1.0.0"
},
"extPopup_ExtDownloadHere": {
"name": "Download here",
"description": "Download link (title)",
"message": "Download here"
}
}
4 changes: 4 additions & 0 deletions content.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,9 @@ style.innerHTML = `
.border-bottom {
border: none !important;
}
.reponame-suggestion, .color-fg-success {
color: var(--global) !important;
}
`;
document.head.appendChild(style);
4 changes: 0 additions & 4 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
--white: #fff;
}

.reponame-suggestion {
color: var(--global) !important;
}

.btn-primary, .btn-primary > svg {
color: var(--black) !important;
background-color: var(--global) !important;
Expand Down
Binary file added images/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions js/bootstrap.bundle.min.js

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions js/popup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
window.onload = function(){
const extlang_name = document.getElementById("extlang_name");
const extlang_value = document.getElementById("extlang_value");
const extver_name = document.getElementById("extver_name");
const extver_value = document.getElementById("extver_value");
const extdwnload_name = document.getElementById("extdwnload_name");

extlang_name.innerText = chrome.i18n.getMessage("extPopup_ExtLocaleName");
extlang_value.innerText = chrome.i18n.getMessage("extPopup_ExtLocaleValue");
extver_name.innerText = chrome.i18n.getMessage("extPopup_ExtVersionName");
extver_value.innerText = chrome.i18n.getMessage("extPopup_ExtVersionValue");
extdwnload_name.innerText = chrome.i18n.getMessage("extPopup_ExtDownloadHere");
};
12 changes: 7 additions & 5 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "HopHub",
"description": "Styles the GitHub page to look like your favorite adult site.",
"version": "1.0.0",
"manifest_version": 3,
"default_locale": "en",
"name": "__MSG_extName__",
"description": "__MSG_extDesc__",
"version": "1.0.0",
"icons": {
"16": "images/logo.png",
"32": "images/logo.png",
Expand All @@ -11,7 +12,8 @@
},
"action": {
"default_icon": "images/logo.png",
"default_title": "HopHub"
"default_title": "__MSG_extName__",
"default_popup": "./popup.html"
},
"permissions": [
"activeTab"
Expand All @@ -35,7 +37,7 @@
],
"web_accessible_resources": [
{
"resources": [ "*.png" ],
"resources": [ "*.png", "*.js", "*.css" ],
"matches": [ "https://github.com/*" ]
}
]
Expand Down
54 changes: 44 additions & 10 deletions popup.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,46 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<link rel="stylesheet" href="./css/styles.css">
</head>
<body>
<script src="./content.js"></script>
</body>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>HopHub</title>
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD"
crossorigin="anonymous">
<style>
.extension-logo {
width: auto;
height: 75px;
}
</style>
</head>
<body>
<div class="container mt-2 mb-2">
<div class="justify-content-center text-center mb-2">
<img src="./images/logo.png" alt="HopHub"
class="extension-logo">
</div>
<div class="alert alert-info mb-2" role="alert" id="extinfo">
<table class="table table-borderless">
<thead>
<tr>
<th scope="col" id="extlang_name">undefined</th>
<th scope="col" id="extver_name">undefined</th>
</tr>
</thead>
<tbody>
<tr>
<td id="extlang_value">undefined</td>
<td id="extver_value">undefined</td>
</tr>
</tbody>
</table>
</div>
<p class="mb-2"><a href="https://github.com/ultronstudio/HopHub/releases" target="_blank" rel="noopener noreferrer"><span id="extdwnload_name">undefined</span></a></p>
</div>
<script src="./js/popup.js"></script>
<script src="./js/bootstrap.bundle.min.js"></script>
</body>
</html>

0 comments on commit f103524

Please sign in to comment.