require FF >= 55
This commit is contained in:
parent
f966b2ef96
commit
d048c480c3
|
@ -176,12 +176,6 @@ chrome.runtime.onInstalled.addListener(({reason, previousVersion}) => {
|
|||
if (UA.mobile) prefs.set('manage.newUI', false);
|
||||
if (UA.windows) prefs.set('editor.keyMap', 'sublime');
|
||||
}
|
||||
if (reason === 'update') {
|
||||
const [a, b, c] = (previousVersion || '').split('.');
|
||||
if (a <= 1 && b <= 5 && c <= 13) { // 1.5.13
|
||||
require(['/background/remove-unused-storage']);
|
||||
}
|
||||
}
|
||||
// TODO: remove this before 1.5.23 as it's only for a few users who installed git 26b75e77
|
||||
if (reason === 'update' && previousVersion === '1.5.22') {
|
||||
for (const dbName of ['drafts', prefs.STORAGE_KEY]) {
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
/* global chromeLocal */// storage-util.js
|
||||
'use strict';
|
||||
|
||||
// Removing unused stuff from storage on extension update
|
||||
// TODO: delete this by the middle of 2021
|
||||
|
||||
try {
|
||||
localStorage.clear();
|
||||
} catch (e) {}
|
||||
|
||||
setTimeout(async () => {
|
||||
const del = Object.keys(await chromeLocal.get())
|
||||
.filter(key => key.startsWith('usoSearchCache'));
|
||||
if (del.length) chromeLocal.remove(del);
|
||||
}, 15e3);
|
|
@ -43,17 +43,14 @@
|
|||
/* about:blank iframes are often used by sites for file upload or background tasks
|
||||
* and they may break if unexpected DOM stuff is present at `load` event
|
||||
* so we'll add the styles only if the iframe becomes visible */
|
||||
const {IntersectionObserver} = window;
|
||||
const xoEventId = `${Math.random()}`;
|
||||
/** @type IntersectionObserver */
|
||||
let xo;
|
||||
if (IntersectionObserver) {
|
||||
window[Symbol.for('xo')] = (el, cb) => {
|
||||
if (!xo) xo = new IntersectionObserver(onIntersect, {rootMargin: '100%'});
|
||||
el.addEventListener(xoEventId, cb, {once: true});
|
||||
xo.observe(el);
|
||||
};
|
||||
}
|
||||
|
||||
// Declare all vars before init() or it'll throw due to "temporal dead zone" of const/let
|
||||
const ready = init();
|
||||
|
@ -246,11 +243,7 @@
|
|||
}
|
||||
|
||||
function onFrameElementInView(cb) {
|
||||
if (IntersectionObserver) {
|
||||
parent[parent.Symbol.for('xo')](frameElement, cb);
|
||||
} else {
|
||||
requestAnimationFrame(cb);
|
||||
}
|
||||
}
|
||||
|
||||
/** @param {IntersectionObserverEntry[]} entries */
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
globalSetOption(key, value) {
|
||||
CodeMirror.defaults[key] = value;
|
||||
if (cms.size > 4 && lazyOpt && lazyOpt.names.includes(key)) {
|
||||
if (cms.size > 4 && lazyOpt.names.includes(key)) {
|
||||
lazyOpt.set(key, value);
|
||||
} else {
|
||||
cms.forEach(cm => cm.setOption(key, value));
|
||||
|
@ -104,7 +104,7 @@
|
|||
|
||||
// lazy propagation
|
||||
|
||||
lazyOpt = window.IntersectionObserver && {
|
||||
lazyOpt = {
|
||||
names: ['theme', 'lineWrapping'],
|
||||
set(key, value) {
|
||||
const {observer, queue} = lazyOpt;
|
||||
|
|
|
@ -60,14 +60,9 @@
|
|||
const body = pw.document.body;
|
||||
pw.on('keydown', removePopupOnEsc);
|
||||
pw.close = removePopup;
|
||||
if (pw.IntersectionObserver) {
|
||||
new pw.IntersectionObserver(onIntersect).observe(body.appendChild(
|
||||
$create('div', {style: {height: '1px', marginTop: '-1px'}})
|
||||
));
|
||||
} else {
|
||||
frame.dataset.loaded = '';
|
||||
frame.height = body.scrollHeight;
|
||||
}
|
||||
new pw.MutationObserver(onMutation).observe(body, {
|
||||
attributes: true,
|
||||
attributeFilter: ['style'],
|
||||
|
|
|
@ -16,8 +16,7 @@ function SectionsEditor() {
|
|||
const container = $('#sections');
|
||||
/** @type {EditorSection[]} */
|
||||
const sections = [];
|
||||
const xo = window.IntersectionObserver &&
|
||||
new IntersectionObserver(refreshOnViewListener, {rootMargin: '100%'});
|
||||
const xo = new IntersectionObserver(refreshOnViewListener, {rootMargin: '100%'});
|
||||
let INC_ID = 0; // an increment id that is used by various object to track the order
|
||||
let sectionOrder = '';
|
||||
let headerOffset; // in compact mode the header is at the top so it reduces the available height
|
||||
|
@ -632,7 +631,7 @@ function SectionsEditor() {
|
|||
if (code) {
|
||||
linterMan.enableForEditor(cm, code);
|
||||
}
|
||||
if (force || !xo) {
|
||||
if (force) {
|
||||
refreshOnViewNow(cm);
|
||||
} else {
|
||||
xo.observe(cm.display.wrapper);
|
||||
|
|
18
global.css
18
global.css
|
@ -359,20 +359,6 @@ body.resizing-v > * {
|
|||
}
|
||||
|
||||
@supports (-moz-appearance: none) {
|
||||
.moz-appearance-bug .svg-icon.checked,
|
||||
.moz-appearance-bug .onoffswitch input,
|
||||
.moz-appearance-bug input[type="radio"]:after {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.moz-appearance-bug input[type="checkbox"] {
|
||||
-moz-appearance: checkbox !important;
|
||||
}
|
||||
|
||||
.moz-appearance-bug input[type="radio"] {
|
||||
-moz-appearance: radio !important;
|
||||
}
|
||||
|
||||
.firefox select {
|
||||
padding: 0 20px 0 2px;
|
||||
line-height: var(--input-height)!important;
|
||||
|
@ -400,10 +386,6 @@ body.resizing-v > * {
|
|||
border: 1px solid hsl(0, 0%, 66%);
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.firefox.moz-appearance-bug button:not(.install) {
|
||||
padding: 2px 4px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 850px) {
|
||||
|
|
|
@ -46,15 +46,13 @@ const [CHROME, UA] = (() => {
|
|||
// see PR #781
|
||||
const CHROME_POPUP_BORDER_BUG = CHROME >= 62 && CHROME <= 74;
|
||||
|
||||
if (!CHROME && !chrome.browserAction.openPopup) {
|
||||
if (FIREFOX && !chrome.browserAction.openPopup) {
|
||||
// in FF pre-57 legacy addons can override useragent so we assume the worst
|
||||
// until we know for sure in the async getBrowserInfo()
|
||||
// (browserAction.openPopup was added in 57)
|
||||
FIREFOX = browser.runtime.getBrowserInfo ? 51 : 50;
|
||||
// getBrowserInfo was added in FF 51
|
||||
Promise.resolve(FIREFOX >= 51 ? browser.runtime.getBrowserInfo() : {version: 50}).then(info => {
|
||||
FIREFOX = 55; // from strict_min_version
|
||||
browser.runtime.getBrowserInfo().then(info => {
|
||||
FIREFOX = parseFloat(info.version);
|
||||
document.documentElement.classList.add('moz-appearance-bug', FIREFOX && FIREFOX < 54);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
"applications": {
|
||||
"gecko": {
|
||||
"id": "{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}",
|
||||
"strict_min_version": "53.0"
|
||||
"strict_min_version": "55.0"
|
||||
}
|
||||
},
|
||||
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2ypG+Z/beZtoYrxxwXYhMwQiAiwRVnSHqdpOSzJdjsXVWdvJjlgEuZcU8kte75w58P45LsRUrwvU6N9x12S6eW84KNEBC8rlZj0RGNoxuhSAcdxneYzjJ9tBkZKOidVedYHHsi3LeaXiLuTNTBR+2lf3uCNcP0ebaFML9uDLdYTGEW4eL3hnEKYPSmT1/xkh4bSGTToCg4YNuWWWoTA0beEOpBWYkPVMarLDQgPzMN5Byu5w3lOS2zL0PPJcmdyk3ez/ZsB4PZKU+h17fVA6+YTvUfxUqLde5i2RiuZhEb6Coo5/W90ZW1yCDC9osjWrxMGYeUMQWHPIgFtDhk4K6QIDAQAB"
|
||||
|
|
|
@ -256,7 +256,7 @@
|
|||
if (results.length && 'empty' in dom.container.dataset) {
|
||||
delete dom.container.dataset.empty;
|
||||
}
|
||||
if (scrollToFirstResult && (!FIREFOX || FIREFOX >= 55)) {
|
||||
if (scrollToFirstResult) {
|
||||
debounce(doScrollToFirstResult);
|
||||
}
|
||||
// navigation
|
||||
|
|
Loading…
Reference in New Issue
Block a user