Catégorie : Navigateur

Use CTRL and TAB to switch between two tabs in Chrome

It’s super handy to be able to switch between two tabs in the web browser… But it’s tricky to set it up in Chrome! Install AutoControl: Keyboard shortcut, Mouse gesture Install the native component as the extension asks for Add a new action The trigger is LEFT CTRL and TAB The action is Switch to […]

chrome-search://local-ntp/local-ntp.html makes Chrome unresponsive

Sometimes, when I open a new tab in Chrome, it first tries to get chrome-search://local-ntp/local-ntp.html and while it’s doing it, I cannot enter any URL. Eventually it will popup a message asking me if I want to wait or exit the page… The way I found to fix it is to go to the page […]

Invisible character with IE when using Intl.DateTimeFormat

As explained in some threads, Internet Explorer adds some invisible extra characters when returning a date from the JavaScript function new Intl.DateTimeformat. var day = « Thursday »; var intlDay = new Intl.DateTimeFormat(‘en-US’, {weekday: »long »}).format(new Date(2019,1,7)); console.log(day === intlDay); // return FALSE with IE intlDay = intlDay.replace(/\u200E/g,  »); // replace \u200E console.log(day === intlDay); // return TRUE with […]

How to open an Excel document from SharePoint into Chrome/Firefox in readonly/edit mode

With Sharepoint 2010, when you use Internet Explorer you can open an Office document in readonly or in edit mode. Also, when trying to open an Excel file in Firefox/Chrome it will probably open the ugly xslviewer and won’t let you deal with your file. After searching a bit about it, I found a clue […]

http://www.iegallery.com/addonsie7/ is returned when trying to change the default search engine for Internet Explorer

I have IE11 on my pro laptop, with Bing, while I want to use Google as my default search engine. However it keeps returning me the page http://www.iegallery.com/addonsie7/ with no way to install another search provider… After looking for a solution, I found you can use the direct link http://www.iegallery.com/addonsie7/Detail?resourceId=13555 to be able to install […]

Pure Javascript Drag and Drop cross browser from IE8

I was looking for a simple JavaScript to drag a div element around, and that would work with IE8 and without any third party libraries (like jQuery). It’s been very difficult to find a simple code ! Finally http://news.qooxdoo.org/mouse-capturing saved me with some code… but there was still a problem with IE8 due to the […]

Force CORS headers in Firefox to allow cross domain calls

This guy created a Firefox extension to force the CORS (access-control) headers from a call. This is very useful when you want to do a JavaScript/AJAX query over another website that doesn’t allow the cross domain calls. His code is on github. I’ve the XPI compiled version on my blog (into a ZIP file) found […]

Windows 10 et Cortana : lancer les recherches sur Google au lieu de Bing sous Firefox

Microsoft essaie d’imposer son moteur de recherche, mais je continue à préférer Google…. Du coup quand Cortana sous Windows 10 nous redirige sur Bing, ça m’agace… Sous Firefox on peut utiliser l’extension Redirector puis appliquer les règles suivantes : Example URL : https://www.bing.com/search?q=*&* Include Pattern : https://www.bing.com/search?q=*&* Redirect To : https://www.google.de/#safe=off&q=$1 Pattern Type : Wildcard […]

Détecter la version d’IE [JavaScript]

Via http://tanalin.com/en/articles/ie-version-js/ on trouve un moyen simple de détecter la version d’IE : var IE8 = !!(document.all && document.querySelector && !document.addEventListener); // -> true/false var IE9 = !!(document.all && document.addEventListener && !window.atob); // -> true/false var IE10 = !!(document.all && window.atob); // -> true/false On peut aussi utiliser les conditionals compilation: var ieVersion = /*@cc_on […]

Get window/viewport/document height and width [JavaScript]

Via andylangton and james.padolsey we can find the viewport and document height/width in JavaScript: function getPageSize() { var vw = {width:0, height:0}; var doc = {width:0, height:0}; var w=window, d=document, dde=d.documentElement, db=d.getElementsByTagName(‘body’)[0]; // viewport size vw.width = w.innerWidth||dde.clientWidth||db.clientWidth; vw.height = w.innerHeight||dde.clientHeight||db.clientHeight; // document size doc.width = Math.max(db.scrollWidth, dde.scrollWidth, db.offsetWidth, dde.offsetWidth, db.clientWidth, dde.clientWidth); doc.height = Math.max(db.scrollHeight, […]