//Bookmarklet - signapplet : obtenir les meta-donnees directement et les en-tetes HTTP via Ajax /* Interfacteur 2013 */ //javascript:"use%20strict";if(document.location.protocol.indexOf("https")==0){void(alert("Le%20protocole%20https%20n'est%20pas%20pris%20en%20charge"))}else{var%20bookmarkletDonneesReglages=false;void((function(){if(typeof%20bookmarkletDonnees!=="undefined"&&bookmarkletDonnees.actif){bookmarkletDonnees.agir();}else{if(document.getElementById("bookmarkletDonnees")){document.getElementsByTagName("body")[0].removeChild(document.getElementById("bookmarkletDonnees"));}var%20loadscript=document.createElement("script");loadscript.id="bookmarkletDonnees";loadscript.src="http://etc/signapplet-donnees.js?t="+new%20Date().getTime();document.getElementsByTagName("body")[0].appendChild(loadscript);}})());} "use strict"; var bookmarkletDonnees = {}; document.getElementsByTagName("body")[0].removeChild(document.getElementById("bookmarkletDonnees")); (bookmarkletDonnees.agir = function(){ Number.prototype.dizer = function(){ return this.toString().length == 1 ? "0" + this : this; } if(document.getElementById("presentationGetAllResponseHeaders")){ document.body.removeChild(document.getElementById("presentationGetAllResponseHeaders")); } ! bookmarkletDonnees.actif && (function(){ bookmarkletDonnees.initial = new Date(); bookmarkletDonnees.modification = "\u25D8\u0020Derni\xE8re modification : " + document.lastModified + "\n"; var charset = "\u25D8\u0020Encodage : "; try{ charset += document.querySelector("meta[http-equiv='Content-Type']").getAttribute("content").split("=")[1] + " via meta HTML 4\n"; } catch(e){ try{ charset += document.querySelector("meta[charset]").getAttribute("charset") + " via meta HTML 5\n"; } catch(e){ charset += (typeof document.characterSet !== "undefined" ? document.characterSet : document.inputEncoding) + " non declar\xE9\n"; } } bookmarkletDonnees.charset = charset; var dodo = document.doctype; bookmarkletDonnees.typedoc = "\u25D8\u0020Doctype : " + (dodo === null ? "non declar\xE9" : "') + "\n"; bookmarkletDonnees.racines = document.querySelectorAll("body > *"); bookmarkletDonnees.stylesOpacite = []; for (var i = 0;i -1; bookmarkletDonnees.afficher = function(ajax){ var presentationPseudo = document.createElement("style"); presentationPseudo.id = "presentationPseudo"; presentationPseudo.setAttribute("type","text/css"); var presentationsPseudo = ['#presentationGetAllResponseHeaders:before,#presentationGetAllResponseHeaders:after { ']; //pas de cursor webkit cf. http://jsfiddle.net/qKMPQ/2/ presentationsPseudo.push('background: rgb(255,128,0)!important; background: rgba(255,128,0,.8)!important; clip: rect(0, 40px, 46px, 0)!important; color: #000!important; content: "\\00D7"!important;'); presentationsPseudo.push('cursor: pointer!important; font-size: 70px!important; height: 40px!important; letter-spacing: 0!important; line-height: 40px!important; padding: 6px 0 0 0!important; position: fixed!important;'); presentationsPseudo.push('width: 40px!important; z-index: 44445!important; }'); presentationsPseudo.push('#presentationGetAllResponseHeaders:before { border-radius: 0 0 0 18px!important; bottom: 0!important; left: 0!important; text-align: left!important; }'); presentationsPseudo.push('#presentationGetAllResponseHeaders:after { border-radius: 0 18px 0 0!important; text-align: right!important; top: 0!important; right: 0!important; }'); presentationPseudo.textContent = presentationsPseudo.join("\n"); document.getElementsByTagName("head")[0].appendChild(presentationPseudo); //pas document.head pr Safari 3 var presentation = document.createElement("pre"); presentation.id = "presentationGetAllResponseHeaders"; presentation.setAttribute("style","background: rgba(255,255,255,.9)!important; border: 0!important; border-radius: 3%!important; bottom: auto!important; box-shadow: 0 0 24px #002, 0 0 16px #200 inset!important; -moz-box-sizing: content-box!important; box-sizing: content-box!important; clip: rect(-10000px, 10000px, 10000px, -10000px)!important; color: #000!important; column-count: 1!important; column-width: auto!important; cursor: default!important; direction: ltr!important; display: block!important; filter: none!important; float: none!important; font-family: monospace!important; font-size: 14px!important; font-size-adjust: none!important; font-stretch: normal!important; font-style: normal!important; font-variant: normal!important; font-weight: normal!important; height: 80%!important; left: 5%!important; letter-spacing: normal!important; line-height: 1.45!important; margin: 0!important; max-height: none!important; max-width: none!important; min-height: 0!important; min-width: 0!important; opacity: 1!important; outline: 0!important; overflow: visible!important; padding: 5% 5% 0 5%!important; perspective: none!important; pointer-events: auto!important; position: fixed!important; right: auto!important; text-align: left!important; text-decoration: none!important; text-indent: 0!important; text-shadow: none!important; text-transform: none!important; top: 5%!important; visibility: visible!important; white-space: pre-wrap!important; width: 80%!important; z-index: 44444!important; -webkit-animation: none!important; -moz-animation: none!important; -o-animation: none!important; animation: none!important; -webkit-transform: none!important; -moz-transform: none!important; -o-transform: none!important; transform: none!important;"); var presentations = ["RENSEIGNEMENTS JAVASCRIPT de " + bookmarkletDonnees.initial.getHours().dizer() + ":"]; presentations.push(bookmarkletDonnees.initial.getMinutes().dizer() + ":" + bookmarkletDonnees.initial.getSeconds().dizer() + " :\n"); presentations.push(bookmarkletDonnees.typedoc + bookmarkletDonnees.charset + bookmarkletDonnees.modification + "\n"); var actuel = new Date(); var actualite = actuel.getHours().dizer() + ":" + actuel.getMinutes().dizer() + ":" + actuel.getSeconds().dizer(); presentations.push("EN-T\u00CATES HTTP \u00E0 " + actualite + " :\n\u25CC\u0020"); presentations.push(ajax ? ajax.getAllResponseHeaders().replace(/\x0A(?=.)/g,"\n\u25CC\u0020") : "La page doit \u00EAtre lue via un service HTTP"); presentation.textContent = presentations.join(""); document.body.appendChild(presentation); for (var i = 0;i Y + h - 62) || (x > X + w - 56 && y < Y + 63)){ //http://interfacteur.blogspot.fr/2014/01/js-condition-ou-operation-mathematique.html for (var i = 0;i