Multiline mode for Firefox debug tools? [duplicate] - firefox

This question already has answers here:
Firefox Developer Tools JS editor (like firebug)?
(2 answers)
Closed 6 years ago.
Note for close vote AIs: I'm not asking for software recommendation on another product. That would be off topic anyway. I'm asking whether something is possible in .
One of the great features of Firebug - which is now discontinued and already started to malfunction - was the side to side script editor with console:
I can't figure out how to enable this in the Firefox Developer tools. I looked in settings but there's nothing about it. Is that even possible in Firefox Developer tools? Or maybe it's simply not possible?
I do know that with Shift+Enter you can enter multiple lines in the console, but when you press enter the line resets.

The Firefox DevTools have something similar called Scratchpad, which is a separate panel allowing you to execute multi-line JavaScript code. Furthermore, the command line allows you to enter line breaks by pressing Shift+Enter and automatically breaks into the next line when the entered expression is not finished, e.g. when you write document. and hit Enter.
As those features are not exactly what Firebug provided and the UI is somewhat requiring getting used to, there is a request to implement a multi-line mode for the console like in Firebug as well as a request to improve the output within Scratchpad.

Related

Win CLI open file with "How to open"?

I need to open the file using Windows 10 cmd. But when the file opens, I need Windows to show me a modal window "How do you want to open this file?". The system should do this even if it already has a program selected by default to open a certain type of file. Is it possible to do this?
To clarify my problem:
I need the console to run for example ".py" not through the standard Python.File="C:\Windows\py.exe " "%L" %*, and for example via VS Code. You might tell me about the VS Code CLI. But how to handle an event where the user will not have VS Code, but for example Pycharm, and the user will want to open it through it? That is why the question was posed in such a way that the user could choose through what to open the file already through the built-in modal window in Windows. In any case, I will be glad of any suggestion to solve my problem.
I tried to find something similar, but apart from the standard start something.som I didn't find it. And this is not a solution to the problem, because start starts the file in the program that is specified by default in the system. This program may not even be the one that the user ever chose later. I came across a similar question in Stackoverflow, where a person wanted to see which program was responsible for opening a file with a certain extension, where assoc and ftype were used, but they did not give the desired result.

Need unix command to disable the popup window

I am very much glad if anyone help me. am fairly new to Unix scripting side. I am trying to get into one url, but before that am getting one popup window(asking for customer details). So, i need to block/disable/ auto close the popup window. Please help me with the command
In Unix environment shell command plays differently. It can launch your browser but it can not set utility inside a browser application. You need to fix it inside your browser window by using tool option. Just search in google like how to block popup in yourbrowserName.

Seeking bash script for multi casting user input on keyboard and mouse to multiple browser tabs

I got curious if it is possible to have multiple tabs open in a browser where all the tabs have identical content and be able to press a key or a mouseclick so that all tabs experience the same input. I believe my formulation of what I want to do may be confusing as searching this with my words has been fruitless. I will therefore illustrate with something specific:
In my case I want to have a few tabs on same window with the Google search present in all tabs. With one of the tabs selected as the current view in the browser.
I would then type in a query and click the first available link. My desired output would have all the tabs experience the query search and link click at the same time.
I would like to achieve this through bash scripting [not sure if this IS possible] and would be very grateful if I am provided with some examples and readings I can look at to get started on my example detailed above. If there are other approaches I would be happy to look at them as well. Preferably it would be something I could code and play around with.
I found a similar question here, but the question was not answered as it appears a little too general.
If it helps determine the answer: I am running Firefox 43 on Ubuntu 15.04.
Apologies in advance if the question appears a little vague. I will be more than happy to provide requested clarifications.
You can send keyboard and mouse inputs to windows via the X server (which is the service which controls all graphical windows).
For example you can send an F5 keypress to a Chrome window using the following
CHROME_WINDOW_ID="$(xdotool search --class Chrome | head -n 1)"
xdotool key --window "$CHROME_WINDOW_ID" F5
You can use mouse_move and click similarly; see xdotool for more details.
I'm not sure you could do this to individual browser tabs (unless you get your script to click on the correct tab beforehand), but definitely for individual browser windows.
You might do something like this:
# Write all Chrome window IDs to array
xdotool search --class Chrome | tr '\n' ' ' | read -a WINDOW_IDS
for WINDOW in ${WINDOW_IDS[#]} ; do
# Do actions on $WINDOW
done
Edit:
If your problem is specifically related to manipulating web pages, you might also want to check out browser automation tools such as Selenium, mechanize, or splinter.

Open a new Firefox tab without focusing the browser window

I know that I can open a tab in Firefox from another program, for example using the following command:
firefox -new-tab https://stackoverflow.com/
When running this command, however, the Firefox window will get the focus (at least on Fedora 21 with Gnome 3). This is really annoying: My use case is that I browse through the headlines in my feed reader, which is a standalone program, and hit "open in browser" (which executes a configurable command, see above) on every article I'd like to read, before reading even one. This is necessary for example when I want to open tabs while I'm online but read them later while commuting or traveling.
Thus, my question boils down to the following:
Is there any way I can open a link in Firefox without needing to hit Alt+Tab every time to switch back from Firefox to the program I opened the tab with?

How do I write directly into the console?

I read an answer to a question on SO and someone suggested writing directly into the console. I thought, that sounds cool let's give it a go. I proceeded to make an attempt, but I couldn't figure it out. How do I write/run code directly in the console? I tried in Firebug & Firefox's inspector and I did a little Google search as well. Did I misunderstand something?
Firebug has two ways to execute some code (and write to the console). These are the Command Line at the bottom of the Console panel:
and the Command Editor if you want to write some larger scripts:
which is available by clicking the little arrow at the right side of the Console panel:
The Firefox DevTools have a similar feature to the Command Editor of Firebug called Scratchpad:
This tool is available via the Firefox menu > Developer > Scratchpad or by pressing Shift+F4.
MDN has some example about Outputting text to the console.
The most simple example is:
console.log("Hello World!"); Which should show up in the Firefox Console. (There might be some issue if you use Firebug at the same time)

Resources