Catégorie : Niveau débutant

How to cache the CSS Fonts with Sharepoint

If you use your own CSS file with your own CSS fonts, then we’ll notice that Sharepoint doesn’t send cache headers if you use the below CSS code: @font-face { font-family: ‘Roboto’; src: url(‘/_catalogs/masterpage/css/fonts/Roboto/Regular/Roboto-Regular.woff2’) format(‘woff2’), url(‘/_catalogs/masterpage/css/fonts/Roboto/Regular/Roboto-Regular.woff’) format(‘woff’), url(‘/_catalogs/masterpage/css/fonts/Roboto/Regular/Roboto-Regular.ttf’) format(‘truetype’); font-weight: 400; font-style: normal; } To have this resource sent back from the Sharepoint server with […]

Check if an element is visible [JavaScript]

We can find plenty of answers about how to check if an element is visible. In my case the one which works with opacity, and into a scrollable area, is this one (that I have optimized): function isScrolledIntoView(el, holder) { var bndElem = el.getBoundingClientRect(); var bndHolder = holder.getBoundingClientRect(); return bndElem.top <= bndHolder.top ? !(bndHolder.top – […]

Yes, you can be lazy and get more than 5000 SharePoint Items

To reply to this blog post I wanted to share the same thing but with SharepointPlus. To use the paging option and get all the content from a large Sharepoint list you can simply do the below code: $SP().list(« My List »).get({ fields: »ID,Title », rowlimit:5000, paging:true, progress:function progress(nbItemsLoaded) { // for each new page this function will be […]

Détecter si le Freebox Player est allumé ou éteint (en veille) via les API de Free [Programmation]

Il n’existe pas de commande directe qui permette de savoir si le Player est éteint (en veille) ou allumé… Cependant il existe une astuce qui consiste à faire une requête en utilisant les paramètres suivants : { url: »http://mafreebox.freebox.fr/api/v3/airmedia/receivers/Freebox%20Player/ », headers:{ « X-Fbx-App-Auth »: client.app.session_token }, method: »POST », json: { « action »: »stop », « media_type »: »video » }, encode: »utf-8″ } La Freebox va alors retourner […]

Hide a field into a form with JSLink based on field’s description [Sharepoint]

On Sharepoint 2013 I was trying to hide a field (the complete row) based on some elements into its description. To do so we will call our file using the JSLink (see my previous post about it). The JS file looks like that: (function() { // do some actions as soon as the fields are […]

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 […]

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 […]

Utiliser un email alias avec GMail [Astuce]

Vous possédez une adresse GMail ? Et vous avez un autre email qui est redirigé vers votre boite GMail ? Et vous voulez envoyer des emails avec cet alias ? Par exemple, mon GMail est aymeric@gmail.com et je redirige aymeric@example.com vers cette même boite. Alors pour pouvoir envoyer des emails en aymeric@example.com depuis GMail c’est […]

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 […]