I, using a Chrome browser, am troubleshooting a node.js web application on a page generated by Jade.
Most of the script files included in the Jade file appear in the Sources tab in Chrome F12, ie under the tree beginning with Top. However, there is one particular script file that I see has been loaded under the Network tab (Chrome F12) but does not appear in the Sources tab. As a result I am unable to put breakpoints in that script.
That script file was included with a simple append to a block. But in the Network tab, it was shown called with a query string parameter of a long number, eg emoji.js?123232323.
What could be happening and how do I fix it?
Related
I would like to replace a javascript file in my Google Chrome cache such that when I reload a website it will run my modified script. I could do a whole setup with puppeteer instead but it would be just way easier if I could just replace the cached file. However, I cannot seem to locate my cache or any info on wether this is possible since the data might be encrypted or encoded. Alternatively is there an extension that would let me do this?
You can replace a JavaScript file in your Google Chrome cache by following these steps:
Open Chrome and press F12 to open the developer tools.
Go to the "Application" tab in the developer tools and select "Cache" from the left sidebar.
Find the JavaScript file you want to replace in the cache and select it.
Right-click on the selected file and choose "Delete" to remove it from the cache.
Refresh the website to reload it and run your modified script.
To run the modified script, you can use the "Sources" tab in the developer tools to open the file and paste in your changes.
I use a script to open my browser and a bunch of tabs, for when I accidentally close the browser, with a small window still open in the background (SPAM windows, etc.). The problem is, with Google Chrome set to continue where I left off, when I restart the computer, or Google Chrome, I just get a single windows open with the tab, not my pinned tabs, and tab groups.
Is there a way to create a tab group from the command line?
I have tried a few ways of doing this, but the scripting I can find, will only open the tab in the browser, not actually allow me to create a tab group.
I have tried using:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" google.com mysite.com
This will load the pages as tabs, but I cannot create a tab group.
I have tried Python
python -m webbrowser google.com mysite.com
I cannot see anyway to create a tab group.
I tried using very simple HTML to create several links to several batch files on my server that are intended to run when users click on the links. Using Chrome, every time I click on one of those files my browser displays the script itself (even though its a .bat) and doesn't actually run the script. Internet Explorer runs it every time, however all the users on the network use Chrome for web browsing.
Is there any way to force Chrome (preferably through HTML or VB or some other scripting on the page itself rather than change all of the users' browser settings) to run these batch files when the user clicks on the link?
The answers given so far - that it's "not possible" - are incorrect or outdated. Using Chrome Apps you can call executables (called "hosts") if they are registered with Chrome. Of course a Chrome App is a client application so you need to distribute it.
See https://developer.chrome.com/extensions/nativeMessaging#examples
HTML, JS on browser cannot run shell command, command line. You have to implement server script to execute your bat file then call it from HTML, JS via Ajax or direct link.
I have an page with some forms. All the links work fine in IE. They open in a new tab nicely when the hyperlink is click by the user; however, I realized that when Chrome is use the link doesn't open. I keep clicking but nothing opens. The only way of opening the file is copying the hyperlink, opening a new tab in Chrome, paste and go.
Form1
Is this something that browser do? Because I tried it with FireFox and doesn't work either?
It there a way of going around? without installing anything in the browser? Because my user loves Chrome.
Thank you in advanced for the responses.
You can't access to files outside your server or "SandBox", sandbox include the files that user push to the browser or to your server.
If the access from browser to a pc files from web pages was possible, it would be a security problem.
The answer is that you can't with your approach and more importantly you shouldn't. Chrome behavior is in fact the right behavior and it protects you from having malicious users and/or scripts accessing your local resources.
The FILE protocol will access local or defined network named resources which will not be available to a remote user that visits the same page. In other words, you may have outsideserver mapped as a network resource/drive but someone else will not (This does not apply to IPs)
Here's what you can do:
Move the code to a server side script(php, asp, etc) and stream the file back out. Found a quick example here on SO. I did not verify it though. Streaming a large file using PHP
Install a webserver on outsideserver and map a new site to the shared folder. You can then reference it via http (http://outsideserver.com/form1.pdf)
Use the below extension for chrome. It will work.
Enable local file links
Below both options are working and tested.
Link 2
Link 3
In Chrome Dev Tools, when viewing the Network tab, is it possible to select a script and open it in the Sources tab? Double-clicking the script opens it raw in a new browser tab.
Because the Sources tab organizes all assets by their source domains (along with folder paths), it can be time consuming to locate a particular script, if you don't know immediately where it came from. You have to switch back and forth between Network and Sources, taking note of the domain and folder path in the script's header and then trying to dig through all the source domain's and subfolders until you locate the script.
It seems like there should be some obvious way of opening a script in the Sources tab from the Network tab, but I don't see how. You appear to have to manually dig to find it.
EDIT
This feature is now available in Chrome Canary, and should be available in stable Chrome in a few weeks.
As far as I know this is not possible right now. I think it's a good idea though, so I reported it for you.
The quickest way, I can think of, to open a script from the network tab in the sources tab is to:
copy/memorize name of the script from network tab,
go to the sources tab,
open file search (cmd+p / ctrl+p),
enter name of the file you are looking for.