This commit is contained in:
ManeraKai 2024-03-11 19:10:17 +03:00
parent 759e403883
commit 5ca6836bd0
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
3 changed files with 13 additions and 15 deletions

View File

@ -1,7 +1,7 @@
{
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "2.8.2",
"version": "2.8.3",
"manifest_version": 2,
"browser_specific_settings": {
"gecko": {

View File

@ -112,13 +112,9 @@ redirectOnlyInIncognitoElement.addEventListener('change', event => {
const bookmarksMenuElement = document.getElementById('bookmarksMenu')
bookmarksMenuElement.addEventListener('change', async event => {
if (event.target.checked)
bookmarksMenuElement.checked = await browser.permissions.request({
permissions: ["bookmarks"]
})
browser.permissions.request({ permissions: ["bookmarks"] }, r => bookmarksMenuElement.checked = r)
else
bookmarksMenuElement.checked = !await browser.permissions.remove({
permissions: ["bookmarks"]
})
browser.permissions.remove({ permissions: ["bookmarks"] }, r => bookmarksMenuElement.checked = !r)
})
let themeElement = document.getElementById("theme")
@ -149,7 +145,7 @@ let options = await utils.getOptions()
themeElement.value = options.theme
fetchInstancesElement.value = options.fetchInstances
redirectOnlyInIncognitoElement.checked = options.redirectOnlyInIncognito
bookmarksMenuElement.checked = await browser.permissions.contains({ permissions: ["bookmarks"] })
browser.permissions.contains({ permissions: ["bookmarks"] }, r => bookmarksMenuElement.checked = r)
for (const service in config.services) document.getElementById(service).checked = options.popupServices.includes(service)
instanceTypeElement.addEventListener("change", event => {

View File

@ -7,15 +7,17 @@ import utils from "../../assets/javascripts/utils.js"
document.getElementById("more-options").href = browser.runtime.getURL("pages/options/index.html")
document.getElementById("more-options").setAttribute('target', '_blank')
const os = (await browser.runtime.getPlatformInfo()).os
switch (os) {
await browser.runtime.getPlatformInfo(r => {
switch (r.os) {
case "fuchsia":
case "ios":
case "android": {
document.getElementsByTagName("html")[0].classList.add("mobile")
}
}
}
)
const allSites = document.getElementById("all_sites")
const currSite = document.getElementById("current_site")