I know how to do that manually. But, is there an option to set up one particular file to be opened always in Chrome, despite Firefox being the default browser.
What I want is to set up somehow, one HTML file on my desktop to be opened in Chrome, but the rest of the html files continue to open in Firefox, and I want this to apply always for this file, even when I move it to some other computer.
I will assume we are talking about the Windows OS first. Secondly, I will assume that you do not have a Chrome shortcut sitting on your desktop, if you do have a shortcut just skip to the second step otherwise continue reading on.
Step 1: Create a Chrome Shortcut
There are many ways of doing this. Simplest one is to just search for Chrome in the Start Menu and drag the shortcut to your desktop like I have in the picture below.
Step 2: Open the Shortcut Properties
Right click on your Chrome shortcut and click the Properties option, like in the image below.
Step 3: Edit Your Shortcut's Target Value
Find the Target option in the Shortcut tab of the Properties window. Add the following piece of code at the end of your target statement.
--app=https://example.com
Replace https://example.com with any website you like. In the image below the highlighted part shows where you have to edit the target value. I have made a shortcut for https://google.com.
Hope this helps!
Note: This is a Chrome specific trick and it will open a new window without a URL bar or a toolbar.
Edit: Added pictures with more description.
You can right click on the html file then got to open with and it should display the available browsers select the one you would like to open the file with
You should be able to set it to open (in Windows (7) ) by right-clicking on a html file, going to 'Open With' and 'Choose Default program':
on most Linux systems you should be able to right-click, go to 'Properties' and set it under 'Open With...':
also, in Google Chrome settings you should be able to set it as default:
Related
This question is similar to How can I inspect disappearing element in a browser?, except it's the reverse.
I'm trying to debug which JS adds a bunch of rogue <iframe> aswift_1, aswift_2, etc. elements to the page, like so:
I'd like to use Chrome Devtools (or Firefox) to pause execution as soon as such an element is added and inspect the call stack, hopefully finding the culprit.
Other ideas are welcome as well.
You can use this simple chrome extension.
It will trigger the debugger AFTER element with id matching aswift_ is added(of course you need to open chrome dev tools first).
https://gist.github.com/maciejmackowiak/8043c8630004644144711f730ef45f1b
To activate this extension download -> unpack, open manifest.json and in line 8 change the example.com to the domain you want to inspect.
Then go to chrome://extensions/
Click on Developer mode and Load unpacked
When you will go to the page maching the domain this should show up after element with id starting with aswift_ is added:
Paused in debugger
Now you can use "step over next function call(F10)" (you may need to hit it few times before it will loop thru all mutations and "go" to another function)
Quickest way in chrome would be to take a look at either the network tab (for response) or do a global search using Ctrl+Shift+F on Windows and look for certain tags used in those elements which are being added to the DOM
I have a html page with several links to files with various file types, such as pdf, csv, and zip. Depending on the available browser plugins, some of these files can be opened inline by the browser, whereas others will be downloaded.
I don't want such links to open in the current tab, so each one has the attribute target="blank".
This works fine in most browsers:
When the user clicks on a link to a file that can be displayed inline, the file is shown in a new tab.
Otherwise, a new tab is opened and immediately closed as soon as the file starts to download. The user stays in the current window.
In Microsoft Edge, however, the second case does not work: the new tab remains open. This is annoying, because the user is now looking at a useless empty tab.
Is there any way to prevent this from happening?
I don't think there is anything you can prevent Edge's this behaviour. What you can do is to change the HTML tag.
Use download attribute in <a> element without target attribute. This way, the browser will prompt save dialog instead of opening a new tab.
<a href="myfile" download>Download</a>
http://www.w3schools.com/tags/att_a_download.asp
In this case, the browser will not display the file inline.
If you still want your clients be able to see the files inline you can detect the client's browser; if it is Edge then use the download attribute, if not use target attribute. In addition, you can use something like navigator.mimetypes to detect which file types can be displayed inline (see https://developer.mozilla.org/en-US/docs/Web/API/NavigatorPlugins/mimeTypes).
Here is the detect function which I took from another post (How can I detect Internet Explorer (IE) and Microsoft Edge using JavaScript?)
function isEDGE(){
return /Edge\/\d./i.test(navigator.userAgent)
}
Leave your <a> tags with no target and download attributes. Use detect function and decide on the right attribute.
Like this:
$(document).ready(function(){
if(isEDGE()) {
$('a').attr('download','download');
} else {
$('a').attr('target','_blank');
}
})
Note:
I am not sure about Edge detecting function.
Method 1:
I suggest you clear the Clear browsing data option of Microsoft Edge and check if you face the issue. To do so perform the steps below.
Click on the More actions icon next to the feedback icon present on top right corner of the Edge.
Select Settings and click on Choose what to clear.
Check the boxes Browsing history, Cookies and saved website data and Cached data and files and click on Clear.
Method 2:
If you are using any Proxy connection, then try disabling the proxy connection and check.
Follow the steps to disable proxy:
Click the Settings icon at the top right corner in internet explorer.
Click the Tools button, and then click Internet Options.
Click the Connections tab, and then click LAN settings.
Uncheck the box next to “proxy server for your LAN”.
Click on OK to save the setting and close window.
Now check the issue by opening Edge.
I have an issue with the Chrome developer tool.
My version is Version 46.0.2490.71 (64-bit)
According to online tutorials, I can go to Sources tab, right-click a script file and there will be Blackbox Script option to choose.
However, I see no option in my chrome. How do I enable that option since I have no knowledge about regex?
Another problem: The scripts still got debugged even though I added them to blackbox list. Weird!!
One more thing i want to ask is how I blackbox an "unlimited" amount of VM files?
Open devtools settings (press F1 once in devtools or open from the menu)
Go to blackboxing (see image below)
Add a pattern, for example:
node_modules
angular
rxjs
It uses regex syntax in case you need something more specific.
The nice part about blackboxing library/framework scripts is that it makes it easier to see in stacktraces from where the error was triggered in your own sources.
EDIT
As other pointed out, since this answer was posted you can directly blackbox a script with a right click on the source file in devtools.
However head off to the blackboxing settings UI for more control.
There's an easier way in Chrome 60 (and possibly older):
Open the source file in Chrome dev tools (in the source tab)
Right Click the column that displays the line numbers
Select "Blackbox Script"
EDIT: As svict4 pointed out, in Chrome 64, you can also right click anywhere on the script
It seems they changed from blackbox to Ignore List.
Also press f1 in devTools and find Ignore List
Not sure if Chrome has changed too, but on Chromium Edge, the option is named "Mark as Library Code" and "Mark as my Code" to disable it. You have to right click on the code and not on the file/tab. Right clicking on Line numbers works too.
In Chrome, you can edit your resources in line and Chrome will generate revisions of that resource. Here the documentation: http://code.google.com/intl/en-US/chrome/devtools/docs/elements-styles.html#persist
Sadly, it's not working here, and I don't know how to enable it. It is not possible to expand the file in the resource tab to see the revisions.
Using Chrome 15.0.874.121 on MacOS here. A colleague of mine tried the developer channel, but it's still not there. But I saw a demo of it at the Google Developer Day.
This works in 15.0.874.121 as well -- just double-click on a text content of a CSS or JS file in the Resources panel, type something and press Cmd+Enter. You will see the lines that you added displayed with a green background, and the edited resource on the left will become expandable.
Alternatively, the Dev channel has an "Edit" button (a pencil with dots) below the resource contents if the resource is editable. You can click it to toggle the resource editing.
It works fine on ToT and on dev channel 17.0.942.0 dev.
The scenario.
open inspector's Scripts panel
start editing with double click
save the revision with Cmd+S
optional exit from editing mode Shift-Enter
open Resource Panel
click on the right arrow symbol close to edited file.
How to remove all breakpoints in one step in Google Chrome? Using version 11.
[update]
There is now a feature request for this.
[update]
The feature request is closed (Dec 2011)!
This is now possible in Sources tab of Chrome Developer Tools.
Please see screen grab below and right click within the "Breakpoints" section of the left window.
Since recently (Chrome 18), you can right-click any breakpoint in the Breakpoints pane and voila! The "Remove All JavaScript Breakpoints" popup menu item!
Chrome Devtools crashed everytime I tried to access the Sources panel because of a breakpoint on a minified Javascript file.
To remove all breakpoints without access to the interface, you can do the following:
Open inspector-on-inspector : undock first inspector and hit ctrl+shift+i to open the second
On the inspector-on-inspector console, execute the following:
window.localStorage.breakpoints = [];
Close the inspectors and reload the page. Now the breakpoints are gone.
Under Sources, you can click button marked with red on picture below or use shortcut Ctrl + F8 just like tool tip is showing (activate / deactivate breakpoints). A little bit lower under 'Breakpoints' you will see all your breakpoints. If you choose to disable all, they will be grayed out.
solution here.
To purge all breakpoints open inspector on inspector (undock first
inspector and hit ctrl-shift-I to open the second) and run
"WebInspector.settings.domBreakpoints.set([])" in second inspector's
console.
new Tabs; Ctrl+Shift+J to Console; Access URL
Open the Chrome task manager and end the tab page.
Ctrl+Shift+J to Application -> Service Workers (Offiline) -> Refresh
to Sources Cancel Breakpoint
Success
Another option is to de-activate all break points using:
Ctrl + F8
In my case Uninstall and new installation of Chrome was without any success.
Also window.localStorage.clear() did not help.
My "last chance solution" is to remove entire directory where Chrome is storing its data.
First turn off your Chrome.
Then look at this path "c:\Users\ {your_user} \AppData\Local\Google\Chrome\User Data\Default\Local Storage\". Here try to delete all what is in this directory.
You can also clear all inspector settings and reload the inspector. It helped me with fantom breakpoint I could not remove in any other way. Open inspector and go to Preferences -> Sync -> Restore defaults and reload (at the bottom).
Step 1: Go to Developer tools and expand Breakpoint section
Step 2: Right click on expanded area of breakpint and there will be many options lik