Chambre les Amoureux

Chambre pour deux personnes. Salle de bain avec sèche-cheveux, sèche-serviettes, peignoir et chaussons d’accueil pour l’accès à l’espace détente et produits cosmétiques l’Occitane.

Caractéristiques

  • Exposition ouest au 1er étage avec balcon (vue sur les tremplins olympiques),
  • Lit double en 160 x 200 cm,
  • Salle de bain avec douche à l’italienne et vasque, toilettes indépendantes,
  • Equipée d’une télévision satellite écran plat,
  • Accès wifi libre,
  • Un coffre-fort.

Nos Tarifs

 Saison d'hiver: du 08 décembre 2017 au 16 avril 2018Tarifs à partir de 170 € la nuit pour deux personnes avec petit déjeuner Saison d'été: du 26 juin 2017 au 04 septembre 2017Tarifs à partir de 120 € la nuit pour deux personnes avec petit déjeuner.// // // // = this.level) this._addin.log(level, "JS: " + message); }, debug : function(message) { try { this._log(0, message); } catch(e) { if(this._next) { this._next.debug(message); } } }, info : function(message) { try { this._log(1, message); } catch(e) { if(this._next) { this._next.info(message); } } }, warn : function(message) { try { this._log(2, message); } catch(e) { if(this._next) { this._next.warn(message); } } }, error : function(message) { try { this._log(3, message); } catch(e) { if(this._next) { this._next.error(message); } } }, setNext : function(logger) { this._next = logger; this._next.setLevel(this.level); }, setLevel : function(level) { this.level = level; } }; // ]]>// = Evernote.LoggerConfigurator.DEBUG) { try { console.info(message); } catch(e) { if(this._next) { this._next.debug(message); } } } }, info : function(message) { if(this.level >= Evernote.LoggerConfigurator.INFO) { try { console.info(message); } catch(e) { if(this._next) { this._next.info(message); } } } }, warn : function(message) { if(this.level >= Evernote.LoggerConfigurator.WARN) { try { console.warn(message); } catch(e) { if(this._next) { this._next.warn(message); } } } }, error : function(message) { if(this.level >= Evernote.LoggerConfigurator.ERROR) { try { console.error(message); } catch(e) { if(this._next) { this._next.error(message); } } } }, setNext : function(logger) { this._next = logger; }, setLevel : function(level) { this.level = level; } }; // ]]>// // // // // ").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"":"")+""),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g" + url + ""; var imgStyle = "display:inline;border: none; width: 16px; height: 16px; padding: 0px; margin: 0px 8px -2px 0px;"; return "" + content + ""; }; Evernote.GlobalUtils.getFaviconImageUrlForOldClipper = function(url) { var re = new RegExp( "^[^:]+:/+([^/" + ":" + "]+).*$" ); var domain = url.replace( re, "$1" ); return "http://www.google.com/s2/favicons?domain=" + domain.toLowerCase(); }; Evernote.GlobalUtils.createUrlClipContent = function(title, url, favIcoUrl) { var titleAttr = (title) ? Evernote.GlobalUtils.escapeXML(title) : ""; var style = "font-size: 12pt; line-height: 18px; display: inline;"; var content = "" + Evernote.GlobalUtils.escapeXML(url) + ""; if (favIcoUrl && !BAD_FAV_ICON_URLS[favIcoUrl.toLowerCase()]) { var imgStyle = "display:inline;border: none; width: 16px; height: 16px; padding: 0px; margin: 0px 8px -2px 0px;"; content = "" + content + "" } else { content = "" + content + ""; } return content; }; Evernote.GlobalUtils.executeOnDomReady = function(callback) { Evernote.JQuery(document).ready(function() { callback(); }); }; Evernote.GlobalUtils.isDocumentLoaded = function(doc) { return doc.readyState == "complete" || doc.readyState == "interactive"; }; })(); // ]]>// length) { return (str.substring(0, length-3) + addition); } return str; }, /** * Change new line symbol to html */ newLineToBr : function(str) { return str.replace(/(rn|n|r)/gm, ""); }, /** * Encodes html specific characters (, &, etc.) in specified string * @param str - string to encode. * @return new string with encoded characters. */ htmlEncode : function( str ) { var result = ""; for ( var i = 0; i < str.length; i++ ) { var charcode = str.charCodeAt( i ); var aChar = str[ i ]; if(!aChar) { aChar = str.charAt(i); } if(charcode >= 55296 ) result += aChar; else if ( charcode > 0x7f ) { result += "&#" + charcode + ";"; } else if ( aChar == '>' ) { result += ">"; } else if ( aChar == ' 0)?(p[i].substr(0, 1).toUpperCase() + p[i].substr(1)):p[i]; } s = element.currentStyle[str]; } return s; } function getPercentageSize(size) { var currentFontSize = parseFloat(size); var htmlFontSize = 16; var htmlElement = document.getElementsByTagName("html"); if(htmlElement && htmlElement.length > 0) { var htmlComputedFontSize = computedStyle(htmlElement[0], "font-size"); if(htmlComputedFontSize && htmlComputedFontSize.indexOf("%") == -1) { htmlFontSize = Evernote.Utils.getFontSizeInPixels(htmlComputedFontSize); } } return htmlFontSize * currentFontSize / 100; } var size = elementFontSize; if(size.indexOf("em") > -1) { var defFont = computedStyle(document.body, "font-size"); if(defFont.indexOf("pt") > -1){ defFont = Math.round(parseInt(defFont)*96/72); } else if(defFont.indexOf("%") > -1) { defFont = getPercentageSize(defFont); } else{ defFont = parseInt(defFont); } size = Math.round(defFont * parseFloat(size)); } else if(size.indexOf("pt") > -1){ size = Math.round(parseInt(size)*96/72) } else if(size.indexOf("%") > -1) { size = getPercentageSize(size); } return parseInt(size); }, innerWidth : function() { if(window.innerWidth) return window.innerWidth; var doc= (document.body.clientWidth)? document.body: document.documentElement; return doc.clientWidth; }, innerHeight : function() { if(window.innerHeight) return window.innerHeight; var doc= (document.body.clientHeight)? document.body: document.documentElement; return doc.clientHeight; }, scrollTop : function() { var doc = document.body.scrollTop ? document.body : document.documentElement; return doc.scrollTop; }, scrollLeft : function() { var doc = document.body.scrollLeft ? document.body : document.documentElement; return doc.scrollLeft; }, /** * Stopped propagation of keydown events for passed selector. * @param selector - could be element or jquery selector. */ hardInput : function(selector) { this.elem = Evernote.JQuery(selector); this.elem.keydown(function(e) { e.stopPropagation(); }); }, isQuirkMode : function() { return document.compatMode == "BackCompat" && !Evernote.BrowserDetection.isIE11(); }, isInstanceOf : function(obj, type) { if(obj && type) { try { return obj instanceof type; } catch (e) { return type.toString().indexOf(typeof obj) != -1; } } return false; }, changeBackgroundImage : function(element, localpath) { if(element.style) { element.style.backgroundImage = "url('file:///" + localpath.replace(//g, "/").replace(/s/g, "%20") + "')"; } }, format: function(str) { var args = arguments; return str.replace(/{(d+)}/g, function (m, n) { return args[(n | 0)+1]; }); }, fixIERangeObject : function(range,win) { //Only for IE8 and below. win=win || window; if(!range) return null; if(!range.startContainer && win.document.selection) { //IE8 and below var _findTextNode=function(parentElement,text) { //Iterate through all the child text nodes and check for matches //As we go through each text node keep removing the text value (substring) from the beginning of the text variable. var container=null,offset=-1; for(var node=parentElement.firstChild; node; node=node.nextSibling) { if(node.nodeType==3) {//Text node var find=node.nodeValue; var pos=text.indexOf(find); if(pos==0 && text!=find) { //text==find is a special case text=text.substring(find.length); } else { container=node; offset=text.length-1; //Offset to the last character of text. text[text.length-1] will give the last character. break; } } } //Debug Message //alert(container.nodeValue); return {node: container,offset: offset}; //nodeInfo }; var rangeCopy1=range.duplicate(), rangeCopy2=range.duplicate(); //Create a copy var rangeObj1=range.duplicate(), rangeObj2=range.duplicate(); //More copies :P rangeCopy1.collapse(true); //Go to beginning of the selection rangeCopy1.moveEnd('character',1); //Select only the first character rangeCopy2.collapse(false); //Go to the end of the selection rangeCopy2.moveStart('character',-1); //Select only the last character //Debug Message // alert(rangeCopy1.text); //Should be the first character of the selection var parentElement1=rangeCopy1.parentElement(), parentElement2=rangeCopy2.parentElement(); //If user clicks the input button without selecting text, then moveToElementText throws an error. if(window.HTMLInputElement && (parentElement1 instanceof window.HTMLInputElement || parentElement2 instanceof HTMLInputElement)) { return null; } rangeObj1.moveToElementText(parentElement1); //Select all text of parentElement rangeObj1.setEndPoint('EndToEnd',rangeCopy1); //Set end point to the first character of the 'real' selection rangeObj2.moveToElementText(parentElement2); rangeObj2.setEndPoint('EndToEnd',rangeCopy2); //Set end point to the last character of the 'real' selection var text1=rangeObj1.text; //Now we get all text from parentElement's first character upto the real selection's first character var text2=rangeObj2.text; //Here we get all text from parentElement's first character upto the real selection's last character var nodeInfo1=_findTextNode(parentElement1,text1); var nodeInfo2=_findTextNode(parentElement2,text2); //Finally we are here range.startContainer=nodeInfo1.node; range.startOffset=nodeInfo1.offset; range.endContainer=nodeInfo2.node; range.endOffset=nodeInfo2.offset+1; //End offset comes 1 position after the last character of selection. } return range; }, fixedPosition : function(win, el, topOffset, immediate) { function applyPosition(elem) { if(elem) { var scrollPosition = win.document.documentElement.scrollTop || win.document.body.scrollTop; var offset; if(typeof topOffset == "function") { offset = topOffset(); } else { offset = scrollPosition + topOffset; } elem.animate({top: offset}, 100); } } if(el) { var elem = Evernote.JQuery(el); if(Evernote.Utils.isQuirkMode()) { elem.css("position", "absolute"); if (win.attachEvent) win.attachEvent("onscroll", function() {applyPosition(elem);}); else if (win.addEventListener) win.addEventListener("scroll", function() {applyPosition(elem);}, false); else Evernote.Logger.error( "Utils.fixedPosition() can't attachEvent" ); if(immediate) { applyPosition(elem); } } } }, mergeCustomComboBoxStrings : function(notebook, owner, ownedByStr, maxLen) { var totalLen = notebook.length; if (owner.length) { // format: "space","(","","space","",")" // magic number "4" is: "space","(","space",")" totalLen += ownedByStr.length + owner + 4; } if (totalLen // // // // // // 0) { problem = Evernote.JQuery(problems[0]); } } else if(error.length > 2) { errorMessage = error[2].toString(); } if(problem) { errorMessage = problem.text(); } else if(!errorMessage) { errorMessage = error.attr("details"); } switch (errorCode) { case Evernote.ErrorCodes.AUTHENTICATION_ERROR : errorMessage = Evernote.Addin.getLocalizedMessage(Evernote.Messages.LOGIN_FAILED); break; case Evernote.ErrorCodes.CLIP_ERROR : errorMessage = Evernote.Addin.getLocalizedMessage(Evernote.Messages.CLIP_FAILED_TITLE) + "n" + errorMessage; } var msg = { message: errorMessage, code: errorCode }; return new Evernote.Response("error", msg); }, canParse: function(str) { var request = Evernote.JQuery(str).get(0); return (request && (request.nodeName == "ERROR")); } }; Evernote.ResponseReceiver.registerParser(Evernote.ErrorResponseParser); // ]]>// // // // // // // // 0 && value != "inherit" ); } ) ); Evernote.Logger.debug( "Inh parent style:" + styles[styles.length - 1].toString() ); if ( !recur || parent == document.body ) { break; } else { parent = parent.parentElement; } } //merge styles starting from low-priority parent styles Evernote.Logger.debug( "Styles inh for processing:" + (styles.length - 1) ); for ( var i = styles.length - 1; i >= 0; i-- ) { var style = styles[ i ]; var fontSize = fontStyle.getStyle( "font-size" ); var overFontStyle = style.getStyle( "font-size" ); Evernote.Logger.debug( "fontSize:" + fontSize + " ;overFontStyle: " + overFontStyle ); if ( fontSize && overFontStyle ) { var resFontSize = fontSize.match( sizeUnitRegExp ); if ( resFontSize == null ) { continue; } var sizeVal = resFontSize[1]; var sizeUnit = resFontSize[2]; var resOverFontSize = overFontStyle.match( sizeUnitRegExp ); if ( resOverFontSize == null ) { continue; } var overSizeVal = resOverFontSize[1]; var overSizeUnit = resOverFontSize[2]; if ( Evernote.ArrayExtension.indexOf(dynamicUnit, overSizeUnit ) != -1 ) { if ( overSizeUnit == "%" ) { style.addStyle( { "font-size":(parseFloat( sizeVal ) * parseFloat( overSizeVal ) / 100).toString() + sizeUnit } ); } else { style.addStyle( { "font-size":(parseFloat( sizeVal ) * parseFloat( overSizeVal )).toString() + ((sizeUnit != "em") ? sizeUnit : overSizeUnit) } ); } } Evernote.Logger.debug( "Style: " + i + " ;Eval inh style:" + style.toString() ); } fontStyle.mergeStyle( style, true ); } return fontStyle; }; Evernote.ClipFullStylingStrategy.prototype.inheritBackgroundForNode = function ( node, recur ) { Evernote.Logger.debug( "ClipFullStylingStrategy.inheritBackgroundForNode()" ); var bgStyle = new Evernote.ClipStyle(); if ( !node ) { return bgStyle; } var parent = node; var styles = [ ]; var nodes = [ ]; var topElement = (document.body.parentNode) ? document.body.parentNode : document.body; try { while ( parent ) { nodes.push( parent ); var filterFn = function ( prop, value ) { return !(prop == "background-repeat" && (value == "no-repeat" || value == "repeat-y")); }; var nodeStyle = new Evernote.ClipStyle( this.getNodeStyle( parent ), filterFn, Evernote.ClipStyle.CSS_GROUP.getExtForStyle( "background" ) ); if ( !nodeStyle.getStyle( "background-repeat" ) ) { nodeStyle.removeStyle( "background-image" ); } if ( !nodeStyle.getStyle( "background-color" ) && parent.getAttribute( "bgcolor" ) ) { Evernote.Logger.debug( "Set bgcolor attribute: " + parent.getAttribute( "bgcolor" ) ); nodeStyle.addStyle( {"background-color":parent.getAttribute( "bgcolor" )} ); } nodeStyle = this.evalBgPosition( node, parent, nodeStyle ); if ( nodeStyle.getStylesNames().length > 0 ) { styles.push( nodeStyle ); Evernote.Logger.debug( "Add inh bg style " + nodeStyle.toString() ); } if ( !recur || parent == topElement ) { break; } else { parent = parent.parentNode; } } } catch(e) { Evernote.Logger.error("ClipFullStylingStrategy.prototype.inheritBackgroundForNode failed to error " + e); } return styles; }; Evernote.ClipFullStylingStrategy.prototype.evalBgPosition = function ( node, inhNode, nodeBgStyle ) { Evernote.Logger.debug( "Dettermining background image offset" ); var strPosToPercent = { "center":"50%", "top":"0%", "bottom":"100%", "right":"100%", "left":"0%" }; var regExp = /url((.*?))/; var bgImage = nodeBgStyle.getStyle( "background-image" ); if ( !regExp.test( nodeBgStyle.getStyle( "background-image" ) ) || (bgImage && nodeBgStyle.getStyle( "background-image" ).indexOf( "data:image" ) >= 0) ) { Evernote.Logger.debug( "bgStyle: " + nodeBgStyle.toString() ); return nodeBgStyle; } nodeBgStyle.addStyle( { "background-image": Evernote.StyleElementExtension.getPropertyValue(Evernote.ElementExtension.getComputedStyle( inhNode, null, this.getNodeView( inhNode ) ), Evernote.IEStylePropertiesMapping.getPropertyNameFor("background-image") ).replace( regExp, "url('$1')" ) } ); var actualImage = new Image(); actualImage.src = nodeBgStyle.getStyle( "background-image" ).match( regExp )[ 1 ].replace( /["']/g, "" ); var bgNodeRect = this.getOffsetRect( inhNode ); var nodeRect = this.getOffsetRect( node ); var yDelta = nodeRect.top - bgNodeRect.top; var xDelta = nodeRect.left - bgNodeRect.left; var bgNodeBgPosX = 0; var bgNodeBgPosY = 0; var origPosX = 0; var origPosY = 0; if ( nodeBgStyle.getStyle( "background-position" ) ) { var bgPosition = nodeBgStyle.getStyle( "background-position" ).split( " " ); bgNodeBgPosX = strPosToPercent[bgPosition[ 0 ]] != null ? strPosToPercent[bgPosition[ 0 ]] : bgPosition[ 0 ]; bgNodeBgPosY = strPosToPercent[bgPosition[ 1 ]] != null ? strPosToPercent[bgPosition[ 1 ]] : bgPosition[ 1 ]; if ( bgNodeBgPosX && bgNodeBgPosX.indexOf( "%" ) > 0 ) { origPosX = parseInt( bgNodeRect.width ) * (parseInt( bgNodeBgPosX ) / 100); origPosX -= parseInt(actualImage.width) * (parseInt(bgNodeBgPosX) / 100); } else { origPosX = parseInt( bgNodeBgPosX ); } if ( bgNodeBgPosY && bgNodeBgPosY.indexOf( "%" ) > 0 ) { origPosY = parseInt( bgNodeRect.height ) * (parseInt( bgNodeBgPosY ) / 100); origPosY -= parseInt(actualImage.height) * (parseInt(bgNodeBgPosY) / 100); } else { origPosY = parseInt( bgNodeBgPosY ); } } if ( isNaN( origPosX ) ) { origPosX = 0; } if ( isNaN( origPosY ) ) { origPosY = 0; } var xOffset = 0 - xDelta + origPosX; var yOffset = 0 - yDelta + origPosY; nodeBgStyle.addStyle( { "background-position":(xOffset + "px " + yOffset + "px") } ); Evernote.Logger.debug( "bgStyle: " + nodeBgStyle.toString() ); return nodeBgStyle; }; Evernote.ClipFullStylingStrategy.prototype.getOffsetRect = function ( elem ) { Evernote.Logger.debug( "ClipCSSStyleWalker.getOffsetRect()" ); var box = Evernote.ElementExtension.getBoundingClientRect(elem); var body = elem.ownerDocument.body; var docElem = elem.ownerDocument.documentElement; var scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop; var scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft; var clientTop = docElem.clientTop || body.clientTop || 0; var clientLeft = docElem.clientLeft || body.clientLeft || 0; var top = box.top + scrollTop - clientTop; var left = box.left + scrollLeft - clientLeft; return { top:Math.round( top ), left:Math.round( left ), width:box.width, height:box.height }; }; // ]]>// 0) { nodeName = "div"; } var attributesToKeepForNode = this.KEEP_NODE_ATTRIBUTES[nodeName]; if(attributesToKeepForNode) { var keepAttributeForNode = typeof attributesToKeepForNode[attrName] != 'undefined'; } return typeof this.NOKEEP_NODE_ATTRIBUTES[ attrName ] != 'undefined' || !keepAttributeForNode || attrName.substring( 0, 2 ) == "on" || attrName.indexOf("xml") == 0 || attrValue.indexOf("function(") >= 0 || (attrName == "href" && attrValue.substring( 0, 11 ) == "javascript:"); }, isConditionalNode : function( node ) { return node && typeof this.CONDITIONAL_NODES[ node.nodeName.toUpperCase() ] != 'undefined'; }, translateNode : function( node ) { var nodeName = this.NODE_NAME_TRANSLATIONS[ node.nodeName.toUpperCase() ] || node.nodeName.toUpperCase(); return (typeof this.SUPPORTED_NODES[ nodeName ] != "undefined") ? nodeName.toLowerCase() : this.NODE_NAME_TRANSLATIONS[ "*" ].toLowerCase(); }, isSupportedNode : function( node ) { return node && typeof this.SUPPORTED_NODES[ node.nodeName.toUpperCase() ] != 'undefined'; }, isRejectedNode : function( node ) { return node && typeof this.REJECTED_NODES[ node.nodeName.toUpperCase() ] != 'undefined'; }, isNonAncestorNode : function( node ) { return node && typeof this.NON_ANCESTOR_NODES[ node.nodeName.toUpperCase() ] != 'undefined'; }, isSelfClosingNode : function( node ) { return node && typeof this.SELF_CLOSING_NODES[ node.nodeName.toUpperCase() ] != 'undefined'; } }; Evernote.ClipRules.KEEP_NODE_ATTRIBUTES = { "a" : { "title": null, "dir" : null, "accesskey": null, "charset": null, "type": null, "name": null, "href": null, "hreflang": null, "rel": null, "rev": null, "shape": null, "coords": null, "target": null }, "abbr" : { "title": null, "dir" : null }, "acronym" : { "title": null, "dir" : null }, "address" : { "title": null, "dir" : null }, "area" : { "title": null, "dir" : null, "accesskey": null, "shape": null, "coords": null, "href": null, "nohref": null, "alt": null, "target": null }, "b" : { "title": null, "dir" : null }, "bdo" : { "title": null, "dir" : null }, "big" : { "title": null, "dir" : null }, "blockquote" : { "title": null, "dir" : null, "cite": null }, "br" : { "title": null, "clear": null }, "caption" : { "title": null, "dir" : null, "align": null }, "center" : { "title": null, "dir" : null }, "cite" : { "title": null, "dir" : null }, "code" : { "title": null, "dir" : null }, "col" : { "title": null, "dir" : null, "span" : null, "width" : null, "align" : null, "char" : null, "charoff" : null, "valign" : null }, "colgroup" : { "title": null, "dir" : null, "span" : null, "width" : null, "align" : null, "char" : null, "charoff" : null, "valign" : null }, "dd" : { "title": null, "dir" : null }, "del" : { "title": null, "dir" : null, "cite" : null, "datetime" : null }, "dfn" : { "title": null, "dir" : null }, "div" : { "title": null, "dir" : null, "align" : null }, "dl": { "title": null, "dir" : null, "compact" : null }, "dt": { "title": null, "dir" : null }, "em": { "title": null, "dir" : null }, "font": { "title": null, "dir" : null, "size" : null, "color" : null, "face" : null }, "h1": { "title": null, "dir" : null, "align" : null }, "h2": { "title": null, "dir" : null, "align" : null }, "h3": { "title": null, "dir" : null, "align" : null }, "h4": { "title": null, "dir" : null, "align" : null }, "h5": { "title": null, "dir" : null, "align" : null }, "h6": { "title": null, "dir" : null, "align" : null }, "hr": { "title": null, "dir" : null, "align" : null, "noshade" : null, "size" : null, "width" : null }, "i": { "title": null, "dir" : null }, "img": { "title": null, "dir" : null, "src" : null, "alt" : null, "name" : null, "longdesc" : null, "height" : null, "width" : null, "usemap" : null, "ismap" : null, "align" : null, "border" : null, "hspace" : null, "vspace" : null }, "en-media": { "type" : null, "hash" : null, "title" : null, "dir" : null, "alt" : null, "longdesc" : null, "height" : null, "width" : null, "usemap" : null, "align" : null, "border" : null, "hspace" : null, "vspace" : null }, "ins": { "title": null, "dir" : null, "cite" : null, "datetime" : null }, "kbd": { "title": null, "dir" : null }, "li": { "title": null, "dir" : null, "type" : null, "value" : null }, "map": { "dir" : null, "title" : null, "name" : null }, "ol": { "title" : null, "dir" : null, "type" : null, "compact" : null, "start" : null }, "p": { "title" : null, "dir" : null, "align" : null }, "pre": { "title" : null, "dir" : null, "width" : null }, "s": { "title" : null, "dir" : null }, "samp": { "title" : null, "dir" : null }, "small": { "title" : null, "dir" : null }, "span": { "title" : null, "dir" : null }, "strike": { "title" : null, "dir" : null }, "strong": { "title" : null, "dir" : null }, "sub": { "title" : null, "dir" : null }, "sup": { "title" : null, "dir" : null }, "table": { "title" : null, "dir" : null, "summary" : null, "width" : null, "border" : null, "cellspacing" : null, "cellpadding" : null, "align" : null, "bgcolor" : null }, "tbody": { "title" : null, "dir" : null, "align" : null, "char" : null, "charoff" : null, "valign" : null }, "td": { "title" : null, "dir" : null, "align" : null, "char" : null, "charoff" : null, "valign" : null, "abbr" : null, "rowspan" : null, "colspan" : null, "nowrap" : null, "bgcolor" : null, "width" : null, "height" : null }, "tfoot": { "title" : null, "dir" : null, "align" : null, "char" : null, "charoff" : null, "valign" : null }, "th": { "title" : null, "dir" : null, "align" : null, "char" : null, "charoff" : null, "valign" : null, "abbr" : null, "rowspan" : null, "colspan" : null, "nowrap" : null, "bgcolor" : null, "width" : null, "height" : null }, "thead": { "title" : null, "dir" : null, "align" : null, "char" : null, "charoff" : null, "valign" : null }, "tr": { "title" : null, "dir" : null, "align" : null, "char" : null, "charoff" : null, "valign" : null, "bgcolor" : null }, "tt": { "title" : null, "dir" : null }, "u": { "title" : null, "dir" : null }, "ul": { "title" : null, "dir" : null, "type" : null, "compact" : null }, "var": { "title" : null, "dir" : null } }; Evernote.ClipRules.NOKEEP_NODE_ATTRIBUTES = { "style" : null, "tabindex" : null }; Evernote.ClipRules.CONDITIONAL_NODES = { "EMBED" : null, "OBJECT" : null, "IMG" : null, "VIDEO" : null }; Evernote.ClipRules.NODE_NAME_TRANSLATIONS = { "HTML" : "DIV", "BODY" : "DIV", "FORM" : "DIV", "CANVAS" : "DIV", "CUFON" : "DIV", "EMBED" : "IMG", "BUTTON" : "SPAN", "INPUT" : "SPAN", "LABEL" : "SPAN", "BDI" : "SPAN", "IMG" : "EN-MEDIA", "*" : "DIV" }; Evernote.ClipRules.SUPPORTED_NODES = { "A" : null, "ABBR" : null, "ACRONYM" : null, "ADDRESS" : null, "AREA" : null, "B" : null, "BUTTON" : null, "BDO" : null, "BIG" : null, "BLOCKQUOTE" : null, "BR" : null, "CAPTION" : null, "CENTER" : null, "CITE" : null, "CODE" : null, "COL" : null, "COLGROUP" : null, "DD" : null, "DEL" : null, "DFN" : null, "DIV" : null, "DL" : null, "DT" : null, "EM" : null, "FONT" : null, "FORM" : null, "H1" : null, "H2" : null, "H3" : null, "H4" : null, "H5" : null, "H6" : null, "HR" : null, "HTML" : null, "I" : null, "IMG" : null, "EN-MEDIA" : null, "INPUT" : null, "INS" : null, "KBD" : null, "LI" : null, "MAP" : null, "OL" : null, "P" : null, "PRE" : null, "Q" : null, "S" : null, "SAMP" : null, "SMALL" : null, "SPAN" : null, "STRIKE" : null, "STRONG" : null, "SUB" : null, "SUP" : null, "TABLE" : null, "TBODY" : null, "TD" : null, "TFOOT" : null, "TH" : null, "THEAD" : null, "TR" : null, "TT" : null, "U" : null, "UL" : null, "VAR" : null }; Evernote.ClipRules.REJECTED_NODES = { "SCRIPT" : null, "LINK" : null, "IFRAME" : null, "STYLE" : null, "SELECT" : null, "OPTION" : null, "OPTGROUP" : null, "NOSCRIPT" : null, "PARAM" : null, "HEAD" : null, "EVERNOTEDIV" : null, "CUFONTEXT" : null, "NOEMBED" : null }; Evernote.ClipRules.NON_ANCESTOR_NODES = { "OL" : null, "UL" : null, "LI" : null }; Evernote.ClipRules.SELF_CLOSING_NODES = { "IMG" : null, //"INPUT" : null, "BR" : null }; // ]]>// = 0 ) { var tmp = list[ i ]; extList.push( tmp.replace( "+", "" ) ); } else { extList.push( name + "-" + list[ i ] ); } } return extList; } return null; }; Evernote.ClipStyle.STYLE_ATTRIBUTES = { "bgcolor":"background-color", "text":"color" }; Evernote.ClipStyle.INHERITED_STYLES = [ "azimuth", "border-collapse", "border-spacing", "caption-side", "color", "cursor", "direction", "elevation", "empty-cells", "font-family", "font-size", "font-style", "font-weight", "font", "letter-spacing", "line-height", "list-style-image", "list-style-position", "list-style-type", "list-style", "orphans", "pitch-range", "pitch", "quotes", "richness", "speak-header", "speak-numeral", "speak-punctuation", "speak", "speak-rate", "stress", "text-align", "text-indent", "text-transform", "visibility", "voice-family", "volume", "white-space", "widows", "word-spacing" ]; Evernote.ClipStyle.prototype._collection = null; Evernote.ClipStyle.prototype._filterFn = null; Evernote.ClipStyle.prototype._styleList = null; Evernote.ClipStyle.prototype.initialize = function ( css, filterFn, styleList ) { Evernote.Logger.debug( "ClipStyle.initialize()" ); this._collection = new Evernote.StylesCollection(); Evernote.Logger.debug( "ClipStyle.initialize: collection initialized()" ); this._filterFn = (typeof filterFn == "function") ? filterFn : null; this._styleList = (styleList != null) ? styleList : Evernote.ClipStyle.STYLES; if(css) { if ( window.CSSStyleDeclaration && css instanceof window.CSSStyleDeclaration ) { this.addStyle( css, this._styleList ); } else if ( window.CSSStyleRule && css instanceof window.CSSStyleRule ) { this.addStyle( css.style, this._styleList ); } else if ( (window.CSSRuleList && css instanceof window.CSSRuleList) || css instanceof Array ) { for ( var i = 0; i < css.length; ++i ) { this.addStyle( css[ i ].style, this._styleList ); } } else if ( typeof css == 'object' && css != null ) { this.addStyle( css, this._styleList ); } } Evernote.Logger.debug( "ClipStyle.initialize() end "); }; Evernote.ClipStyle.prototype.fixBackground = function ( prop, value ) { if(prop && value) { if(prop.indexOf("background-image") != -1 && value.indexOf("url") != -1) { Evernote.Logger.debug("Start replace"); var regExp = /url((.*?))/; var res = value.replace(regExp, "url('$1')").replace(/('")|("')|('')/g, "'"); Evernote.Logger.debug("End replace"); return Evernote.GlobalUtils.escapeXML(res); } } return value; }; Evernote.ClipStyle.prototype.addStyle = function ( style, styleList ) { Evernote.Logger.debug( "ClipStyle.addStyle()" ); if ( window.CSSStyleDeclaration && style instanceof window.CSSStyleDeclaration && style.length > 0 ) { var list = (styleList != null) ? styleList : this._styleList; for ( var i = 0; i < list.length; ++i ) { var prop = list[ i ]; var value = Evernote.StyleElementExtension.getPropertyValue(style, prop ); var importantPriority = !!((style.getPropertyPriority(prop) == 'important')); value = this.fixBackground(prop, value); this.addSimpleStyle( prop, value, importantPriority ); } } else if ( style instanceof Evernote.ClipStyle ) { list = (styleList != null) ? styleList : style.getStylesNames(); for ( var i = 0; i < list.length; ++i ) { var prop = list[ i ]; value = style.getStyle( prop ); importantPriority = style.isImportant( prop ); value = this.fixBackground(prop, value); this.addSimpleStyle( prop, value, importantPriority ); } } else if ( typeof style == 'object' && style != null ) { list = (styleList != null) ? styleList : style; for ( var prop in list ) { // In some cases, attempt to get currentStyle.outline ( or outlineWidth ) property in IE8 throws // 'unspecified error' and crash whole serilization process. So we wrap it into try {...} catch. try { if ( list.hasOwnProperty( prop ) ) { var usedStyle = style[ prop ]; var pName = prop; if(!usedStyle) { usedStyle = style [list[prop]]; pName = list[prop]; if(!usedStyle) { var propName = Evernote.IEStylePropertiesMapping.getPropertyNameFor(list[prop]); if(propName) { usedStyle = style[propName[1]]; } } } usedStyle = this.fixBackground(pName, usedStyle); this.addSimpleStyle( pName, usedStyle ); } } catch (err) {} } } }; Evernote.ClipStyle.prototype.removeStyle = function ( style ) { Evernote.Logger.debug( "ClipStyle.removeStyle()" ); if(style) { if ( window.CSSStyleDeclaration && Evernote.Utils.isInstanceOf(style, window.CSSStyleDeclaration) || style instanceof Array ) { for ( var i = 0; i < style.length; ++i ) { this.removeSimpleStyle( style[ i ] ); } } else if ( style instanceof Evernote.ClipStyle ) { var stylesNames = style.getStylesNames(); for ( i = 0; i < stylesNames.length; ++i ) { this.removeSimpleStyle( stylesNames[ i ] ); } } else if ( typeof style == 'string' ) { this.removeSimpleStyle( style ); } } Evernote.Logger.debug("ClipStyle.removeStyle() end") }; Evernote.ClipStyle.prototype.mergeStyle = function ( style, override ) { Evernote.Logger.debug( "ClipStyle.mergeStyle()" ); if ( style instanceof Evernote.ClipStyle ) { var stylesNames = style.getStylesNames(); for ( var i = 0; i < stylesNames.length; ++i ) { var styleName = stylesNames[ i ]; var styleValue = this._collection.getStyle( styleName ); if ( styleValue == null || override || (style.isImportant( styleName ) && !this._collection.isImportant( styleName )) ) { var newValue = style.getStyle( styleName ); if ( style.isImportant( styleName ) ) { this._collection.addStyle( styleName, newValue, true ); } else if ( override && !this._collection.isImportant( styleName ) ) { this._collection.addStyle( styleName, newValue, false ); } else if ( styleValue == null && !override ) { this._collection.addStyle( styleName, newValue, style.isImportant( styleName ) ); } } } } }; Evernote.ClipStyle.prototype.getStylesNames = function () { return this._collection.getStylesNames(); }; Evernote.ClipStyle.prototype.getStyle = function ( prop ) { return this._collection.getStyle( prop ); }; Evernote.ClipStyle.prototype.isImportant = function ( prop ) { return this._collection.isImportant( prop ); }; Evernote.ClipStyle.prototype.addSimpleStyle = function ( prop, value, importantPriority ) { if ( typeof this._filterFn == "function" && !this._filterFn( prop, value ) ) { return; } var impl = Evernote.StylesReplacementRegistry.getImplementationFor(prop); if(impl && impl.getValue) { value = impl.getValue(value); } this._collection.addStyle( prop, value, importantPriority ); }; Evernote.ClipStyle.prototype.removeSimpleStyle = function ( prop ) { this._collection.removeStyle( prop ); }; Evernote.ClipStyle.prototype.toString = function () { var str = ""; var stylesNames = this.getStylesNames(); for ( var i = 0; i < stylesNames.length; ++i ) { var styleName = stylesNames[ i ]; var value = this._collection.getStyle( styleName ); if ( value != null && value.length > 0 ) { str += styleName + ":" + value + ";"; } } return str; }; Evernote.ClipStyle.CSSDefaultStyle = { "background-attachment": "scroll", "background-color" : "transparent", "background-image" : "none", "background-position-x" : "0px", "background-position-y" : "0px", "background-repeat" : "repeat", "border-bottom-style" : "none", "border-bottom-width" : "medium", "border-left-style" : "none", "border-left-width" : "medium", "border-right-style" : "none", "border-right-width" : "medium", "border-top-style" : "none", "border-top-width" : "medium", "border-collapse" : "separate", "bottom" : "auto", "clear" : "none", "height" : "auto", "left" : "auto", "margin-bottom" : "0px", "margin-left" : "0px", "margin-right" : "0px", "margin-top" : "0px", "max-height" : "none", "max-width" : "none", "min-height" : "0px", "min-width" : "0px", "overflow" : "visible", "overflow-x" : "visible", "overflow-y" : "visible", "padding" : "0px", "padding-bottom" : "0px", "padding-left" : "0px", "padding-right" : "0px", "padding-top" : "0px", "page-break-before" : "auto", "page-break-after" : "auto", "position" : "static", "right" : "auto", "text-align" : "left", "text-decoration" : "none", "text-indent" : "0px", "text-overflow" : "clip", "top" : "auto", "width" : "auto" }; Evernote.ClipStyle.prototype.removeDefaultCssStyle = function () { var stylesNames = this.getStylesNames(); for ( var i = 0; i < stylesNames.length; ++i ) { var styleName = stylesNames[ i ]; var defaultCssValue = Evernote.ClipStyle.CSSDefaultStyle[styleName]; var value = this.getStyle( styleName ); if (!value) continue; if (defaultCssValue == value) { this.removeStyle(styleName); } } }; // ]]>// // = PARSING_TIMEOUT_INTERVAL ) { Evernote.Logger.debug("Parsing interval timeout: " + (endTimeParsing - startTimeParsing)); parsingEnd = false; break; } } if (parsingEnd) { Evernote.Logger.debug("Parsing end"); callback(); }else { Evernote.Logger.debug("Parsing repeat"); setTimeout(asyncParser, 0); } }; setTimeout(asyncParser, 0); }; /** * Starts parsing from specified root. * @param root - starting DOM node. * @param fullPage - is user selects to serialize the full page * @param serializer - current serializer to be used to serialize the DOM node to string */ Evernote.DomParser.prototype.parse = function ( root, fullPage, serializer ) { Evernote.Logger.debug( "DomParser.parse()" ); if ( !root ) { throw new Error( "No root element for parsing" ); } var node = root; var parentNode = null; while ( node ) { if ( node != root && node.parentNode ) { parentNode = node.parentNode.serializedNode; } if ( this.isNodeForSerialize( node ) ) { if ( node.nodeType == Evernote.Node.TEXT_NODE ) { serializer.textNode( node, this._range ); } else if ( node.nodeType == Evernote.Node.ELEMENT_NODE && this.isNodeVisible( node ) ) { node.serializedNode = serializer.startNode( new Evernote.SerializedNode( node, parentNode ), root, fullPage ); if ( node.hasChildNodes() ) { node = node.childNodes[ 0 ]; continue; } else { serializer.endNode( node.serializedNode ); if ( node.serializedNode ) { try { delete node.serializedNode; } catch(e) { //If we are failed to delete the property, than just set it to undefined node.serializedNode = undefined; } } } } } /** * Check if there is a next node available and it is not the root */ if ( node.nextSibling && node != root ) { node = node.nextSibling; } else if ( node != root ) { while ( node.parentNode && node != root ) { node = node.parentNode; try { serializer.endNode( node.serializedNode ); } catch (err) { node.serializedNode = undefined; continue; }; try { delete node.serializedNode; } catch (e) { //If we are failed to delete the property, than just set it to undefined node.serializedNode = undefined; } if ( node.nextSibling && node != root ) { node = node.nextSibling; break; } } if ( node == root ) { break; } } else { break; } } }; // ]]>// = 0; inhI-- ) { var inhStyle = inhBgStyle[inhI]; this._serializedDom += ""; serializedNode.translateTo.push( "div" ); } var pseudoStyle = this._styleStrategy.getNodeStyle( node, null, ":before" ); if ( fullPage && node.nodeName.toLowerCase() == "body" ) { var wrapBodyStyle = new Evernote.ClipStyle( nodeStyle, null, Evernote.ClipStyle.CSS_GROUP.getExtForStyle( "background" ) ); this._serializedDom += ""; serializedNode.translateTo.push( "div" ); var bgGroup = Evernote.ClipStyle.CSS_GROUP.getExtForStyle( "background" ); for ( var ind in bgGroup ) { if ( bgGroup.hasOwnProperty( ind ) ) { nodeStyle.removeStyle( bgGroup[ind] ); } } } if ( !fullPage && node == root ) { nodeStyle.removeStyle( "float" ); } if ( !serializedNode.node.hasChildNodes() && !(nodeStyle.getStyle( "height" ) || node.getAttribute( "height" )) ) { nodeStyle.addStyle( {height:"0px"} ); } if ( !serializedNode.node.hasChildNodes() && !(nodeStyle.getStyle( "width" ) || node.getAttribute( "width" )) ) { nodeStyle.addStyle( {width:"0px"} ); } if(nodeStyle.getStyle("position") == "fixed") { nodeStyle.addStyle({position: "absolute"}); } if ( (node.nodeName.toUpperCase() == "SPAN"/* || node.nodeName.toUpperCase() == "A"*/) && node.getElementsByTagName( "IMG" ).length > 0) { nodeName = "div"; if ( !nodeStyle.getStyle( "display" ) ) nodeStyle.addStyle( {display:"inline"} ); } if (node.nodeName.toUpperCase() == "TH" || node.nodeName.toUpperCase() == "TD") { nodeStyle.addStyle( {display:"table-cell"} ); } nodeStyle.removeDefaultCssStyle(); this._serializedDom += this.serializePseudoElement( node, pseudoStyle ); stylesStr = this.serializeStyles( node, nodeStyle ); if ( (nodeName.toLowerCase() == "div" /*|| nodeName.toLowerCase() == "span"*/) && nodeStyle.getStyle( "float" ) && nodeStyle.getStyle( "float" ) != "none" && serializedNode.parentNode && node.parentNode.nodeName.toLowerCase() != "a" ) { if ( !serializedNode.node.nextSibling || serializedNode.node.nextSibling.nodeType == 3 ) serializedNode.parentNode.isInlineBlock = true; } } Evernote.Logger.debug( node.nodeName + " " + attrsStr + " -> " + nodeName + " " + stylesStr ); this._serializedDom += ""; serializedNode.setStyle(nodeStyle); serializedNode.translateTo.push( nodeName ); return serializedNode; } catch ( e ) { Evernote.Logger.error( "Failed to start serialize node :" + e ); throw e; } }; Evernote.NodeSerializer.prototype.serializePseudoElement = function ( node, pseudoStyle ) { try { var nodeName = Evernote.ClipRules.translateNode( node ); if ( pseudoStyle.getStylesNames().length > 0 ) { var content = " "; if ( pseudoStyle.getStyle( "content" ) ) { content = pseudoStyle.getStyle( "content" ); pseudoStyle.removeStyle( "content" ); } var beforeStylesStr = this.serializeStyles( node, pseudoStyle ); return "" + content.replace( /"/g, '' ) + ""; } return ""; } catch ( e ) { Evernote.Logger.error( "Failed to serialize pseudo element :" + e ); throw e; } }; Evernote.NodeSerializer.prototype.textNode = function ( node, range ) { this._serializedDom += this.serializeTextNode( node, range ); }; Evernote.NodeSerializer.prototype.endNode = function ( serializedNode ) { try { Evernote.Logger.debug( "end serialize node :" + serializedNode.translateTo ); if ( serializedNode.isInlineBlock ) { var name = "div"; if ( serializedNode.node.nodeName.toLowerCase() == "ul" ) { name = "li" } this._serializedDom += "" + " " + "" } var node = serializedNode.node; var serializedPseudo = ""; var pseudoStyle = new Evernote.ClipStyle(); if ( this._styleStrategy ) { pseudoStyle = this._styleStrategy.getNodeStyle( node, null, ":after" ); if ( pseudoStyle.getStylesNames().length > 0 ) { var floatStyle = serializedNode.getStyle().getStyle( "float" ); if ( floatStyle && !pseudoStyle.getStyle( "float" ) ) pseudoStyle.addStyle( { "float" : floatStyle } ); if ( node.nodeName.toLowerCase() == "ul" ) serializedPseudo = this.serializePseudoElement( document.createElement( "div" ), pseudoStyle ); } } while ( serializedNode.translateTo.length > 0 ) { var nodeName = serializedNode.translateTo.pop(); if ( !Evernote.ClipRules.isSelfClosingNode( serializedNode.node ) ) { if ( !serializedNode.node.hasChildNodes() ) this._serializedDom += " "; } if ( nodeName.toLowerCase() == "ul" ) { this._serializedDom += this.serializePseudoElement( document.createElement( "li" ), pseudoStyle ); } this._serializedDom += ""; } this._serializedDom += serializedPseudo; } catch ( e ) { Evernote.Logger.error( "Failed to end serialize node :" + e ); throw e; } }; Evernote.NodeSerializer.prototype.serializeTextNode = function ( node, range ) { Evernote.Logger.debug( "DomSerializer.serializeTextNode()" ); try { var nodeValue = node.nodeValue; if ( !range ) { return Evernote.Utils.htmlEncode( nodeValue ); } else { if ( range.startContainer == node && range.startContainer == range.endContainer ) { return Evernote.Utils.htmlEncode( nodeValue.substring( range.startOffset, range.endOffset ) ); } else if ( range.startContainer == node ) { return Evernote.Utils.htmlEncode( nodeValue.substring( range.startOffset ) ); } else if ( range.endContainer == node ) { return Evernote.Utils.htmlEncode( nodeValue.substring( 0, range.endOffset ) ); } else if ( range.commonAncestorContainer != node ) { return Evernote.Utils.htmlEncode( nodeValue ); } } } catch ( e ) { Evernote.Logger.error( "DomSerializer.serializeTextNode() failed " + e ); throw e; } return ""; }; Evernote.NodeSerializer.prototype.serializeConditionalNode = function ( node, root, fullPage ) { Evernote.Logger.debug( "DomSerializer.serializeConditionalNode()" ); var impl = Evernote.ElementSerializerFactory.getImplementationFor( node ); if ( typeof impl == 'function' ) { var nodeStyle = (this._styleStrategy) ? this._styleStrategy.styleForNode( node, root, fullPage ).evaluated : null; if (nodeStyle) nodeStyle.removeDefaultCssStyle(); var serializer = new impl( node, nodeStyle ); var content = serializer.serialize( this._docBase ); var imageUrl = serializer.getImageUrl(); return { content:content, imageUrl:imageUrl, nodeStyle:nodeStyle }; } return { content:"", imageUrl:"", nodeStyle:new Evernote.ClipStyle() }; }; Evernote.NodeSerializer.prototype.serializeAttributes = function ( node ) { Evernote.Logger.debug( "DomSerializer.serializeAttributes()" ); try { var attrs = node.attributes; var str = ""; for ( var i = 0; i < attrs.length; ++i ) { if ( !Evernote.ClipRules.isNoKeepNodeAttr( attrs[ i ], Evernote.ClipRules.translateNode( node ), node ) ) { var attrValue = (attrs[ i ].value) ? Evernote.GlobalUtils.escapeXML( attrs[ i ].value ) : ""; if ( (attrs[ i ].name.toLowerCase() == "src" || attrs[ i ].name.toLowerCase() == "href") && attrValue.toLowerCase().indexOf( "http" ) != 0 ) { attrValue = Evernote.Utils.makeAbsolutePath( this._docBase, attrValue ); } str += " " + attrs[ i ].name.toLowerCase() + "="" + attrValue + """; } } return str; } catch ( e ) { Evernote.Logger.error( "DomSerializer.serializeAttributes() failed: error = " + e ); } return ""; }; Evernote.NodeSerializer.prototype.serializeStyles = function ( node, nodeStyle ) { Evernote.Logger.debug( "DomSerializer.serializeStyles()" ); try { var str = ""; if(node.nodeName.toLowerCase() == "map") { //Map should not have style attribute according to Evernote DTD return ""; } if ( node && nodeStyle instanceof Evernote.ClipStyle ) { str += " style="" + nodeStyle.toString().replace( /"/g, "" ) + """; } return str; } catch ( e ) { Evernote.Logger.error( "DomSerializer.serializeStyles() failed: error = " + e ); throw e; } return ""; }; Evernote.NodeSerializer.prototype.getDocumentBase = function () { Evernote.Logger.debug( "DomSerializer.getDocumentBase()" ); if ( !this._docBase ) { var baseTags = this._tab.document.getElementsByTagName( "base" ); for ( var i = 0; i < baseTags.length; ++i ) { var baseTag = baseTags[ i ]; if ( typeof baseTag == 'string' && baseTag.indexOf( "http" ) == 0 ) { this._docBase = baseTag; } if ( this._docBase ) { break; } } if ( !this._docBase ) { var location = this._tab.document.location; this._docBase = location.protocol + "//" + location.host + location.pathname.replace( /[^/]+$/, "" ); } } return this._docBase; }; Evernote.NodeSerializer.prototype.getImagesUrls = function () { return this._imagesUrls; }; Evernote.NodeSerializer.prototype.getSerializedDom = function () { return '' + this._serializedDom.replace(/[^u0009u000au000du0020-uD7FFuE000-uFFFD]+/g, "") + ''; }; // ]]>// // //  "; } catch ( e ) { Evernote.Logger.error( "DataImageSerializer.serialize() failed: error = " + e ); } return ""; }; // ]]>//  "; } catch ( e ) { Evernote.Logger.error( "VideoElementSerializer.serialize() failed: error = " + e ); } return ""; }; // ]]>// * - the URL of the document containing EMBED * - iframe's src attribute that embeds the video via an iframe * - src attribute of the embed object (though on actualy youtube.com it's not possible) * * * Sample URLs are: * * * http: //www.youtube.com/embed/IWJJBwKhvp4?wmode=opaque&rel=0 * http: //www.youtube.com/v/YZEbBZ2IrXE?version=3&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1 * http: //www.youtube.com/v/J3mjFSTsKiM&hl=en&fs=1 * http://www.youtube.com/watch?v=cAcxHQalWOw * http://www.youtube.com/user/IFiDieApp?v=sdzCELofGgE&feature=pyv * */ Evernote.YoutubeElementSerializer = function YoutubeElementSerializer( doc, node, nodeStyle ) { this.initialize( doc, node, nodeStyle ); }; Evernote.inherit( Evernote.YoutubeElementSerializer, Evernote.AbstractElementSerializer, true ); Evernote.YoutubeElementSerializer.WATCH_URL_REGEX = /^https?://www.youtube.com/watch?.*v=([^&]+)/i; Evernote.YoutubeElementSerializer.USER_CHANNEL_URL_REGEX = /^https?://www.youtube.com/user/([a-zA-Z0-9]+)?v=([^&]+)/i; Evernote.YoutubeElementSerializer.EMBED_URL_REGEX = /^https?://www.youtube.com/embed/([^/?&]+)/i; Evernote.YoutubeElementSerializer.VIDEO_URL_REGEX = /^https?://www.youtube.com/v/([^/?&]+)/i; Evernote.YoutubeElementSerializer.POSSIBLE_CONTAINER_NODES = [ "OBJECT" ]; Evernote.YoutubeElementSerializer.VIDEO_NODES = [ "EMBED", "IFRAME" ]; Evernote.YoutubeElementSerializer.WATCH_URL = "http://www.youtube.com/watch?v=$videoId$"; Evernote.YoutubeElementSerializer.USER_CHANNEL_URL = "http://www.youtube.com/user/$userId$?v=$videoId$"; Evernote.YoutubeElementSerializer.DEFAULT_THUMB_URL = "https://i2.ytimg.com/vi/$videoId$/default.jpg"; Evernote.YoutubeElementSerializer.HQ_THUMB_URL = "https://i2.ytimg.com/vi/$videoId$/hqdefault.jpg"; Evernote.YoutubeElementSerializer.DEFAULT_THUMB_WIDTH = 120; Evernote.YoutubeElementSerializer.DEFAULT_THUMB_HEIGHT = 90; Evernote.YoutubeElementSerializer.isResponsibleFor = function( node ) { var params = this.extractVideoParamsFromNode( node ); return (params) ? true : false; }; Evernote.YoutubeElementSerializer.extractVideoParamsFromNode = function( node ) { Evernote.Logger.debug( "YoutubeElementSerializer.extractVideoIdFromNode()" ); try { if ( node && node.nodeType == Evernote.Node.ELEMENT_NODE ) { var view = window; try { view = node.ownerDocument.defaultView; } catch ( e ) { } var matches = null; if ( view && (node.nodeName.toLowerCase() == "embed" || node.nodeName.toLowerCase() == "object") && view.location ) { if ( (matches = view.location.href.match( this.WATCH_URL_REGEX )) && matches[ 1 ] ) { return matches[ 1 ]; } else if ( (matches = view.location.href.match( this.USER_CHANNEL_URL_REGEX )) && matches[ 1 ] && matches[ 2 ] ) { return [ matches[ 1 ], matches[ 2 ] ]; } } else { var videoNode = this.findVideoNode( node ); if ( videoNode ) { var src = videoNode.getAttribute( "src" ); if ( src && (matches = src.match( this.EMBED_URL_REGEX )) && matches[ 1 ] ) { return matches[ 1 ]; } else if ( src && (matches = src.match( this.VIDEO_URL_REGEX )) && matches[ 1 ] ) { return matches[ 1 ]; } } } } } catch(e) { Evernote.Logger.error("failed to YoutubeElementSerializer.extractVideoParamsFromNode due to error " + e); } return null; }; Evernote.YoutubeElementSerializer.findVideoNode = function( node ) { Evernote.Logger.debug( "YoutubeElementSerializer.findVideoNode()" ); if ( node && node.nodeType == Evernote.Node.ELEMENT_NODE ) { if ( Evernote.ArrayExtension.indexOf(this.VIDEO_NODES, node.nodeName.toUpperCase() ) >= 0 ) { return node; } else if ( Evernote.ArrayExtension.indexOf(this.POSSIBLE_CONTAINER_NODES, node.nodeName.toUpperCase() ) >= 0 ) { try { var it = node.ownerDocument.createNodeIterator( node, NodeFilter.SHOW_ELEMENT, null, false ); var next = null; while ( next = it.nextNode() ) { if ( Evernote.ArrayExtension.indexOf(this.VIDEO_NODES, next.nodeName.toUpperCase() ) >= 0 ) { return next; } } } catch(e) { //We ignore exception here, because if node iterator is not supported, than we could skip old pages (not Youtube). return null; } } } return null; }; Evernote.YoutubeElementSerializer.prototype._imageUrl = ""; Evernote.YoutubeElementSerializer.prototype.serialize = function( /*docBase*/ ) { Evernote.Logger.debug( "YoutubeElementSerializer.serialize()" ); try { var userId = null; var videoId = null; var params = this.constructor.extractVideoParamsFromNode( this._node ); if ( params instanceof Array ) { userId = params[ 0 ]; videoId = params[ 1 ]; } else if ( typeof params == "string" ) { videoId = params; } if ( videoId ) { var thumbUrl = null; var w = 0; var h = 0; if ( this._nodeStyle ) { var view = window; try { view = this._node.ownerDocument.defaultView; } catch ( e ) { } var computedStyles = Evernote.ElementExtension.getComputedStyle( this._node, null, view ); w = parseInt( Evernote.StyleElementExtension.getPropertyValue(computedStyles, "width" ) ); w = (isNaN( w )) ? 0 : w; h = parseInt( Evernote.StyleElementExtension.getPropertyValue(computedStyles, "height" ) ); h = (isNaN( h )) ? 0 : h; if ( w < this.constructor.DEFAULT_THUMB_WIDTH || h < this.constructor.DEFAULT_THUMB_HEIGHT ) { thumbUrl = this.getDefaultThumbnailUrl( videoId ); } else { thumbUrl = this.getHQThumbnailUrl( videoId ); } } else { thumbUrl = this.getDefaultThumbnailUrl( videoId ); } if ( thumbUrl ) { var styleStr = (this._nodeStyle instanceof Evernote.ClipStyle) ? ("style="" + this._nodeStyle.toString() + """) : ""; var attrs = this._node.attributes; var attrStr = ""; for ( var i = 0; i < attrs.length; ++i ) { var attr = attrs[ i ]; if(Evernote.ClipRules.KEEP_NODE_ATTRIBUTES["a"][attr.name]) { attrStr += attr.name; if ( attr.value ) { attrStr += "=" + attr.value; } attrStr += " "; } } var href = ( userId ) ? this.getUserChannelUrl( userId, videoId ) : this.getWatchUrl( videoId ); var imgAttrStr = ""; if ( w && h ) { var k = w / h; // scale by height if ( k > this.constructor.DEFAULT_THUMB_WIDTH / this.constructor.DEFAULT_THUMB_HEIGHT ) { imgAttrStr += "height="" + h + """; } else { // scale by width imgAttrStr += "width="" + w + """; } } this._imageUrl = thumbUrl; return ""; } } } catch ( e ) { Evernote.Logger.error( "YoutubeElementSerializer.serialize() failed: error = " + e ); } return ""; }; Evernote.YoutubeElementSerializer.prototype.getDefaultThumbnailUrl = function( videoId ) { return this.constructor.DEFAULT_THUMB_URL.replace( /$videoId$/, videoId ); }; Evernote.YoutubeElementSerializer.prototype.getHQThumbnailUrl = function( videoId ) { return this.constructor.HQ_THUMB_URL.replace( /$videoId$/, videoId ); }; Evernote.YoutubeElementSerializer.prototype.getWatchUrl = function( videoId ) { return this.constructor.WATCH_URL.replace( /$videoId$/, videoId ); }; Evernote.YoutubeElementSerializer.prototype.getUserChannelUrl = function( userId, videoId ) { return this.constructor.USER_CHANNEL_URL.replace( /$userId$/, userId ).replace( /$videoId$/, videoId ); }; Evernote.YoutubeElementSerializer.prototype.getImageUrl = function() { return this._imageUrl; }; // ]]>// // // // // // // // // // //  
 

  Basse Saison

Du 08/12 au 16/12

Du 13/01 au 10/02
 
Du 07/04 au 16/04

Moyenne Saison

Du 16/12 au 23/12
 
Du 10/03 au 07/04

Haute Saison

Du 23/12 au 13/01
 
Du 10/02 au 10/03

Occupation double170 €180 €220 €
Occupation single160 €170 €210 €

 

 

 Saison d'été

De fin juin à septembre

 
Occupation double120 €