Questions tagged [javascript]

JavaScript is the common name for the language initially used for scripting in web browsers. It is NOT the same as Java. Use this tag for questions regarding ECMAScript and its dialects/implementations (excluding ActionScript and JScript).

Filter by
Sorted by
Tagged with
0
votes
0answers
20 views

Can a javascript file be invoked on the command line?

I am trying to use a few javascript projects locally on a computer. (HanziJS - https://github.com/nieldlr/hanzi , HanziLookupJS - https://github.com/gugray/HanziLookupJS , Hanzi-writer - https://...
4
votes
2answers
1k views

What is the term to describe the naming method “MyVariable” (as opposed to “myVariable”)?

Variables and procedures in JavaScript are often named via the "camelCase" naming method, as: myVariable Any letter of the only or not-only-but first letter in an expression which acts as ...
0
votes
0answers
16 views

Increase Chrome/Firefox's max parallel worker limit?

Our company have a webpage dedicated to processing costs information for our customers locally on their machines via Javascript code. In the past, this processing was sequential, which could easily ...
0
votes
1answer
23 views

how to download partial content from remote video url in nodejs?

I have the following code to download a specific part (range) of a video using nodejs http.get(), const fileUrl = 'https://www.example.com/path/to/video.mp4' const fs = require('fs') const http = ...
0
votes
1answer
19 views

How do I locate precisely WHERE 5 syntax errors are in “recovery.js” (Firefox), and identify WHAT they are?

I accidentally deleted two Firefox files (recovery.js and recovery.bak) that contained the details of a huge number of tabs that I have open when I use Firefox. The tabs (website information) are ...
0
votes
0answers
11 views

Javascript — Prey project — Os: does not exist

I'd been using Prey Project on and off for years, and I just realized it wasn't working. So I'm trying to re-initialize my setup ... Since I'm running Slackware and not Ubuntu, it refuses to run: ...
0
votes
0answers
18 views

Showing random verses with PHP , what is the right approach please?

needing some advice please , want to display random verses from the bible book there are 66 books, 1,189 chapters, and 31,102 verses in total, we would like to use the numbers based on the numbers 3, ...
0
votes
0answers
26 views

Dynamically creating multidimensional inline keyboard telegram bot api?

My Code: var keyBoardData = []; var menu = ['Nightclub', 'Parks']; for (var i = 0; i < menu.length; i++) { keyBoardData.push([{'text': menu[i], 'callback_data': '{"a":(menu[i]),"b&...
0
votes
1answer
35 views

Java 8 for Minecraft Forge Error (Debian 10)

I tried to install Java 8 in addition to Java 11 on my VPS. Apparently that was only moderately successful. It is displayed under "java -version". And also with "sudo update-...
0
votes
0answers
69 views

Hyper Terminal, “A JavaScript rrror occurred in the main process”

I'm using macOS Catalina and when I tried to install Hyper Terminal.  It's showing "A JavaScript error occurred in the main process". I tried finding application support in the library and ...
0
votes
1answer
40 views

Get % of how much of a javascript file is commented out

I'm wanting to check if files are more than 50% commented out with javascript style commenting of //. My idea is to count the number of lines in the file and then count the number of // and do some ...
0
votes
1answer
43 views

recursively find out webpage video file url with wget or something like this

i'm trying to script a bash script which automatically can download video or audio files, maybe even "playlists" from youtube and other platforms like this. Especially the youtube video file ...
0
votes
2answers
36 views

Get exact installed version from npm package

How do I find the exact installed version of a package from package.json in an express application in a Fedora distribution? I could look through package-lock.json but are there an easier way, as it'...
0
votes
1answer
402 views

When writing to a terminal, get the current column number you are writing to

In Node.js I can get the number of a columns of a terminal window using: const cols = process.stdout.columns; if the user shrinks the terminal during the process, the number of columns should shrink ...
0
votes
3answers
745 views

Are there any terminal emulators that can render html?

I think it would be awesome if we could render and also interact with html and javascript in a terminal. The idea is to render buttons and other interactive widgets like file trees in the command line,...
0
votes
1answer
97 views

Find and replace the columns of matched and non-matched lines with a character

I have a csv file with a bunch of numbers ranging from 500 to 500,000 and would like to replace the matches with 1 and mismatches by shifting the mismatched content to right simultaneously shifting ...
0
votes
1answer
37 views

CenOS 7 - Javascript Files don't update [closed]

I have a small issue on my server. Javascript *.js files in a certain folder don't update. I mean, files update but in the browser, I see the old version. I have installed a new browser on my ...
0
votes
1answer
143 views

What JavaScript interpreter does Polkit use to interpret rules.d files?

What JavaScript interpreter does Polkit use to interpret rules.d files? The source code at time of writing links to a defuct Wikipedia heading "ECMAScript.2C_5th_Edition", however that would only be ...
0
votes
1answer
783 views

CSV to NESTED JSON

I need to convert a CSV file to a JSON output, I'm using the csvtojason library from https://www.npmjs.com/package/csvtojson, csv File: mode,device,stb,data,data1,data2,data3,data4 modelo1,device1,...
7
votes
3answers
545 views

Debian Buster: install yarnpkg as yarn

I have installed yarn - Node.js package manager (alternative to npm): $ sudo apt install yarnpkg ... $ dpkg -l | grep yarn ii yarnpkg 1.13.0-1 all ...
0
votes
1answer
142 views

polkit rule: determine if user is an admin?

polkit is configured using rules files, written in javascript. You write custom functions, and pass them as the argument to polkit.addRule(). When a polkit action is performed, the functions are ...
2
votes
2answers
2k views

JQ (GET ID based on NAME)

I get a long list of such arrays { "id": "byu6g6c4cjys5mdkg5znh8ju8c", "create_at": 1511875272294, "update_at": 1511875272294, "delete_at": 0, "display_name": "BMA", "name": "...
0
votes
1answer
385 views

Why would javascript document.lastModified stop working, and return current date?

I have web pages on Ubuntu that return the lastModified date as part of the displayed text using javascript to create the following: Last modified: 08/28/2017 That's the actual last-modified date of ...
1
vote
1answer
62 views

How this process running in the background?

user 1550 1 0 Jun19 ? 00:00:00 node /usr/bin/nodemon src/server.js user 11051 1550 0 Jun19 ? 00:00:38 /usr/bin/node src/server.js Can someone tell how this process running ...
0
votes
0answers
154 views

How to install HTML5/JavaScript to Netbeans?

I installed the NetBeans Connector plugin to Chromium on my MacBook. That worked perfectly. I could create new projects in HTML5/Javascript. I tried to do the same on my Linux Mint 18.3 computer. But ...
0
votes
0answers
122 views

Profile a Gnome Shell extension

An extension I'm working on is having severe performance issues, causing the screen or gnome to freeze and other issues. I'd like to fix it, but I have no idea how or where to start. Is there a way ...
-1
votes
1answer
959 views

Run javascript on headless browser with specific website as origin

I'm using ubuntu server (only terminal) and I have a javascript that must be run from a specific website (to avoid cross-domain issues). Basicly I would follow this steps if I were in a convencional ...
-1
votes
1answer
115 views

Correct way to call a Bash function from all sessions

I use Ubuntu with Bash and I have a file hosting a script with 5 functions. Sometimes I want to call some function of these functions (but not all of them), directly from the CLI. I could say it's ...
-1
votes
1answer
134 views

error when compiling java file script

So I am trying to compile a .java file in my vim script but it keeps giving the error "could not find or load main class name.java" while I have put a main class in my .java file`, can someane help me ...
1
vote
0answers
135 views

Error: Command 'download_from_google_storage --no_resume --platform=linux* --no_auth --bucket chromium-clang-format

When I try fetch v8 or gclient sync I get this error: Error: Command 'download_from_google_storage --no_resume --platform=linux* --no_auth --bucket chromium-clang-format -s v8/buildtools/linux64/...
1
vote
0answers
646 views

Is it possible to make Firefox open a URL in a popup window?

I would like Firefox (the new super fast Quantum with low memory usage) to open some URLs in a special/popup window, i.e. almost without anything (toolbar, menu bar, tab bar, address bar, etc.) other ...
1
vote
1answer
110 views

How to retrieve price information from www.meinfluessiggas.de in a bash script?

On https://www.meinfluessiggas.de one has to click a tank size button (section “Behältergröße”) and fill in a postal code (section “PLZ Behälterstandort”) for the price to appear on the right. I want ...
1
vote
1answer
435 views

Installing JavaScript Plasmoids in KDE 5

For the last year, I have been a happy user of KDE Plasma 5. KDE widgets, however, make me miss more directly programmable systems such as conky. Setting up an ad-hoc monitor for anything that needs ...
3
votes
1answer
2k views

Javascript BTOA vs base64 in bash?

I need to convert a username and password combination into base64 before sending to an API. The javascript BTOA function is working for me, but when I try to use base64 command in bash I get slightly ...
0
votes
1answer
1k views

Javascript in Chromium very slow

In am running Chromium 57.0.2987.133 in FreeBSD 12-CURRENT with the Lumina desktop interface, in a Lenovo Ideapad with a Celeron N3050. I also set in /etc/sysctl.conf as recommended: kern.ipc....
1
vote
1answer
392 views

Unable to run a .py file in cgi-bin by using ajax call from my .php file

Hi guys:) I am using a Beagle Bone Black with Debian Wheezy to make a project. I have a small problem:I have my index.php in /var/www from there I call a python file called send_email.php using ajax: ...
1
vote
1answer
267 views

How to downloaded HTML file with obfuscated text

I use Firefox and I don't have any issues viewing and reading English text on the loaded websites. If I click Save in Firefox and save the web page in question as a text file I can read everything in ...
1
vote
1answer
676 views

How to get javascript key path in long json files in Linux

I'm using several keys from a long javascript object, represented as json. Example: ... "stock": { "type": 'str', "properties": { "warehouse": { "type": 123 }, "retail": { ...
2
votes
0answers
1k views

Emscripten fundamentally incompatable with clang on linux

A long time ago I wrote a really crude and primitive shell in C++, and I only just recently discovered asm.js, so I thought it'd be neat to try to compile and run it in a browser, but I can't because ...
3
votes
0answers
560 views

Accessing Dropbox login page through lynx / elinks via ssh on aws

I'm trying to install Dropbox in an entirely text-based Linux environment, following the instructions available on Dropbox wiki, which states: Use a command-line browser (lynx) Navigate to the ...
4
votes
1answer
1k views

How to disable JavaScript key events (and theft) in Firefox by websites?

I use Mozilla Firefox to browse the web. When I look at a site and wish to search text on the page, I use the slash / character to initiate incremental search (which is the default Firefox behaviour)....
1
vote
1answer
2k views

Data from python script to website

This involves a raspberry pi and apache2 so I thought the question would be good to go here.. have never used web sockets and things like that before so I'm pretty lost and hoping for some guidance......
2
votes
0answers
93 views

Using a web browser to generate a gallery/slideshow from local files

I'm trying to see how far I can go with using a web browser for various tasks vs. native apps. One of these tasks is selecting a group of local image files and generate a preview/gallery/slideshow in ...
4
votes
1answer
212 views

Search file name within file

Someone put a lot of malicious code onto every single wordpress instance on my server. For the second time. (At least) Every js file has been modified. There is a pattern though, the code always looks ...
1
vote
0answers
109 views

How do you pass variables to jsc/javascript?

I have a few javascript things that I am running from the Terminal by passing them to jsc, with <<<. (javascript is an alias to /System/Library/Frameworks/JavaScriptCore.framework/Versions/...
12
votes
2answers
23k views

How to minify Javascript and CSS with command-line using minify tool?

I'm not that versed in unix and I cannot have Java, so YUI Compressor does not apply, but I have this known Minify tool, which will get a minified version of a JS/CSS file from a specific URI /min/?f=/...
1
vote
1answer
261 views

Curl or Lynx: stripping Javascript possible?

I am doing corpus generation through curl or lynx of some web pages. I have written a program in bash to strip away the html code (e.g., when I do lynx -source myurl), but the problem is that some ...
0
votes
1answer
997 views

Is it possible to run programs nodejs in bash?

My question is simple : I have a program written in nodejs and want to run it in an infinite loop in the language bash, is this possible?
4
votes
1answer
17k views

How to get the contents of a webpage but after running javascript?

I am trying to download the contents of a web page using curl but it seems l am missing some content that l suspect to be generated by JavaScript. If the page runs on the browser l am able to get all ...
0
votes
1answer
322 views

Files getting reverted to older version

One of my site was infested with malware once and since then I am seeing every alternate day the header.php files are getting reverted back to older versions (possibly by a script) and a malicious ...