Fix linting issues
This commit is contained in:
parent
b57d30a70b
commit
3edea88b13
|
@ -341,7 +341,7 @@
|
||||||
|
|
||||||
// run in page context
|
// run in page context
|
||||||
document.documentElement.appendChild(document.createElement('script')).text = '(' + (
|
document.documentElement.appendChild(document.createElement('script')).text = '(' + (
|
||||||
EXTENSION_ORIGIN => {
|
() => {
|
||||||
document.currentScript.remove();
|
document.currentScript.remove();
|
||||||
|
|
||||||
// spoof Stylish extension presence in Chrome
|
// spoof Stylish extension presence in Chrome
|
||||||
|
|
|
@ -12,7 +12,7 @@ function createMetaCompiler(cm) {
|
||||||
if (_cm !== cm) {
|
if (_cm !== cm) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const match = text.match(/\/\*\!?\s*==userstyle==[\s\S]*?==\/userstyle==\s*\*\//i);
|
const match = text.match(/\/\*!?\s*==userstyle==[\s\S]*?==\/userstyle==\s*\*\//i);
|
||||||
if (!match) {
|
if (!match) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,10 +245,9 @@ function createSourceEditor({style, onTitleChanged}) {
|
||||||
.then(saved => saved !== code && messageBox.alert(t('syncStorageErrorSaving'))));
|
.then(saved => saved !== code && messageBox.alert(t('syncStorageErrorSaving'))));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
contents[0] += ` (line ${pos.line + 1} col ${pos.ch + 1})`;
|
||||||
|
contents.push($create('pre', meta));
|
||||||
}
|
}
|
||||||
|
|
||||||
contents[0] += ` (line ${pos.line + 1} col ${pos.ch + 1})`;
|
|
||||||
contents.push($create('pre', meta));
|
|
||||||
messageBox.alert(contents, 'pre');
|
messageBox.alert(contents, 'pre');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ const usercss = (() => {
|
||||||
// updateURL: 'updateUrl',
|
// updateURL: 'updateUrl',
|
||||||
name: undefined,
|
name: undefined,
|
||||||
};
|
};
|
||||||
const RX_META = /\/\*\!?\s*==userstyle==[\s\S]*?==\/userstyle==\s*\*\//i;
|
const RX_META = /\/\*!?\s*==userstyle==[\s\S]*?==\/userstyle==\s*\*\//i;
|
||||||
const ERR_ARGS_IS_LIST = new Set(['missingMandatory', 'missingChar']);
|
const ERR_ARGS_IS_LIST = new Set(['missingMandatory', 'missingChar']);
|
||||||
return {buildMeta, buildCode, assignVars};
|
return {buildMeta, buildCode, assignVars};
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ function initPopup() {
|
||||||
info.appendChild(noteNode);
|
info.appendChild(noteNode);
|
||||||
}
|
}
|
||||||
// Inaccessible locally hosted file type, e.g. JSON, PDF, etc.
|
// Inaccessible locally hosted file type, e.g. JSON, PDF, etc.
|
||||||
if (tabURL.length - tabURL.lastIndexOf(".") <= 5) {
|
if (tabURL.length - tabURL.lastIndexOf('.') <= 5) {
|
||||||
info.appendChild($create('p', t('InaccessibleFileHint')));
|
info.appendChild($create('p', t('InaccessibleFileHint')));
|
||||||
}
|
}
|
||||||
document.body.classList.add('unreachable');
|
document.body.classList.add('unreachable');
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* global tabURL handleEvent $ $$ prefs template FIREFOX chromeLocal debounce
|
/* global tabURL handleEvent $ $$ prefs template FIREFOX chromeLocal debounce
|
||||||
$create t API tWordBreak formatDate tryCatch tryJSONparse LZString
|
$create t API tWordBreak formatDate tryCatch tryJSONparse LZString
|
||||||
ignoreChromeError */
|
ignoreChromeError download */
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
window.addEventListener('showStyles:done', function _() {
|
window.addEventListener('showStyles:done', function _() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user