Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | <!DOCTYPE> |
michael@0 | 2 | <head> |
michael@0 | 3 | <style> |
michael@0 | 4 | body { |
michael@0 | 5 | border: 0px; |
michael@0 | 6 | margin: 0px; |
michael@0 | 7 | padding: 0px; |
michael@0 | 8 | } |
michael@0 | 9 | p:before { |
michael@0 | 10 | content: url(image-exif-270-deg-flip.jpg); |
michael@0 | 11 | } |
michael@0 | 12 | </style> |
michael@0 | 13 | </head> |
michael@0 | 14 | <body> |
michael@0 | 15 | <p></p> |
michael@0 | 16 | |
michael@0 | 17 | <script> |
michael@0 | 18 | var orientation = location.search.substring(1).split("&"); |
michael@0 | 19 | var angle = orientation[0]; |
michael@0 | 20 | var flip = orientation[1] == "flip" ? true : false; |
michael@0 | 21 | |
michael@0 | 22 | // Construct a style. "from-image" is special-cased. |
michael@0 | 23 | var style; |
michael@0 | 24 | if (angle == "from-image") { |
michael@0 | 25 | style = "p { image-orientation: from-image; }\n"; |
michael@0 | 26 | } else { |
michael@0 | 27 | style = "p { image-orientation: " |
michael@0 | 28 | + angle + "deg" |
michael@0 | 29 | + (flip ? " flip" : "") |
michael@0 | 30 | + "; }\n"; |
michael@0 | 31 | } |
michael@0 | 32 | |
michael@0 | 33 | // Apply the style to the document. |
michael@0 | 34 | var sheet = document.createElement('style'); |
michael@0 | 35 | sheet.innerHTML = style; |
michael@0 | 36 | document.body.appendChild(sheet); |
michael@0 | 37 | </script> |
michael@0 | 38 | </body> |