Google Chrome console - google-chrome

I wanna use these very simple features in Google Chrome Javascript console but I really cannot find out how (already searched in official documentation,multiple videos and posts...)
Writing more than a javascript line! (currently after hitting enter, the previous code executes). Moreover, is there a way to make the 'writing' area of the console larger? (multiple lines)
Typical undo and redo edit. Currently control+Z does nothing.
really weird,
Thanks in advance,
Pere

The Javascript console really isn't intended to do serious development in, but it's pretty good.
Shift+enter will let you write multiple lines instead of instantly executing the code.

Related

Html input of type "file" freeze the browser sometimes

i'm struggling with the classic HTML input of type file. I was using it on my angular application and i had freeze sometimes, the whole browser became unresponsive, and the only thing that works is the scroll.
You can't click any buttons, select any text or even change tab on the browser for about 5 seconds. I tried a lot of different file type and sizes and it doesn't change any of this, it even freeze sometimes when i don't select any file in the explorer and i click the close button directly.
So I thought it was my implementation that was bad and i went to the Mozilla developper website where you have an example and I have exactly the same behaviour. I also tried to take only the HTML from the Mozilla website and put it alone on a .html file and again, same behaviour.
This does not occur 100% of the time, but I would argue that on my end it does it about 60/70 % of the times.
I tried it on chrome and Firefox (both up to date), on multiple computer (all running Windows though) and i have the same behaviour on all of them.
I don't have any error or anyting in the consoles.
I don't know what to do with this, i'm pretty sure it can't be the file's input on the whole web that are bugged, but i tried a lot of various things with always the same results. Should i report it somewhere? ( if so, where? ) Or what would you suggest to do to investigate this further?
I couldn't find anyone discussing this issue on the internet apart for this thread that had no solution, they also say in this thread that the bug is not reproducible in Edge, but i just tried and it does the same thing.
Thanks for reading me and for any help about this.
Chrome freezes for few seconds when after any use of file field.
It was because I had a shortcut in "Quick Access" menu in windows explorer. This shortcut has been linked with a folder shared by network. I've removed this shortcut and everything is good now.
Same here, I have a mapped network drive that is not responding, this make a 5 seconds delay. After unmapping the drive, no more delay. The delay is the same in firefox or chrome.
Same here, if you want to remove it, on Windows 10, click on the icon Quick access (blue star), then right click on the dead link appearing in the "Frequent folders" panel on the right panel and choose "Unpin/Remove from Quick access". There should be no error message.

Is Console in Inspect Dangerous?

Can I get hacked after writing something in the "console" part after clicking "inspect"? A YouTube video showed a person writing Runner.instance.gameOver = function(){}; in the dinosaur game's console part after clicking on "inspect". I did that (because this "hack" does not harm others) and the game did become easy. However, the day after that, I heard that console can be dangerous, can you please help me? I am VERY concerned.
tl;dr: Yes.
Pasting and running anything you don't understand from an untrusted source (i.e. basically everyone on the internet) is as bad in the console as it is anywhere else. In practice, someone malicious could trick you into Self-XSS, effectively hijacking your account on the current browser tab.
This is why e.g. Facebook injects a warning message whenever you open the console on their page:
That being said: If you know what you are doing, using the console is perfectly fine.
Runner.instance.gameOver = function(){};
The code is just replacing the method gameOver by a function what does nothing.
What this means? The original function what is designed to stop you playing when you lose, is no there anymore so you can't lose at all.

Using DOMFormHasPassword and DOMInputPasswordAdded events in chrome extensions

tl;dr:
I'm trying to figure out how to use the DOMFormHasPassword and DOMInputPasswordAdded events in chrome extensions.
I'm trying to develop a password manager extension in chrome for my
school project. To make it, I would need a way to identify a login form and fill it automatically. So far I had relative success, but I encountered a problem: I would scan the page for a login form on page load, so if any form were to be added through javascript my extension would miss it.
I have googled the matter and found the terms DOMFormHasPassword and DOMInputPasswordAdded in some locations online, such as this one that states that the DOMFormHasPassword event was added to chrome, and some sort of an example of its use that I couldn't understand.
I've tried adding the events with document.addEventListener, without any success.
I also encountered the term SpecialPowers that I don't understand, and I think understanding it might solve my problem.
I Would be very grateful if you could even direct me to a documentation of those events, because I can't seem to to find it. Thank you for your time!

How can I make the advanced button work in chrome 'App isnt verified'?

I'm sorry this question might not be completely on topic, but i couldn't find answers googling it.
I'm creating an google app script (with clasp).
When i run the script i get the following popup as usual:
I'm supposed to click on advance and go anways.
But the advanced button no longer works! it doesn't show me the followup button to continue anymore!
Does anyone have the same issue and was able to fix it? It seems to have originated after the chrome update (with rounded ui).
I tried deleting the original grant (i added a feature that needed bigger scope), but even that didn't work.
It might be one of my chrome extensions.
Doing the same thing in incognito mode, worked!

Chrome: waiting for www.site.com, how to know which resource is delaying the page load?

When a site gets stuck in chrome with the 'loading www.site.com' status, Is there anyway to know which of the elements on the DOM is delaying the load? for example, it can be an external js file or image that is taking long time to load. I tried using the network tab in the DeveloperTools, but it only shows the elements already loaded and the time they took. I couldn't find a way to see which element is stuck.
I found a way that I'm not sure it works in all cases, but it did for me. I used the Timeline tab (now shown in the Performance tab), it's one of the tabs in Chrome Dev Tools.
Open Chrome Developer tools (F12 or CMD + Alt + I in Mac) and click the Performance tab
Make sure you drag the grey timeline bar all the way to the right, you want to see the most recent section of events so you can find what's getting stuck:
Check just down below the records sidebar. If you don't see this like in the capture below, try toggling the icons, there are different view modes. Now, going all the way down I found these. It doesn't look like that's going well. Obviously some kind of infinite loop in some random code:
I couldn't find out if it was an extension itself or some other bit of code. Clicking through I only could find // Copyright 2014 The Chromium Authors. All rights reserved..
Checking in Incognito mode clear of extensions, the website loads just fine.
I'd also advise to check the Console tab to see if there are were any errors that might cause the infinite loading thing. You'll often find clues there.