Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-conte.../plugins/wp-file-.../lib/codemirr.../mode/javascri...
File: javascript.js
if (type == end || value == end) return pass()
[500] Fix | Delete
return pass(what)
[501] Fix | Delete
}, proceed);
[502] Fix | Delete
}
[503] Fix | Delete
if (type == end || value == end) return cont();
[504] Fix | Delete
return cont(expect(end));
[505] Fix | Delete
}
[506] Fix | Delete
return function(type, value) {
[507] Fix | Delete
if (type == end || value == end) return cont();
[508] Fix | Delete
return pass(what, proceed);
[509] Fix | Delete
};
[510] Fix | Delete
}
[511] Fix | Delete
function contCommasep(what, end, info) {
[512] Fix | Delete
for (var i = 3; i < arguments.length; i++)
[513] Fix | Delete
cx.cc.push(arguments[i]);
[514] Fix | Delete
return cont(pushlex(end, info), commasep(what, end), poplex);
[515] Fix | Delete
}
[516] Fix | Delete
function block(type) {
[517] Fix | Delete
if (type == "}") return cont();
[518] Fix | Delete
return pass(statement, block);
[519] Fix | Delete
}
[520] Fix | Delete
function maybetype(type) {
[521] Fix | Delete
if (isTS && type == ":") return cont(typeexpr);
[522] Fix | Delete
}
[523] Fix | Delete
function maybedefault(_, value) {
[524] Fix | Delete
if (value == "=") return cont(expressionNoComma);
[525] Fix | Delete
}
[526] Fix | Delete
function typeexpr(type) {
[527] Fix | Delete
if (type == "variable") {cx.marked = "variable-3"; return cont(afterType);}
[528] Fix | Delete
if (type == "{") return cont(commasep(typeprop, "}"))
[529] Fix | Delete
if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType)
[530] Fix | Delete
}
[531] Fix | Delete
function maybeReturnType(type) {
[532] Fix | Delete
if (type == "=>") return cont(typeexpr)
[533] Fix | Delete
}
[534] Fix | Delete
function typeprop(type) {
[535] Fix | Delete
if (type == "variable" || cx.style == "keyword") {
[536] Fix | Delete
cx.marked = "property"
[537] Fix | Delete
return cont(typeprop)
[538] Fix | Delete
} else if (type == ":") {
[539] Fix | Delete
return cont(typeexpr)
[540] Fix | Delete
}
[541] Fix | Delete
}
[542] Fix | Delete
function typearg(type) {
[543] Fix | Delete
if (type == "variable") return cont(typearg)
[544] Fix | Delete
else if (type == ":") return cont(typeexpr)
[545] Fix | Delete
}
[546] Fix | Delete
function afterType(type, value) {
[547] Fix | Delete
if (value == "<") return cont(commasep(typeexpr, ">"), afterType)
[548] Fix | Delete
if (type == "[") return cont(expect("]"), afterType)
[549] Fix | Delete
}
[550] Fix | Delete
function vardef() {
[551] Fix | Delete
return pass(pattern, maybetype, maybeAssign, vardefCont);
[552] Fix | Delete
}
[553] Fix | Delete
function pattern(type, value) {
[554] Fix | Delete
if (type == "modifier") return cont(pattern)
[555] Fix | Delete
if (type == "variable") { register(value); return cont(); }
[556] Fix | Delete
if (type == "spread") return cont(pattern);
[557] Fix | Delete
if (type == "[") return contCommasep(pattern, "]");
[558] Fix | Delete
if (type == "{") return contCommasep(proppattern, "}");
[559] Fix | Delete
}
[560] Fix | Delete
function proppattern(type, value) {
[561] Fix | Delete
if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
[562] Fix | Delete
register(value);
[563] Fix | Delete
return cont(maybeAssign);
[564] Fix | Delete
}
[565] Fix | Delete
if (type == "variable") cx.marked = "property";
[566] Fix | Delete
if (type == "spread") return cont(pattern);
[567] Fix | Delete
if (type == "}") return pass();
[568] Fix | Delete
return cont(expect(":"), pattern, maybeAssign);
[569] Fix | Delete
}
[570] Fix | Delete
function maybeAssign(_type, value) {
[571] Fix | Delete
if (value == "=") return cont(expressionNoComma);
[572] Fix | Delete
}
[573] Fix | Delete
function vardefCont(type) {
[574] Fix | Delete
if (type == ",") return cont(vardef);
[575] Fix | Delete
}
[576] Fix | Delete
function maybeelse(type, value) {
[577] Fix | Delete
if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
[578] Fix | Delete
}
[579] Fix | Delete
function forspec(type) {
[580] Fix | Delete
if (type == "(") return cont(pushlex(")"), forspec1, expect(")"), poplex);
[581] Fix | Delete
}
[582] Fix | Delete
function forspec1(type) {
[583] Fix | Delete
if (type == "var") return cont(vardef, expect(";"), forspec2);
[584] Fix | Delete
if (type == ";") return cont(forspec2);
[585] Fix | Delete
if (type == "variable") return cont(formaybeinof);
[586] Fix | Delete
return pass(expression, expect(";"), forspec2);
[587] Fix | Delete
}
[588] Fix | Delete
function formaybeinof(_type, value) {
[589] Fix | Delete
if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
[590] Fix | Delete
return cont(maybeoperatorComma, forspec2);
[591] Fix | Delete
}
[592] Fix | Delete
function forspec2(type, value) {
[593] Fix | Delete
if (type == ";") return cont(forspec3);
[594] Fix | Delete
if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
[595] Fix | Delete
return pass(expression, expect(";"), forspec3);
[596] Fix | Delete
}
[597] Fix | Delete
function forspec3(type) {
[598] Fix | Delete
if (type != ")") cont(expression);
[599] Fix | Delete
}
[600] Fix | Delete
function functiondef(type, value) {
[601] Fix | Delete
if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
[602] Fix | Delete
if (type == "variable") {register(value); return cont(functiondef);}
[603] Fix | Delete
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, maybetype, statement, popcontext);
[604] Fix | Delete
}
[605] Fix | Delete
function funarg(type) {
[606] Fix | Delete
if (type == "spread") return cont(funarg);
[607] Fix | Delete
return pass(pattern, maybetype, maybedefault);
[608] Fix | Delete
}
[609] Fix | Delete
function className(type, value) {
[610] Fix | Delete
if (type == "variable") {register(value); return cont(classNameAfter);}
[611] Fix | Delete
}
[612] Fix | Delete
function classNameAfter(type, value) {
[613] Fix | Delete
if (value == "extends") return cont(isTS ? typeexpr : expression, classNameAfter);
[614] Fix | Delete
if (type == "{") return cont(pushlex("}"), classBody, poplex);
[615] Fix | Delete
}
[616] Fix | Delete
function classBody(type, value) {
[617] Fix | Delete
if (type == "variable" || cx.style == "keyword") {
[618] Fix | Delete
if (value == "static") {
[619] Fix | Delete
cx.marked = "keyword";
[620] Fix | Delete
return cont(classBody);
[621] Fix | Delete
}
[622] Fix | Delete
cx.marked = "property";
[623] Fix | Delete
if (value == "get" || value == "set") return cont(classGetterSetter, functiondef, classBody);
[624] Fix | Delete
return cont(functiondef, classBody);
[625] Fix | Delete
}
[626] Fix | Delete
if (value == "*") {
[627] Fix | Delete
cx.marked = "keyword";
[628] Fix | Delete
return cont(classBody);
[629] Fix | Delete
}
[630] Fix | Delete
if (type == ";") return cont(classBody);
[631] Fix | Delete
if (type == "}") return cont();
[632] Fix | Delete
}
[633] Fix | Delete
function classGetterSetter(type) {
[634] Fix | Delete
if (type != "variable") return pass();
[635] Fix | Delete
cx.marked = "property";
[636] Fix | Delete
return cont();
[637] Fix | Delete
}
[638] Fix | Delete
function afterExport(_type, value) {
[639] Fix | Delete
if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); }
[640] Fix | Delete
if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); }
[641] Fix | Delete
return pass(statement);
[642] Fix | Delete
}
[643] Fix | Delete
function afterImport(type) {
[644] Fix | Delete
if (type == "string") return cont();
[645] Fix | Delete
return pass(importSpec, maybeFrom);
[646] Fix | Delete
}
[647] Fix | Delete
function importSpec(type, value) {
[648] Fix | Delete
if (type == "{") return contCommasep(importSpec, "}");
[649] Fix | Delete
if (type == "variable") register(value);
[650] Fix | Delete
if (value == "*") cx.marked = "keyword";
[651] Fix | Delete
return cont(maybeAs);
[652] Fix | Delete
}
[653] Fix | Delete
function maybeAs(_type, value) {
[654] Fix | Delete
if (value == "as") { cx.marked = "keyword"; return cont(importSpec); }
[655] Fix | Delete
}
[656] Fix | Delete
function maybeFrom(_type, value) {
[657] Fix | Delete
if (value == "from") { cx.marked = "keyword"; return cont(expression); }
[658] Fix | Delete
}
[659] Fix | Delete
function arrayLiteral(type) {
[660] Fix | Delete
if (type == "]") return cont();
[661] Fix | Delete
return pass(commasep(expressionNoComma, "]"));
[662] Fix | Delete
}
[663] Fix | Delete
[664] Fix | Delete
function isContinuedStatement(state, textAfter) {
[665] Fix | Delete
return state.lastType == "operator" || state.lastType == "," ||
[666] Fix | Delete
isOperatorChar.test(textAfter.charAt(0)) ||
[667] Fix | Delete
/[,.]/.test(textAfter.charAt(0));
[668] Fix | Delete
}
[669] Fix | Delete
[670] Fix | Delete
// Interface
[671] Fix | Delete
[672] Fix | Delete
return {
[673] Fix | Delete
startState: function(basecolumn) {
[674] Fix | Delete
var state = {
[675] Fix | Delete
tokenize: tokenBase,
[676] Fix | Delete
lastType: "sof",
[677] Fix | Delete
cc: [],
[678] Fix | Delete
lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
[679] Fix | Delete
localVars: parserConfig.localVars,
[680] Fix | Delete
context: parserConfig.localVars && {vars: parserConfig.localVars},
[681] Fix | Delete
indented: basecolumn || 0
[682] Fix | Delete
};
[683] Fix | Delete
if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
[684] Fix | Delete
state.globalVars = parserConfig.globalVars;
[685] Fix | Delete
return state;
[686] Fix | Delete
},
[687] Fix | Delete
[688] Fix | Delete
token: function(stream, state) {
[689] Fix | Delete
if (stream.sol()) {
[690] Fix | Delete
if (!state.lexical.hasOwnProperty("align"))
[691] Fix | Delete
state.lexical.align = false;
[692] Fix | Delete
state.indented = stream.indentation();
[693] Fix | Delete
findFatArrow(stream, state);
[694] Fix | Delete
}
[695] Fix | Delete
if (state.tokenize != tokenComment && stream.eatSpace()) return null;
[696] Fix | Delete
var style = state.tokenize(stream, state);
[697] Fix | Delete
if (type == "comment") return style;
[698] Fix | Delete
state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
[699] Fix | Delete
return parseJS(state, style, type, content, stream);
[700] Fix | Delete
},
[701] Fix | Delete
[702] Fix | Delete
indent: function(state, textAfter) {
[703] Fix | Delete
if (state.tokenize == tokenComment) return CodeMirror.Pass;
[704] Fix | Delete
if (state.tokenize != tokenBase) return 0;
[705] Fix | Delete
var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;
[706] Fix | Delete
// Kludge to prevent 'maybelse' from blocking lexical scope pops
[707] Fix | Delete
if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
[708] Fix | Delete
var c = state.cc[i];
[709] Fix | Delete
if (c == poplex) lexical = lexical.prev;
[710] Fix | Delete
else if (c != maybeelse) break;
[711] Fix | Delete
}
[712] Fix | Delete
if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev;
[713] Fix | Delete
if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
[714] Fix | Delete
lexical = lexical.prev;
[715] Fix | Delete
var type = lexical.type, closing = firstChar == type;
[716] Fix | Delete
[717] Fix | Delete
if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info + 1 : 0);
[718] Fix | Delete
else if (type == "form" && firstChar == "{") return lexical.indented;
[719] Fix | Delete
else if (type == "form") return lexical.indented + indentUnit;
[720] Fix | Delete
else if (type == "stat")
[721] Fix | Delete
return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);
[722] Fix | Delete
else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
[723] Fix | Delete
return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
[724] Fix | Delete
else if (lexical.align) return lexical.column + (closing ? 0 : 1);
[725] Fix | Delete
else return lexical.indented + (closing ? 0 : indentUnit);
[726] Fix | Delete
},
[727] Fix | Delete
[728] Fix | Delete
electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
[729] Fix | Delete
blockCommentStart: jsonMode ? null : "/*",
[730] Fix | Delete
blockCommentEnd: jsonMode ? null : "*/",
[731] Fix | Delete
lineComment: jsonMode ? null : "//",
[732] Fix | Delete
fold: "brace",
[733] Fix | Delete
closeBrackets: "()[]{}''\"\"``",
[734] Fix | Delete
[735] Fix | Delete
helperType: jsonMode ? "json" : "javascript",
[736] Fix | Delete
jsonldMode: jsonldMode,
[737] Fix | Delete
jsonMode: jsonMode,
[738] Fix | Delete
[739] Fix | Delete
expressionAllowed: expressionAllowed,
[740] Fix | Delete
skipExpression: function(state) {
[741] Fix | Delete
var top = state.cc[state.cc.length - 1]
[742] Fix | Delete
if (top == expression || top == expressionNoComma) state.cc.pop()
[743] Fix | Delete
}
[744] Fix | Delete
};
[745] Fix | Delete
});
[746] Fix | Delete
[747] Fix | Delete
CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/);
[748] Fix | Delete
[749] Fix | Delete
CodeMirror.defineMIME("text/javascript", "javascript");
[750] Fix | Delete
CodeMirror.defineMIME("text/ecmascript", "javascript");
[751] Fix | Delete
CodeMirror.defineMIME("application/javascript", "javascript");
[752] Fix | Delete
CodeMirror.defineMIME("application/x-javascript", "javascript");
[753] Fix | Delete
CodeMirror.defineMIME("application/ecmascript", "javascript");
[754] Fix | Delete
CodeMirror.defineMIME("application/json", {name: "javascript", json: true});
[755] Fix | Delete
CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true});
[756] Fix | Delete
CodeMirror.defineMIME("application/ld+json", {name: "javascript", jsonld: true});
[757] Fix | Delete
CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });
[758] Fix | Delete
CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });
[759] Fix | Delete
[760] Fix | Delete
});
[761] Fix | Delete
[762] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function