Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: madrobby/zepto
base: 768643a2ad
...
head fork: madrobby/zepto
compare: c9c96b7391
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 50 additions and 0 deletions.
  1. +14 −0 index.html
  2. +36 −0 script/draft
View
14 index.html
@@ -305,6 +305,13 @@ <h2 id=thanks>Acknowledgements &amp; Thanks</h2>
$('script').first().before(s)
}
+ // Reflow all elements on the page. <david@14islands.com>
+ function reflowFixedPositions() {
+ var docStyle = document.documentElement.style
+ docStyle.paddingRight = '1px'
+ setTimeout(function(){ docStyle.paddingRight = '' }, 0)
+ }
+
$('.signature code').html(function(i, html){
return html
.replace(/\[([^\[]+)\]$/mg, '<span class=version>$1+</span>')
@@ -314,6 +321,13 @@ <h2 id=thanks>Acknowledgements &amp; Thanks</h2>
if ($.os.ios || /\bMac.+\bSafari\b/.test(navigator.userAgent))
$(document.body).addClass('emoji-enabled')
+ $('#sidebar').on('click', 'a[href]', function(e){
+ setTimeout(function(){
+ // fixes sidebar becoming unscrollable in Safari 6
+ reflowFixedPositions()
+ }, 10)
+ })
+
// change the title of the page so bookmarks have a better default
if ($.os.ios || $.os.android)
document.title = 'Zepto Docs'
View
36 script/draft
@@ -0,0 +1,36 @@
+#!/bin/bash
+# Usage:
+# vim $(version=1.0 script/draft scrollTop $.camelCase event/delegate)
+
+set -e
+
+[[ $1 = -f ]] && force=1 && shift 1
+
+create() {
+ name="$(basename "$1")"
+ module="$(dirname "$1")"
+ [[ $module = . ]] && module=core
+ post="${module}/_posts/1900-01-01-${name/$./Z-}.md"
+
+ if [[ -f $post ]]; then
+ echo "Warning: $post already exists" >&2
+ [[ -z $force ]] && exit 1
+ fi
+
+ { echo '---'
+ echo title: "\"${name}\""
+ [[ -n $version ]] && echo version: $version
+ echo 'signature: |'
+ echo " ${name}() ⇒ self"
+ echo '---'
+ echo
+ echo '{% highlight js %}'
+ echo '{% endhighlight %}'
+ } > "$post"
+
+ echo "$post"
+}
+
+for method in $*; do
+ create "$method"
+done

No commit comments for this range

Something went wrong with that request. Please try again.