This commit is contained in:
Ray Lothian 2018-08-15 16:31:50 +04:30
parent 1bbc470874
commit 233ba1c089
2 changed files with 9 additions and 4 deletions

View file

@ -181,18 +181,18 @@ User-Agent String: ${prefs.mode === 'custom' ? custom : prefs.ua || navigator.us
chrome.storage.local.get({ chrome.storage.local.get({
'version': null, 'version': null,
'faqs': true, 'faqs': true,
'last-update': 0, 'last-update': 0
}, prefs => { }, prefs => {
const version = chrome.runtime.getManifest().version; const version = chrome.runtime.getManifest().version;
if (prefs.version ? (prefs.faqs && prefs.version !== version) : true) { if (prefs.version ? (prefs.faqs && prefs.version !== version) : true) {
const now = Date.now(); const now = Date.now();
const doUpdate = (now - prefs['last-update']) / 1000 / 60 / 60 / 24 > 30; const doUpdate = (now - prefs['last-update']) / 1000 / 60 / 60 / 24 > 45;
chrome.storage.local.set({ chrome.storage.local.set({
version, version,
'last-update': doUpdate ? Date.now() : prefs['last-update'] 'last-update': doUpdate ? Date.now() : prefs['last-update']
}, () => { }, () => {
// do not display the FAQs page if last-update occurred less than 30 days ago. // do not display the FAQs page if last-update occurred less than 45 days ago.
if (doUpdate) { if (doUpdate) {
const p = Boolean(prefs.version); const p = Boolean(prefs.version);
chrome.tabs.create({ chrome.tabs.create({

View file

@ -80,6 +80,7 @@ select {
overflow: auto; overflow: auto;
height: 300px; height: 300px;
margin-bottom: 10px; margin-bottom: 10px;
color: #000;
background-color: #fdfafa; background-color: #fdfafa;
background-position: top 120px center; background-position: top 120px center;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -93,6 +94,7 @@ select {
} }
#list th { #list th {
height: 30px; height: 30px;
color: #000;
background-color: #e7e7e7; background-color: #e7e7e7;
} }
#list tr { #list tr {
@ -105,12 +107,14 @@ select {
position: relative; position: relative;
} }
#list tbody tr:nth-child(odd) { #list tbody tr:nth-child(odd) {
color: #000;
background-color: #fff; background-color: #fff;
} }
#list tbody tr:nth-child(even) { #list tbody tr:nth-child(even) {
color: #000;
background-color: #f5f5f5; background-color: #f5f5f5;
} }
#list[data-loading=false] tbody:empty:before { #list[data-loading=false] tbody:empty::before {
content: 'no user-agent string for this query!'; content: 'no user-agent string for this query!';
display: block; display: block;
position: absolute; position: absolute;
@ -168,6 +172,7 @@ select {
[data-cmd="options"], [data-cmd="options"],
[data-cmd="refresh"] { [data-cmd="refresh"] {
color: #000;
background-color: #f5f5f5; background-color: #f5f5f5;
} }