attempt to fix android json dictionary management

This commit is contained in:
wareya committed 2019-06-12 06:57:05 -04:00
1 parent 3cf74f46a3
commit 655a88ce02
2 files changed
+38 -2

No files matched your search

+38
View File
@@ -2,6 +2,29 @@
'use strict';
let platform = "win";
async function get_real_platform()
{
let my_platform = undefined;
try {
my_platform = await browser.runtime.sendMessage({type:"platform"});
if(my_platform)
my_platform = my_platform["response"];
}catch(err){}
while(my_platform == "")
{
try {
my_platform = await browser.runtime.sendMessage({type:"platform"});
if(my_platform)
my_platform = my_platform["response"];
}catch(err){}
}
platform = my_platform;
}
get_real_platform();
let settings = [];
function defaults()
@@ -579,6 +602,8 @@ function buildpage()
optionsection.appendChild(container);
}
if(platform != "android")
{
// mining
let liveminingbutton = document.createElement("button");
@@ -598,6 +623,19 @@ function buildpage()
optionsection.appendChild(jsonmanagebutton);
optionsection.appendChild(document.createElement("hr"));
}
else
{
// import
let jsonmanagebutton = document.createElement("button");
jsonmanagebutton.type = "button";
jsonmanagebutton.innerText = "Manage JSON Dictionaries";
jsonmanagebutton.onclick = function(e){browser.tabs.create({url:browser.extension.getURL('json_config.html')}); e.preventDefault();};
optionsection.appendChild(jsonmanagebutton);
optionsection.appendChild(document.createElement("hr"));
}
// deconjugation rules
-2
View File
@@ -61,8 +61,6 @@ only_selection: false
let platform = "win";
let last_seen_doc = undefined;
async function get_real_platform()
{