INNER CODE UNIT · JavaScript

modifyPlayer

MorpheApp/morphe-patches · patches/src/main/resources/spoof/raw/yt.solver.core.js:225

  function modifyPlayer(program) {
    const body = program.body;
    const block = (() => {
      switch (body.length) {
        case 1: {
          const func = body[0];
          if (
            _optionalChain([func, 'optionalAccess', (_) => _.type]) ===
              'ExpressionStatement' &&
            func.expression.type === 'CallExpression' &&
            func.expression.callee.type === 'MemberExpression' &&
            func.expression.callee.object.type === 'FunctionExpression'
          ) {
            return func.expression.callee.object.body;
          }
          break;
        }
        case 2: {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…