How can i make an google chrome extension open a incognito - google-chrome

I want to make an extension that opens an incognito mode when you click on a button.
I want to make this extension for chrome but i also like to do it for firefox, but first the chrome extension
this is the only feature.
I hope to have an explantion for this and know if it is posssible

You can open in incognito by setting it to true in chrome.windows
For example:
chrome.windows.create({incognito: true, url});

Related

Disable Ctrl+n in firefox or chrome

As an emacs user, I am used to ctrl+n to go to the next line in a editor form. However, in firefox and chrome, it is binded to open a new window. How can I change this setting. BTW, I am using ubuntu 20.04.
First you need to add below extension in your chrome.
https://chrome.google.com/webstore/detail/disable-keyboard-shortcut/aidbmcboeighgdnilpdljbedbbiocphj?hl=en
Once extension added successfully enter below link in your chrome.
chrome://extensions/shortcuts
You see Disable Keyboard Shortcuts window you can enter your shortcut key there.
Hope it work for you!

Is there a way to make chrome devtools undetectable?

I want to see how stuff works on a website, but each time I open Devtools (or refresh the page), I get an alert saying Devtools is open. It blocked me from using Devtools, so I want to disable this feature.
So, I searched how to "jam" google chrome Devtools and got these results:
Find out whether Chrome console is open
https://coderwall.com/p/iktwug/detect-if-chrome-devtools-are-open
https://github.com/sindresorhus/devtools-detect
But I can't find any information about making Devtools Undetectable or disabling this code. Tried undocking Devtools, didn't work.
This is their code blocking me from using Devtools:
https://hastebin.com/oxopowiduy.php
What should I do to make Devtools Undetectable?
In Chrome 73+ it's possible to open devtools before the page can run any code to detect it:
open chrome://inspect
click "Pages"
click "pause" on an entry for the tab you want to debug
Now you can inspect the page, find out how exactly it detects devtools, and defuse it. Judging by the code in your question, you can run window.uomg.create.onchange = null, but if not, set breakpoints in the code and debug it to find out a working method.
Based on this answer:
Find out whether Chrome console is open
The answer to your question is "No" - the sites are probably using jscript to detect the console is open and you will not be able to send back a false negative.

Chrome incognito mode : config url

I would like to configure my Chrome so that when i open a new tab in incognito mode (ctrl shift N) it open a new tab and automatically go to an URL, instead of the empty tab.
Is there a way or an add-on to do that?
Thx
There is an easy way to automatically change to incognito if you try and access certain URLs, which you could then bookmark so when you click them it opens incognite? You can use Ghost incognito for this, just make sure you enable the app for use in incognito mode. You then go to the url and press the ghost icon.
https://chrome.google.com/webstore/detail/ghost-incognito/gedeaafllmnkkgbinfnleblcglamgebg

Chrome extension refreshes when dock/undock developer tool?

I have a chrome extension that works in a new tab in Google Chrome Developer Tool. When I dock/undock my extension refreshes but other tabs does not.
How can I prevent refresh when I dock/undock devtool?
This was fixed by updates of Google Chrome.

Automatically open Chrome Dev Tools with target='_blank' link?

When you click a target='_blank' link, it naturally opens a new tab in Google Chrome. For particular sites, I need to use the Chrome Developer Tools to examine the http requests for any new tabs that are opened.
Whenever you have Chrome Dev Tools open on your current page and then click a link that opens a new tab, Chrome Dev Tools are not opened on the new page by default. Opening Chrome Dev Tools at this point is too late because the tools do not capture the http requests for the page.
Also, in many cases, these new tabs go through a series of redirects before reaching the final page, so I cannot simply reload the page after opening Chrome Dev Tools.
The only workaround I can think of is, in the case that the site I'm working on is on a local development server, I can temporarily change the link from target='_blank' to target='_self', but this is unrealistic for a site with thousands of links or for a site that I have no control over the code.
Is it possible to set Chrome Dev Tools to automatically open with every new tab (opened either manually or via target='_blank'?
I'm not sure as of which Chrome version this changed, but if you click on the Settings wheel on dev tools:
You'll see a Global section with a checkmark for "Auto-Open DevTools for popups", which works for opening target="_blank" links with a devtools window:
It's possible to auto open devtools for all the new tabs instead of just target = _blank. When launching google chrome, pass the flag --auto-open-devtools-for-tabs. It enables launching of devtools for all the windows created automatically.
For linux
google-chrome --auto-open-devtools-for-tabs
For Mac
open -a "Google Chrome" --args --auto-open-devtools-for-tabs
You can only open DevTools window via UI action or keyboard shortcut. There is no way to do this automatically.