Format Javascript indentation

This commit is contained in:
Helen Chong 2024-05-27 13:35:49 +08:00
parent 689ca9b34c
commit 8cd05e8d8b
3 changed files with 568 additions and 568 deletions

View File

@ -1,16 +1,16 @@
/** /**
* Author: Vera Konigin * Author: Vera Konigin
* Site: https://groundedwren.neocities.org * Site: https://groundedwren.neocities.org
* Contact: vera@groundedwren.com * Contact: vera@groundedwren.com
* *
* File Description: Comments Control * File Description: Comments Control
*/ */
/** /**
* By default, any JavaScript code written is defined in the global namespace, which means it's accessible directly under the "window" element. * By default, any JavaScript code written is defined in the global namespace, which means it's accessible directly under the "window" element.
* If you have a lot of scripts, this can lead to clutter and naming collisions (what if two different scripts use a variable called "i"? They can inadvertently mess each other up). * If you have a lot of scripts, this can lead to clutter and naming collisions (what if two different scripts use a variable called "i"? They can inadvertently mess each other up).
* To get around this, we define the registerNamespace function in the global namespace, which just confines all the code in the function passed to it to a property under window. * To get around this, we define the registerNamespace function in the global namespace, which just confines all the code in the function passed to it to a property under window.
* That property is represented as the "path" parameter. It is passed to the function for ease of access. * That property is represented as the "path" parameter. It is passed to the function for ease of access.
*/ */
function registerNamespace(path, nsFunc) function registerNamespace(path, nsFunc)
{ {

View File

@ -5,14 +5,14 @@
* *
* File Description: Gizmo for reading from Google Sheets. * File Description: Gizmo for reading from Google Sheets.
* Neocities editor users will see a lot of linter errors in this file, but none of them are real errors. The linter just doesn't understand some modern JS. * Neocities editor users will see a lot of linter errors in this file, but none of them are real errors. The linter just doesn't understand some modern JS.
*/ */
/** /**
* By default, any JavaScript code written is defined in the global namespace, which means it's accessible directly under the "window" element. * By default, any JavaScript code written is defined in the global namespace, which means it's accessible directly under the "window" element.
* If you have a lot of scripts, this can lead to clutter and naming collisions (what if two different scripts use a variable called "i"? They can inadvertently mess each other up). * If you have a lot of scripts, this can lead to clutter and naming collisions (what if two different scripts use a variable called "i"? They can inadvertently mess each other up).
* To get around this, we define the registerNamespace function in the global namespace, which just confines all the code in the function passed to it to a property under window. * To get around this, we define the registerNamespace function in the global namespace, which just confines all the code in the function passed to it to a property under window.
* That property is represented as the "path" parameter. It is passed to the function for ease of access. * That property is represented as the "path" parameter. It is passed to the function for ease of access.
*/ */
function registerNamespace(path, nsFunc) function registerNamespace(path, nsFunc)
{ {
var ancestors = path.split("."); var ancestors = path.split(".");

View File

@ -4,14 +4,14 @@
* Contact: vera@groundedwren.com * Contact: vera@groundedwren.com
* *
* File Description: A web component to site SVG icons easily * File Description: A web component to site SVG icons easily
*/ */
/** /**
* By default, any JavaScript code written is defined in the global namespace, which means it's accessible directly under the "window" element. * By default, any JavaScript code written is defined in the global namespace, which means it's accessible directly under the "window" element.
* If you have a lot of scripts, this can lead to clutter and naming collisions (what if two different scripts use a variable called "i"? They can inadvertently mess each other up). * If you have a lot of scripts, this can lead to clutter and naming collisions (what if two different scripts use a variable called "i"? They can inadvertently mess each other up).
* To get around this, we define the registerNamespace function in the global namespace, which just confines all the code in the function passed to it to a property under window. * To get around this, we define the registerNamespace function in the global namespace, which just confines all the code in the function passed to it to a property under window.
* That property is represented as the "path" parameter. It is passed to the function for ease of access. * That property is represented as the "path" parameter. It is passed to the function for ease of access.
*/ */
function registerNamespace(path, nsFunc) function registerNamespace(path, nsFunc)
{ {
var ancestors = path.split("."); var ancestors = path.split(".");