MCPcopy Create free account
hub / github.com/ether/etherpad / getHashedLineNumber

Function getHashedLineNumber

src/static/js/pad_editor.ts:319–324  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

317exports.padeditor = padeditor;
318
319const getHashedLineNumber = () => {
320 const lineNumber = window.location.hash.substr(1);
321 if (!lineNumber || lineNumber[0] !== 'L') return null;
322 const lineNumberInt = parseInt(lineNumber.substr(1));
323 return Number.isInteger(lineNumberInt) && lineNumberInt > 0 ? lineNumberInt : null;
324};
325
326const focusOnHashedLine = (ace, lineNumberInt) => {
327 const $aceOuter = $('iframe[name="ace_outer"]');

Callers 1

pad_editor.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected