Use a single declaration per line
This commit is contained in:
parent
61327bfaf1
commit
1a630033bd
|
@ -189,7 +189,8 @@ function filterStylesInternal({
|
|||
|
||||
const needSections = asHash || matchUrl !== null;
|
||||
|
||||
for (let i = 0, style; (style = styles[i]); i++) {
|
||||
let style;
|
||||
for (let i = 0; (style = styles[i]); i++) {
|
||||
if ((enabled === null || style.enabled == enabled)
|
||||
&& (url === null || style.url == url)
|
||||
&& (id === null || style.id == id)) {
|
||||
|
@ -230,7 +231,8 @@ function saveStyle(style) {
|
|||
if (!style.name) {
|
||||
delete style.name;
|
||||
}
|
||||
let existed, codeIsUpdated;
|
||||
let existed;
|
||||
let codeIsUpdated;
|
||||
if (reason == 'update' || reason == 'update-digest') {
|
||||
return calcStyleDigest(style).then(digest => {
|
||||
style.originalDigest = digest;
|
||||
|
|
11
edit/edit.js
11
edit/edit.js
|
@ -602,8 +602,8 @@ function addSection(event, section) {
|
|||
}
|
||||
|
||||
function removeAppliesTo(event) {
|
||||
const appliesTo = event.target.parentNode,
|
||||
appliesToList = appliesTo.parentNode;
|
||||
const appliesTo = event.target.parentNode;
|
||||
const appliesToList = appliesTo.parentNode;
|
||||
removeAreaAndSetDirty(appliesTo);
|
||||
if (!appliesToList.hasChildNodes()) {
|
||||
addAppliesTo(appliesToList);
|
||||
|
@ -744,7 +744,8 @@ function setupGlobalSearch() {
|
|||
&& searchAppliesTo(activeCM)) {
|
||||
return;
|
||||
}
|
||||
for (let i = 0, cm = activeCM; i < editors.length; i++) {
|
||||
let cm = activeCM;
|
||||
for (let i = 0; i < editors.length; i++) {
|
||||
state = updateState(cm);
|
||||
if (!cm.hasFocus()) {
|
||||
pos = reverse ? CodeMirror.Pos(cm.lastLine()) : CodeMirror.Pos(0, 0);
|
||||
|
@ -799,7 +800,9 @@ function setupGlobalSearch() {
|
|||
}
|
||||
|
||||
function replace(activeCM, all) {
|
||||
let queue, query, replacement;
|
||||
let queue;
|
||||
let query;
|
||||
let replacement;
|
||||
activeCM = focusClosestCM(activeCM);
|
||||
customizeOpenDialog(activeCM, template[all ? 'replaceAll' : 'replace'], function(txt) {
|
||||
query = txt;
|
||||
|
|
|
@ -364,7 +364,8 @@
|
|||
}
|
||||
}
|
||||
outputPosCol = 0;
|
||||
let i = output.length, token;
|
||||
let i = output.length;
|
||||
let token;
|
||||
while (--i >= 0 && (token = output[i]) != '\n') {
|
||||
outputPosCol += token.length;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user