• 0
Votes
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 195

Backtrace:

File: /home/u125378470/domains/lawhelpguru.org/public_html/application/views/question.php
Line: 195
Function: _error_handler

File: /home/u125378470/domains/lawhelpguru.org/public_html/application/controllers/Questions.php
Line: 416
Function: view

File: /home/u125378470/domains/lawhelpguru.org/public_html/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Inspecting a chrome plugin source after beautifying

<button aria-describedby="--stacks-s-tooltip-c0lzo0la" aria-label="Bookmark" aria-pressed="false" class="js-bookmark-btn s-btn s-btn__unset c-pointer py4 js-gps-track" data-controller="s-tooltip" data-gps-track="post.click({ item: 1, priv: 0, post_type: 1 })" data-s-tooltip-placement="right" data-selected-classes="fc-yellow-600"></button><svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18" viewbox="0 0 19 18" width="19"></svg>

 

I'm inspecting the source of a chrome plugin after running the compacted source through js-beautify. Each js file has some boilerplate followed by a list of enumerated functions. I'm trying to work out what tool would make code like this and why so I can try and work out the logic, and thus modify the plugin (I'm a suffering c++ person with minimal experience with js tools). Firstly, what is this boilerplate and where did it come from?

(function() {
    function b(d, e, g) {
        function a(j, i) {
            if (!e[j]) {
                if (!d[j]) {
                    var f = "function" == typeof require && require;
                    if (!i && f) return f(j, !0);
                    if (h) return h(j, !0);
                    var c = new Error("Cannot find module '" + j + "'");
                    throw c.code = "MODULE_NOT_FOUND", c
                }
                var k = e[j] = {
                    exports: {}
                };
                d[j][0].call(k.exports, function(b) {
                    var c = d[j][1][b];
                    return a(c || b)
                }, k, k.exports, b, d, e, g)
            }
            return e[j].exports
        }
        for (var h = "function" == typeof require && require, c = 0; c < g class="hljs-keyword">return a
    }
    return b
})()({

Secondly, each js file has a set of enumerated functions that follow the boilerplate. What is this format and why are the functions in such a structure?

})()({
1: [function(a) {
    const b = a("./modules/config"),
        c = a("./modules/utils"),
        d = {};
    window.audioStates = d;

    ...

}, {
        "./modules/config": 2,
        "./modules/utils": 3
    }],

Then

2: [function(a, b) {
        b.exports = {