├── LICENSE ├── OEBPS ├── ch01.html ├── content.opf ├── epub.css ├── toc.ncx └── toc01.html ├── README.md ├── ibooks_ereader_detector.epub └── mimetype /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Sanders Kleinfeld 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /OEBPS/ch01.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | iBooks Ereader Detector 6 | 7 | 8 |
9 |
10 |

iBooks Ereader Detector

11 |

You are likely reading this ebook:

12 | 16 |

Now back to your regularly scheduled fiction…

17 |
18 |

It was a dark and stormy night; the rain fell in torrents, except at occasional 19 | intervals, when it was checked by a violent gust of wind which swept up the streets (for 20 | it is in London that our scene lies), rattling along the house-tops, and fiercely 21 | agitating the scanty flame of the lamps that struggled against the darkness. Through one 22 | of the obscurest quarters of London, and among haunts little loved by the gentlemen of the 23 | police, a man, evidently of the lowest orders, was wending his solitary way. He stopped 24 | twice or thrice at different shops and houses of a description correspondent with the 25 | appearance of the quartier in which they were situated, and tended inquiry for some 26 | article or another which did not seem easily to be met with. All the answers he received 27 | were couched in the negative; and as he turned from each door he muttered to himself, in 28 | no very elegant phraseology, his disappointment and discontent. At length, at one house, 29 | the landlord, a sturdy butcher, after rendering the same reply the inquirer had hitherto 30 | received, added, "But if this vill do as vell, Dummie, it is quite at your sarvice!" 31 | Pausing reflectively for a moment, Dummie responded that he thought the thing proffered 32 | might do as well; and thrusting it into his ample pocket, he strode away with as rapid a 33 | motion as the wind and the rain would allow. He soon came to a nest of low and dingy 34 | buildings, at the entrance to which, in half-effaced characters, was written "Thames 35 | Court." Halting at the most conspicuous of these buildings, an inn or alehouse, through 36 | the half-closed windows of which blazed out in ruddy comfort the beams of the hospitable 37 | hearth, he knocked hastily at the door. He was admitted by a lady of a certain age, and 38 | endowed with a comely rotundity of face and person.

39 |

"Hast got it, Dummie?" said she, quickly, as she closed the door on the guest.

40 |

"Noa, noa! not exactly; but I thinks as 'ow—"

41 |
42 | 43 | 44 | -------------------------------------------------------------------------------- /OEBPS/content.opf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | sandersk_ibooks_ereader_detector 5 | sandersk_ibooks_ereader_detector 6 | iBooks Ereader Detector 7 | iBooks Ereader Detector 8 | en 9 | Sanders Kleinfeld 10 | en 11 | 2014-12-25T00:10:34Z 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /OEBPS/epub.css: -------------------------------------------------------------------------------- 1 | /* Media query order matters here, as content of later media queries will override that of earlier ones) */ 2 | 3 | /* Default responses */ 4 | 5 | #platform_device::after { 6 | content: "an ereader other than iBooks"; 7 | } 8 | 9 | #orientation::after { 10 | content: "either portrait or landscape mode"; 11 | } 12 | 13 | /* Default orientation handling */ 14 | 15 | @media (orientation:landscape) { 16 | #orientation::after { 17 | content: "landscape mode"; 18 | } 19 | } 20 | 21 | @media (orientation:portrait) { 22 | #orientation::after { 23 | content: "portrait mode"; 24 | } 25 | } 26 | 27 | /* iBooks Platform Queries */ 28 | 29 | /* iBooks Desktop "device" pixel dimensions (tested on MacBook Retina) */ 30 | @media (min-device-width:1440px) and (max-device-width:2147483646px) { 31 | #platform_device::after { 32 | content: "iBooks Desktop for Mac"; 33 | } 34 | /* Cannot find way to determine orientation or two-up view b/c 35 | RS window can be resized at will and each page is separate viewport, 36 | so no definitive max/min widths to rely on, and aspect-ratio queries 37 | do not appear to be reliable */ 38 | #orientation::after { 39 | content: "either portrait or landscape mode"; 40 | } 41 | } 42 | 43 | /* Standard iPad device pixel dimensions */ 44 | @media (min-device-width:768px) and (max-device-width:1024px) { 45 | #platform_device::after { 46 | content: "iBooks for iPad"; 47 | } 48 | } 49 | 50 | /* Standard iPad device pixel dimensions + two-up landscaped viewport 51 | (in landscape view for iPad, each page is a separate viewport which is 52 | less than 480 px) */ 53 | @media (min-device-width:768px) and (max-device-width:1024px) and 54 | (max-width: 480px) { 55 | #orientation::after { 56 | content: "landscape mode (two-up view)"; 57 | } 58 | } 59 | 60 | /* Should work on iPhone 5s and below */ 61 | @media (max-device-width:480px) { 62 | #platform_device::after { 63 | content: "iBooks for iPhone"; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /OEBPS/toc.ncx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | iBooks Ereader Detector 9 | 10 | 11 | 12 | 13 | iBooks Ereader Detector 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /OEBPS/toc01.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | iBooks Ereader Detector 6 | 7 | 8 | 9 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | iBooks Ereader Detector 2 | ======================= 3 | 4 | EPUB 3 file that uses media queries to identify which iBooks platform is in use. 5 | 6 | Download the file ibooks_ereader_detector.epub and load to iBooks for iPhone/iPad/Desktop. iBooks will display 7 | text indicating which of these platforms is in use, and (when possible) whether iBooks is in portrait, landscape, 8 | or two-up mode, e.g. 9 | 10 | > You are likely reading this ebook 11 | > * On iBooks for iPad 12 | > * In portrait mode 13 | 14 | See epub.css file for annotated list of media queries used. Please feel free to make issues to report bugs and 15 | submit pull requests to suggest improvements 16 | 17 | ## Platforms tested 18 | 19 | ibooks_ereader_detector.epub has been tested on the following platforms: 20 | 21 | * iBooks 4 for iPad 3 Retina 22 | * iBooks 4 for iPhone 5S 23 | * iBooks Desktop for Mac on MacBook Pro Retina 24 | 25 | Acknowledgments to Derrick Schultz and Liza Daly for 26 | their work and reports regarding testing media queries for iBooks. 27 | -------------------------------------------------------------------------------- /ibooks_ereader_detector.epub: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sandersk/ibooks_ereader_detector/382ff0f0ba31ff3a8fa19376298868e363ed025e/ibooks_ereader_detector.epub -------------------------------------------------------------------------------- /mimetype: -------------------------------------------------------------------------------- 1 | application/epub+zip --------------------------------------------------------------------------------