Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<div class="viewport"></div>
<script src="//cdnjs.cloudflare.com/ajax/libs/three.js/r58/three.min.js"></script>
<script src="//threejs.org/examples/js/controls/OrbitControls.js"></script>

The only requirements for popup footnotes in iBooks are:

  • Ebook has to be an EPUB3
  • epub:type "noteref" and "footnote"

So you can link to a totally separate document, as you normally would for endnotes, but include the attributes so the link behaves differently in iBooks, instead triggering the popup.

Original reference link would look something like this (in a file called ch001.html):

1

//originally published here: http://www.pdsassoc.com/downloads/ReassertParaStyles.js.zip
//rewritten to be CC compliant
//DESCRIPTION: Visit all paragraphs in document and reassert paragraph styles
myStyles = app.activeDocument.allParagraphStyles;
app.findTextPreferences = null;
app.changeTextPreferences = null;
for (var n = 1; myStyles.length > n; n++){
app.findTextPreferences.appliedParagraphStyle = myStyles[n];
app.changeTextPreferences.appliedParagraphStyle = myStyles[n];
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
(function boom(){
@caraya
caraya / CSSOM
Last active August 29, 2015 14:07 — forked from paceaux/CSSOM
window.analyzer = {
init: function (object, id) {
this.functions.appendTable(id);
this.functions.setupHeaders(object);
this.functions.addData(object);
this.functions.addCaption("Analysis of the stylesheets");
},
data: {},
helpers: {
wrapper: function (id) {
@caraya
caraya / rAF.js
Last active August 29, 2015 14:10 — forked from paulirish/rAF.js
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@caraya
caraya / gulpfile.js
Last active August 29, 2015 14:19 — forked from Raynos/gulpfile.js
/*
This is an EXAMPLE gulpfile.js
You'll want to change it to match your project.
Find plugins at https://npmjs.org/browse/keyword/gulpplugin
*/
var gulp = require('gulp');
var uglify = require('gulp-uglify');
gulp.task('scripts', function() {
// Minify and copy all JavaScript (except vendor scripts)
@caraya
caraya / A article post with summary
Last active August 29, 2015 14:26 — forked from yulijia/A article post with summary
[Jekyll] How to create post summary in Freshman21 theme
---
published: true
title: how to create post summary
layout: post
summary: This post show us how to create a post summary step by step.
author: Yu
category: howto
tags:
- summary
---