diff --git a/web/compatibility.js b/web/compatibility.js old mode 100644 new mode 100755 index d286692b1..e9a769163 --- a/web/compatibility.js +++ b/web/compatibility.js @@ -148,10 +148,39 @@ Function.prototype.bind = function(obj) { var fn = this, headArgs = Array.prototype.slice.call(arguments, 1); - var binded = function(tailArgs) { - var args = headArgs.concat(tailArgs); + var bound = function() { + var args = Array.prototype.concat.apply(headArgs, arguments); return fn.apply(obj, args); }; - return binded; + return bound; }; })(); + +// IE9 text/html data URI +(function() { + if (document.documentMode !== 9) + return; + // overriding the src property + var originalSrcDescriptor = Object.getOwnPropertyDescriptor( + HTMLIFrameElement.prototype, 'src'); + Object.defineProperty(HTMLIFrameElement.prototype, 'src', { + get: function() { return this.$src; }, + set: function(src) { + this.$src = src; + if (src.substr(0, 14) != 'data:text/html') { + originalSrcDescriptor.set.call(this, src); + return; + } + // for text/html, using blank document and then + // document's open, write, and close operations + originalSrcDescriptor.set.call(this, 'about:blank'); + setTimeout((function() { + var doc = this.contentDocument; + doc.open('text/html'); + doc.write(src.substr(src.indexOf(',') + 1)); + doc.close(); + }).bind(this), 0); + }, + enumerable: true + }); +})(); diff --git a/web/viewer.css b/web/viewer.css old mode 100644 new mode 100755 index bb7da000e..a8578eb7e --- a/web/viewer.css +++ b/web/viewer.css @@ -36,6 +36,11 @@ body { line-height: 32px; } +#controls > button > img { + width: 32px; + height: 32px; +} + #controls > button[disabled] > img { opacity: 0.5; } @@ -159,6 +164,11 @@ span#info { -webkit-box-shadow: 0px 4px 10px #000; } +#sidebarControls > button > img { + width: 32px; + height: 32px; +} + #sidebarControls > button[disabled] > img { opacity: 0.5; }