Fix linting issues
This commit is contained in:
parent
b57d30a70b
commit
3edea88b13
|
@ -341,7 +341,7 @@
|
|||
|
||||
// run in page context
|
||||
document.documentElement.appendChild(document.createElement('script')).text = '(' + (
|
||||
EXTENSION_ORIGIN => {
|
||||
() => {
|
||||
document.currentScript.remove();
|
||||
|
||||
// spoof Stylish extension presence in Chrome
|
||||
|
|
|
@ -12,7 +12,7 @@ function createMetaCompiler(cm) {
|
|||
if (_cm !== cm) {
|
||||
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) {
|
||||
return [];
|
||||
}
|
||||
|
|
|
@ -245,10 +245,9 @@ function createSourceEditor({style, onTitleChanged}) {
|
|||
.then(saved => saved !== code && messageBox.alert(t('syncStorageErrorSaving'))));
|
||||
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');
|
||||
});
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ const usercss = (() => {
|
|||
// updateURL: 'updateUrl',
|
||||
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']);
|
||||
return {buildMeta, buildCode, assignVars};
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ function initPopup() {
|
|||
info.appendChild(noteNode);
|
||||
}
|
||||
// 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')));
|
||||
}
|
||||
document.body.classList.add('unreachable');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* global tabURL handleEvent $ $$ prefs template FIREFOX chromeLocal debounce
|
||||
$create t API tWordBreak formatDate tryCatch tryJSONparse LZString
|
||||
ignoreChromeError */
|
||||
ignoreChromeError download */
|
||||
'use strict';
|
||||
|
||||
window.addEventListener('showStyles:done', function _() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user