From 79aa4eb4f76619f0e5eef9e799cbc7e5d38f4465 Mon Sep 17 00:00:00 2001
From: Josep del Rio
Date: Thu, 19 Apr 2012 00:15:05 +0200
Subject: Added robots.txt, with sitemap link
---
.themes/classic/source/robots.txt | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 .themes/classic/source/robots.txt
(limited to '.themes/classic')
diff --git a/.themes/classic/source/robots.txt b/.themes/classic/source/robots.txt
new file mode 100644
index 00000000..b18d5dcb
--- /dev/null
+++ b/.themes/classic/source/robots.txt
@@ -0,0 +1,7 @@
+---
+layout: nil
+---
+User-agent: *
+Disallow:
+
+Sitemap: {{ site.url }}/sitemap.xml
\ No newline at end of file
--
cgit v1.2.1
From 53ca59d6d0aa79b67ef89dbef16d2550df97e11d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zhao=20L=C3=BC?=
Date: Thu, 19 Jul 2012 22:09:48 -0700
Subject: Updated Github API to V3.
Github API V2 has been removed. The response data format also changed.
---
.themes/classic/source/javascripts/github.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
(limited to '.themes/classic')
diff --git a/.themes/classic/source/javascripts/github.js b/.themes/classic/source/javascripts/github.js
index 678775a9..8b79dad1 100644
--- a/.themes/classic/source/javascripts/github.js
+++ b/.themes/classic/source/javascripts/github.js
@@ -10,15 +10,15 @@ var github = (function(){
return {
showRepos: function(options){
$.ajax({
- url: "http://github.com/api/v2/json/repos/show/"+options.user+"?callback=?"
+ url: "https://api.github.com/users/"+options.user+"/repos?callback=?"
, type: 'jsonp'
, error: function (err) { $(options.target + ' li.loading').addClass('error').text("Error loading feed"); }
, success: function(data) {
var repos = [];
- if (!data || !data.repositories) { return; }
- for (var i = 0; i < data.repositories.length; i++) {
- if (options.skip_forks && data.repositories[i].fork) { continue; }
- repos.push(data.repositories[i]);
+ if (!data || !data.data) { return; }
+ for (var i = 0; i < data.data.length; i++) {
+ if (options.skip_forks && data.data[i].fork) { continue; }
+ repos.push(data.data[i]);
}
repos.sort(function(a, b) {
var aDate = new Date(a.pushed_at).valueOf(),
--
cgit v1.2.1
From 6c26f907cc0cf4704aaf5377738721177ec048f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zhao=20L=C3=BC?=
Date: Thu, 19 Jul 2012 22:09:48 -0700
Subject: Updated Github API to V3.
Github API V2 has been removed. The response data format also changed.
---
.themes/classic/source/javascripts/github.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to '.themes/classic')
diff --git a/.themes/classic/source/javascripts/github.js b/.themes/classic/source/javascripts/github.js
index 8b79dad1..9e98b8c2 100644
--- a/.themes/classic/source/javascripts/github.js
+++ b/.themes/classic/source/javascripts/github.js
@@ -3,7 +3,7 @@ var github = (function(){
var i = 0, fragment = '', t = $(target)[0];
for(i = 0; i < repos.length; i++) {
- fragment += ''+repos[i].name+''+repos[i].description+'
';
+ fragment += ''+repos[i].name+''+(repos[i].description||'')+'
';
}
t.innerHTML = fragment;
}
--
cgit v1.2.1
From a010c99289a9dedd963fb2100d38fb80a80ae7ea Mon Sep 17 00:00:00 2001
From: Brandon Mathis
Date: Sat, 29 Sep 2012 22:42:47 -0500
Subject: Twitter API call and links are now protocol relative
---
.themes/classic/source/javascripts/twitter.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
(limited to '.themes/classic')
diff --git a/.themes/classic/source/javascripts/twitter.js b/.themes/classic/source/javascripts/twitter.js
index c9b7519d..1a5c1548 100644
--- a/.themes/classic/source/javascripts/twitter.js
+++ b/.themes/classic/source/javascripts/twitter.js
@@ -41,9 +41,9 @@ function prettyDate(time) {
function linkifyTweet(text, url) {
// Linkify urls, usernames, hashtags
- text = text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '$2')
- .replace(/(^|\W)@(\w+)/g, '$1@$2')
- .replace(/(^|\W)#(\w+)/g, '$1#$2');
+ text = text.replace(/(https?:)(\/\/)([\w\-:;?&=+.%#\/]+)/gi, '$3')
+ .replace(/(^|\W)@(\w+)/g, '$1@$2')
+ .replace(/(^|\W)#(\w+)/g, '$1#$2');
// Use twitter's api to replace t.co shortened urls with expanded ones.
for (var u in url) {
@@ -62,7 +62,7 @@ function showTwitterFeed(tweets, twitter_user) {
content = '';
for (var t in tweets) {
- content += ''+''+''+prettyDate(tweets[t].created_at)+''+linkifyTweet(tweets[t].text.replace(/\n/g, '
'), tweets[t].entities.urls)+'
'+'';
+ content += ''+''+''+prettyDate(tweets[t].created_at)+''+linkifyTweet(tweets[t].text.replace(/\n/g, '
'), tweets[t].entities.urls)+'
'+'';
}
timeline.innerHTML = content;
}
@@ -70,7 +70,7 @@ function showTwitterFeed(tweets, twitter_user) {
function getTwitterFeed(user, count, replies) {
count = parseInt(count, 10);
$.ajax({
- url: "http://api.twitter.com/1/statuses/user_timeline/" + user + ".json?trim_user=true&count=" + (count + 20) + "&include_entities=1&exclude_replies=" + (replies ? "0" : "1") + "&callback=?"
+ url: "//api.twitter.com/1/statuses/user_timeline/" + user + ".json?trim_user=true&count=" + (count + 20) + "&include_entities=1&exclude_replies=" + (replies ? "0" : "1") + "&callback=?"
, type: 'jsonp'
, error: function (err) { $('#tweets li.loading').addClass('error').text("Twitter's busted"); }
, success: function(data) { showTwitterFeed(data.slice(0, count), user); }
--
cgit v1.2.1
From bfbb8f32fb073b5eec466fd15062dd506cf2b22d Mon Sep 17 00:00:00 2001
From: Brandon Mathis
Date: Mon, 1 Oct 2012 07:28:30 -0500
Subject: Using https instead of protocol relative urls, for Pinboard and
Twitter feeds
---
.themes/classic/source/javascripts/pinboard.js | 4 ++--
.themes/classic/source/javascripts/twitter.js | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
(limited to '.themes/classic')
diff --git a/.themes/classic/source/javascripts/pinboard.js b/.themes/classic/source/javascripts/pinboard.js
index 52577e2c..a97df03d 100644
--- a/.themes/classic/source/javascripts/pinboard.js
+++ b/.themes/classic/source/javascripts/pinboard.js
@@ -44,7 +44,7 @@ function Pinboard_Linkroll() {
if (it.t.length > 0) {
for (var i = 0; i < it.t.length; i++) {
var tag = it.t[i];
- str += " " + this.cook(tag).replace(/^\s+|\s+$/g, '') + " ";
+ str += " " + this.cook(tag).replace(/^\s+|\s+$/g, '') + " ";
}
}
str += "
\n";
@@ -52,5 +52,5 @@ function Pinboard_Linkroll() {
}
}
Pinboard_Linkroll.prototype = new Pinboard_Linkroll();
-pinboardNS_fetch_script("http://feeds.pinboard.in/json/v1/u:"+pinboard_user+"/?cb=pinboardNS_show_bmarks\&count="+pinboard_count);
+pinboardNS_fetch_script("https://feeds.pinboard.in/json/v1/u:"+pinboard_user+"/?cb=pinboardNS_show_bmarks\&count="+pinboard_count);
diff --git a/.themes/classic/source/javascripts/twitter.js b/.themes/classic/source/javascripts/twitter.js
index 1a5c1548..3e2dd0d7 100644
--- a/.themes/classic/source/javascripts/twitter.js
+++ b/.themes/classic/source/javascripts/twitter.js
@@ -41,9 +41,9 @@ function prettyDate(time) {
function linkifyTweet(text, url) {
// Linkify urls, usernames, hashtags
- text = text.replace(/(https?:)(\/\/)([\w\-:;?&=+.%#\/]+)/gi, '$3')
- .replace(/(^|\W)@(\w+)/g, '$1@$2')
- .replace(/(^|\W)#(\w+)/g, '$1#$2');
+ text = text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '$2')
+ .replace(/(^|\W)@(\w+)/g, '$1@$2')
+ .replace(/(^|\W)#(\w+)/g, '$1#$2');
// Use twitter's api to replace t.co shortened urls with expanded ones.
for (var u in url) {
@@ -62,7 +62,7 @@ function showTwitterFeed(tweets, twitter_user) {
content = '';
for (var t in tweets) {
- content += ''+''+''+prettyDate(tweets[t].created_at)+''+linkifyTweet(tweets[t].text.replace(/\n/g, '
'), tweets[t].entities.urls)+'
'+'';
+ content += ''+''+''+prettyDate(tweets[t].created_at)+''+linkifyTweet(tweets[t].text.replace(/\n/g, '
'), tweets[t].entities.urls)+'
'+'';
}
timeline.innerHTML = content;
}
@@ -70,7 +70,7 @@ function showTwitterFeed(tweets, twitter_user) {
function getTwitterFeed(user, count, replies) {
count = parseInt(count, 10);
$.ajax({
- url: "//api.twitter.com/1/statuses/user_timeline/" + user + ".json?trim_user=true&count=" + (count + 20) + "&include_entities=1&exclude_replies=" + (replies ? "0" : "1") + "&callback=?"
+ url: "https://api.twitter.com/1/statuses/user_timeline/" + user + ".json?trim_user=true&count=" + (count + 20) + "&include_entities=1&exclude_replies=" + (replies ? "0" : "1") + "&callback=?"
, type: 'jsonp'
, error: function (err) { $('#tweets li.loading').addClass('error').text("Twitter's busted"); }
, success: function(data) { showTwitterFeed(data.slice(0, count), user); }
--
cgit v1.2.1
From 72b4e8d5621dbb3c110fe2c273bcc3ac408ffc32 Mon Sep 17 00:00:00 2001
From: Brandon Mathis
Date: Tue, 18 Dec 2012 11:38:37 -0600
Subject: gist tag plugin now works with the latest changes GitHub gists and
does not fail if you do not specify a filename.
---
.themes/classic/sass/partials/_syntax.scss | 64 +++++++++++++++++-------------
1 file changed, 36 insertions(+), 28 deletions(-)
(limited to '.themes/classic')
diff --git a/.themes/classic/sass/partials/_syntax.scss b/.themes/classic/sass/partials/_syntax.scss
index 77ac8d78..5465286f 100644
--- a/.themes/classic/sass/partials/_syntax.scss
+++ b/.themes/classic/sass/partials/_syntax.scss
@@ -1,44 +1,52 @@
.highlight, html .gist .gist-file .gist-syntax .gist-highlight {
table td.code { width: 100%; }
- .line-numbers {
- text-align: right;
- font-size: 13px;
- line-height: 1.45em;
- @if $solarized == light {
- background: lighten($base03, 1) $noise-bg !important;
- border-right: 1px solid darken($base02, 2) !important;
- @include box-shadow(lighten($base03, 2) -1px 0 inset);
- text-shadow: lighten($base02, 2) 0 -1px;
- } @else {
- background: $base02 $noise-bg !important;
- border-right: 1px solid darken($base03, 2) !important;
- @include box-shadow(lighten($base02, 2) -1px 0 inset);
- text-shadow: darken($base02, 10) 0 -1px;
- }
- span { color: $base01 !important; }
- padding: .8em !important;
- @include border-radius(0);
- }
border: 1px solid $pre-border !important;
}
+.highlight .line-numbers, html .gist .gist-file .gist-syntax .highlight .line_numbers {
+ text-align: right;
+ font-size: 13px;
+ line-height: 1.45em;
+ @if $solarized == light {
+ background: lighten($base03, 1) $noise-bg !important;
+ border-right: 1px solid darken($base02, 2) !important;
+ @include box-shadow(lighten($base03, 2) -1px 0 inset);
+ text-shadow: lighten($base02, 2) 0 -1px;
+ } @else {
+ background: $base02 $noise-bg !important;
+ border-right: 1px solid darken($base03, 2) !important;
+ @include box-shadow(lighten($base02, 2) -1px 0 inset);
+ text-shadow: darken($base02, 10) 0 -1px;
+ }
+ span { color: $base01 !important; }
+ padding: .8em !important;
+ @include border-radius(0);
+}
+
figure.code, .gist-file, pre {
@include box-shadow(rgba(#000, .06) 0 0 10px);
.highlight pre { @include box-shadow(none); }
}
+.gist .highlight, figure.code .highlight {
+ @include selection(adjust-color($base03, $lightness: 23%, $saturation: -65%), $text-shadow: $base03 0 1px);
+}
html .gist .gist-file {
margin-bottom: 1.8em;
position: relative;
border: none;
padding-top: image-height("code_bg.png") !important;
+ .highlight {
+ margin-bottom: 0;
+ }
.gist-syntax {
border-bottom: 0 !important;
background: none !important;
- .gist-highlight{
+ .gist-highlight {
background: $base03 !important;
- pre {
- @extend .pre-code;
- }
+ }
+ .highlight pre {
+ @extend .pre-code;
+ padding: 0;
}
}
.gist-meta {
@@ -107,12 +115,11 @@ p, li {
}
.pre-code {
- @include selection(adjust-color($base03, $lightness: 23%, $saturation: -65%), $text-shadow: $base03 0 1px);
font-family: $mono !important;
overflow: scroll;
overflow-y: hidden;
display: block;
- padding: .8em !important;
+ padding: .8em;
overflow-x: auto;
line-height: 1.45em;
background: $base03 $noise-bg !important;
@@ -187,7 +194,7 @@ p, li {
}
.highlight, .gist-highlight {
- pre { background: none; @include border-radius(none); border: none; padding: 0; margin-bottom: 0; }
+ pre { background: none; @include border-radius(0px); border: none; padding: 0; margin-bottom: 0; }
margin-bottom: 1.8em;
background: $base03;
overflow-y: hidden;
@@ -206,7 +213,9 @@ pre, .highlight, .gist-highlight {
&::-webkit-scrollbar-thumb:horizontal { background: $solar-scroll-thumb; -webkit-border-radius: 4px; border-radius: 4px }
}
-.highlight code { @extend .pre-code; background: #000;}
+.highlight code {
+ @extend .pre-code; background: #000;
+}
figure.code {
background: none;
padding: 0;
@@ -250,4 +259,3 @@ figure.code {
text-shadow: #cbcccc 0 1px 0;
padding-left: 3em;
}
-
--
cgit v1.2.1
From bcdc904843d09ab686a1e380019bfdf2f145a665 Mon Sep 17 00:00:00 2001
From: Thomas Rix
Date: Wed, 2 Jan 2013 20:55:09 -0800
Subject: Escape github repo descriptions, as they may contain HTML.
---
.themes/classic/source/javascripts/github.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
(limited to '.themes/classic')
diff --git a/.themes/classic/source/javascripts/github.js b/.themes/classic/source/javascripts/github.js
index 9e98b8c2..27a5a235 100644
--- a/.themes/classic/source/javascripts/github.js
+++ b/.themes/classic/source/javascripts/github.js
@@ -1,9 +1,12 @@
var github = (function(){
+ function escapeHtml(str) {
+ return $('').text(str).html();
+ }
function render(target, repos){
var i = 0, fragment = '', t = $(target)[0];
for(i = 0; i < repos.length; i++) {
- fragment += ''+repos[i].name+''+(repos[i].description||'')+'
';
+ fragment += ''+repos[i].name+''+escapeHtml(repos[i].description||'')+'
';
}
t.innerHTML = fragment;
}
--
cgit v1.2.1
From 9decd23b5a7a2f26590a4995cafcba010695717d Mon Sep 17 00:00:00 2001
From: Brandon Mathis
Date: Sun, 6 Jan 2013 22:52:54 -0600
Subject: updated ender.js to latest
---
.themes/classic/source/javascripts/ender.js | 34 +-
.themes/classic/source/javascripts/libs/ender.js | 4525 +++++++++++++++-------
2 files changed, 3159 insertions(+), 1400 deletions(-)
(limited to '.themes/classic')
diff --git a/.themes/classic/source/javascripts/ender.js b/.themes/classic/source/javascripts/ender.js
index 1add349c..6d9c66ec 100644
--- a/.themes/classic/source/javascripts/ender.js
+++ b/.themes/classic/source/javascripts/ender.js
@@ -8,38 +8,38 @@
/*!
* Ender: open module JavaScript framework (client-lib)
- * copyright Dustin Diaz & Jacob Thornton 2011 (@ded @fat)
- * http://ender.no.de
+ * copyright Dustin Diaz & Jacob Thornton 2011-2012 (@ded @fat)
+ * http://ender.jit.su
* License MIT
*/
-!function(a){function d(a){var c=b[a]||window[a];if(!c)throw new Error("Requested module '"+a+"' has not been defined.");return c}function e(a,c){return b[a]=c}function f(a,b){for(var c in b)c!="noConflict"&&c!="_VERSION"&&(a[c]=b[c]);return a}function g(a,b,c){return h._select&&(typeof a=="string"||a.nodeName||a.length&&"item"in a||a==window)?(c=h._select(a,b),c.selector=a):c=isFinite(a.length)?a:[a],f(c,g)}function h(a,b){return g(a,b)}a.global=a;var b={},c=a.$;a.provide=e,a.require=d,f(h,{_VERSION:"0.3.4",fn:a.$&&a.$.fn||{},ender:function(a,b){f(b?g:h,a)},_select:function(a,b){return(b||document).querySelectorAll(a)}}),f(g,{forEach:function(a,b,c){for(c=0,l=this.length;c0?this:[]).concat(Array.prototype.slice.call(arguments,0));return b[a].apply(null,c)}},d=c("serialize"),e=c("serializeArray");a.ender({ajax:b,serialize:d,serializeArray:e,toQueryString:b.toQueryString}),a.ender({serialize:d,serializeArray:e},!0)}(ender)}(),!function(){var a={exports:{}},b=a.exports;
+;!function(name,definition){typeof module!="undefined"?module.exports=definition():typeof define=="function"&&define.amd?define(definition):this[name]=definition()}("reqwest",function(){function handleReadyState(o,success,error){return function(){o&&o[readyState]==4&&(twoHundo.test(o.status)?success(o):error(o))}}function setHeaders(http,o){var headers=o.headers||{},h;headers.Accept=headers.Accept||defaultHeaders.accept[o.type]||defaultHeaders.accept["*"];!o.crossOrigin&&!headers[requestedWith]&&(headers[requestedWith]=defaultHeaders.requestedWith);headers[contentType]||(headers[contentType]=o.contentType||defaultHeaders.contentType);for(h in headers)headers.hasOwnProperty(h)&&http.setRequestHeader(h,headers[h])}function setCredentials(http,o){typeof o.withCredentials!="undefined"&&typeof http.withCredentials!="undefined"&&(http.withCredentials=!!o.withCredentials)}function generalCallback(data){lastValue=data}function urlappend(url,s){return url+(/\?/.test(url)?"&":"?")+s}function handleJsonp(o,fn,err,url){var reqId=uniqid++,cbkey=o.jsonpCallback||"callback",cbval=o.jsonpCallbackName||reqwest.getcallbackPrefix(reqId),cbreg=new RegExp("((^|\\?|&)"+cbkey+")=([^&]+)"),match=url.match(cbreg),script=doc.createElement("script"),loaded=0;match?match[3]==="?"?url=url.replace(cbreg,"$1="+cbval):cbval=match[3]:url=urlappend(url,cbkey+"="+cbval);win[cbval]=generalCallback;script.type="text/javascript";script.src=url;script.async=!0;if(typeof script.onreadystatechange!="undefined"){script.event="onclick";script.htmlFor=script.id="_reqwest_"+reqId}script.onload=script.onreadystatechange=function(){if(script[readyState]&&script[readyState]!=="complete"&&script[readyState]!=="loaded"||loaded)return!1;script.onload=script.onreadystatechange=null;script.onclick&&script.onclick();o.success&&o.success(lastValue);lastValue=undefined;head.removeChild(script);loaded=1};head.appendChild(script)}function getRequest(o,fn,err){var method=(o.method||"GET").toUpperCase(),url=typeof o=="string"?o:o.url,data=o.processData!==!1&&o.data&&typeof o.data!="string"?reqwest.toQueryString(o.data):o.data||null,http;if((o.type=="jsonp"||method=="GET")&&data){url=urlappend(url,data);data=null}if(o.type=="jsonp")return handleJsonp(o,fn,err,url);http=xhr();http.open(method,url,!0);setHeaders(http,o);setCredentials(http,o);http.onreadystatechange=handleReadyState(http,fn,err);o.before&&o.before(http);http.send(data);return http}function Reqwest(o,fn){this.o=o;this.fn=fn;init.apply(this,arguments)}function setType(url){var m=url.match(/\.(json|jsonp|html|xml)(\?|$)/);return m?m[1]:"js"}function init(o,fn){function complete(resp){o.timeout&&clearTimeout(self.timeout);self.timeout=null;while(self._completeHandlers.length>0)self._completeHandlers.shift()(resp)}function success(resp){var r=resp.responseText;if(r)switch(type){case"json":try{resp=win.JSON?win.JSON.parse(r):eval("("+r+")")}catch(err){return error(resp,"Could not parse JSON in response",err)}break;case"js":resp=eval(r);break;case"html":resp=r;break;case"xml":resp=resp.responseXML}self._responseArgs.resp=resp;self._fulfilled=!0;fn(resp);while(self._fulfillmentHandlers.length>0)self._fulfillmentHandlers.shift()(resp);complete(resp)}function error(resp,msg,t){self._responseArgs.resp=resp;self._responseArgs.msg=msg;self._responseArgs.t=t;self._erred=!0;while(self._errorHandlers.length>0)self._errorHandlers.shift()(resp,msg,t);complete(resp)}this.url=typeof o=="string"?o:o.url;this.timeout=null;this._fulfilled=!1;this._fulfillmentHandlers=[];this._errorHandlers=[];this._completeHandlers=[];this._erred=!1;this._responseArgs={};var self=this,type=o.type||setType(this.url);fn=fn||function(){};o.timeout&&(this.timeout=setTimeout(function(){self.abort()},o.timeout));o.success&&this._fulfillmentHandlers.push(function(){o.success.apply(o,arguments)});o.error&&this._errorHandlers.push(function(){o.error.apply(o,arguments)});o.complete&&this._completeHandlers.push(function(){o.complete.apply(o,arguments)});this.request=getRequest(o,success,error)}function reqwest(o,fn){return new Reqwest(o,fn)}function normalize(s){return s?s.replace(/\r?\n/g,"\r\n"):""}function serial(el,cb){var n=el.name,t=el.tagName.toLowerCase(),optCb=function(o){o&&!o.disabled&&cb(n,normalize(o.attributes.value&&o.attributes.value.specified?o.value:o.text))};if(el.disabled||!n)return;switch(t){case"input":if(!/reset|button|image|file/i.test(el.type)){var ch=/checkbox/i.test(el.type),ra=/radio/i.test(el.type),val=el.value;(!ch&&!ra||el.checked)&&cb(n,normalize(ch&&val===""?"on":val))}break;case"textarea":cb(n,normalize(el.value));break;case"select":if(el.type.toLowerCase()==="select-one")optCb(el.selectedIndex>=0?el.options[el.selectedIndex]:null);else for(var i=0;el.length&&i0){typeSpec=str2arr(typeSpec);for(i=typeSpec.length;i--;)off(element,typeSpec[i],fn);return element}type=isTypeStr&&typeSpec.replace(nameRegex,"");type&&customEvents[type]&&(type=customEvents[type].base);if(!typeSpec||isTypeStr){if(namespaces=isTypeStr&&typeSpec.replace(namespaceRegex,""))namespaces=str2arr(namespaces,".");removeListener(element,type,fn,namespaces)}else if(isFunction(typeSpec))removeListener(element,null,typeSpec);else for(k in typeSpec)typeSpec.hasOwnProperty(k)&&off(element,k,typeSpec[k]);return element},on=function(element,events,selector,fn){var originalFn,type,types,i,args,entry,first;if(selector===undefined&&typeof events=="object"){for(type in events)events.hasOwnProperty(type)&&on.call(this,element,type,events[type]);return}if(!isFunction(selector)){originalFn=fn;args=slice.call(arguments,4);fn=delegate(selector,originalFn,selectorEngine)}else{args=slice.call(arguments,3);fn=originalFn=selector}types=str2arr(events);this===ONE&&(fn=once(off,element,events,fn,originalFn));for(i=types.length;i--;){first=registry.put(entry=new RegEntry(element,types[i].replace(nameRegex,""),fn,originalFn,str2arr(types[i].replace(namespaceRegex,""),"."),args,!1));entry[eventSupport]&&first&&listener(element,entry.eventType,!0,entry.customType)}return element},add=function(element,events,fn,delfn){return on.apply(null,isString(fn)?[element,fn,events,delfn].concat(arguments.length>3?slice.call(arguments,5):[]):slice.call(arguments))},one=function(){return on.apply(ONE,arguments)},fire=function(element,type,args){var types=str2arr(type),i,j,l,names,handlers;for(i=types.length;i--;){type=types[i].replace(nameRegex,"");if(names=types[i].replace(namespaceRegex,""))names=str2arr(names,".");if(!names&&!args&&element[eventSupport])fireListener(nativeEvents[type],type,element);else{handlers=registry.get(element,type,null,!1);args=[!1].concat(args);for(j=0,l=handlers.length;j]+)/.exec(a),d=c.createElement(b&&k[b[1].toLowerCase()]||"div"),e=[];d.innerHTML=a;var f=d.childNodes;d=d.firstChild,e.push(d);while(d=d.nextSibling)d.nodeType==1&&e.push(d);return e}():A(a)?[a.cloneNode(!0)]:[]},N.doc=function(){var a=this.viewport();return{width:Math.max(c.body.scrollWidth,d.scrollWidth,a.width),height:Math.max(c.body.scrollHeight,d.scrollHeight,a.height)}},N.firstChild=function(a){for(var b=a.childNodes,c=0,d=b&&b.length||0,e;c0?cloneNode(self,el):el)},null,rev)},this,rev);self.length=i;each(r,function(e){self[--i]=e},null,!rev);return self}function xy(el,x,y){var $el=bonzo(el),style=$el.css("position"),offset=$el.offset(),rel="relative",isRel=style==rel,delta=[parseInt($el.css("left"),10),parseInt($el.css("top"),10)];if(style=="static"){$el.css("position",rel);style=rel}isNaN(delta[0])&&(delta[0]=isRel?0:el.offsetLeft);isNaN(delta[1])&&(delta[1]=isRel?0:el.offsetTop);x!=null&&(el.style.left=x-offset.left+delta[0]+px);y!=null&&(el.style.top=y-offset.top+delta[1]+px)}function setter(el,v){return typeof v=="function"?v(el):v}function Bonzo(elements){this.length=0;if(elements){elements=typeof elements!="string"&&!elements.nodeType&&typeof elements.length!="undefined"?elements:[elements];this.length=elements.length;for(var i=0;i/,table=["",1],td=["",3],option=["",1],noscope=["_","",0,1],tagMap={thead:table,tbody:table,tfoot:table,colgroup:table,caption:table,tr:["",2],th:td,td:td,col:["",2],fieldset:["",1],legend:["",2],option:option,optgroup:option,script:noscope,style:noscope,link:noscope,param:noscope,base:noscope},stateAttributes=/^(checked|selected|disabled)$/,ie=/msie/i.test(navigator.userAgent),hasClass,addClass,removeClass,uidMap={},uuids=0,digit=/^-?[\d\.]+$/,dattr=/^data-(.+)$/,px="px",setAttribute="setAttribute",getAttribute="getAttribute",byTag="getElementsByTagName",features=function(){var e=doc.createElement("p");e.innerHTML='x';return{hrefExtended:e[byTag]("a")[0][getAttribute]("href")!="#x",autoTbody:e[byTag]("tbody").length!==0,computedStyle:doc.defaultView&&doc.defaultView.getComputedStyle,cssFloat:e[byTag]("table")[0].style.styleFloat?"styleFloat":"cssFloat",transform:function(){var props=["transform","webkitTransform","MozTransform","OTransform","msTransform"],i;for(i=0;i]+)/),el=doc.createElement("div"),els=[],p=tag?tagMap[tag[1].toLowerCase()]:null,dep=p?p[2]+1:1,ns=p&&p[3],pn=parentNode,tb=features.autoTbody&&p&&p[0]==""&&!/])\s*/g,C=/[\s\>\+\~]/,D=/(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\]|[\s\w\+\-]*\))/,E=/([.*+?\^=!:${}()|\[\]\/\\])/g,F=/^([a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,G=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,H=/:([\w\-]+)(\(['"]?([\s\w\+\-]+)['"]?\))?/,I=new RegExp("("+C.source+")"+D.source,"g"),J=new RegExp(C.source+D.source),K=new RegExp(F.source+"("+G.source+")?"+"("+H.source+")?"),L={" ":function(a){return a&&a!==u&&a.parentNode},">":function(a,b){return a&&a.parentNode==b.parentNode&&a.parentNode},"~":function(a){return a&&a.previousSibling},"+":function(a,b,c,d){return a?(c=S(a),d=S(b),c&&d&&c==d&&c):!1}};M.prototype={g:function(a){return this.c[a]||undefined},s:function(a,b){return this.c[a]=b,b}};var N=new M,O=new M,P=new M,Q=new M,bb="compareDocumentPosition"in u?function(a,b){return(b.compareDocumentPosition(a)&16)==16}:"contains"in u?function(a,c){return c=c==b||c==window?u:c,c!==a&&c.contains(a)}:function(a,b){while(a=a.parentNode)if(a===b)return 1;return 0},bc=function(){if(!b.querySelector||!b.querySelectorAll)return!1;try{return b.querySelectorAll(":nth-of-type(1)").length}catch(a){return!1}}(),bd=bc?function(a,c){return b.getElementsByClassName&&(i=a.match(y))?R(c.getElementsByClassName(i[1])):R(c.querySelectorAll(a))}:function(a,c){a=a.replace(B,"$1");var d=[],e,g,j=[],k;if(i=a.match(A)){s=c.getElementsByTagName(i[1]||"*"),l=N.g(i[2])||N.s(i[2],new RegExp("(^|\\s+)"+i[2]+"(\\s+|$)"));for(k=0,h=s.length,f=0;k]+)\s*/.exec(b)[1],f=(c||a).createElement(e[d]||"div"),g=[];f.innerHTML=b;var h=f.childNodes;f=f.firstChild,f.nodeType==1&&g.push(f);while(f=f.nextSibling)f.nodeType==1&&g.push(f);return g}var c=require("qwery"),d="table",e={thead:d,tbody:d,tfoot:d,tr:"tbody",th:"tr",td:"tr",fieldset:"form",option:"select"};b._select=function(a,b){return/^\s*~+]/,normalizr=/^\s+|\s*([,\s\+\~>]|$)\s*/g,splitters=/[\s\>\+\~]/,splittersMore=/(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\]|[\s\w\+\-]*\))/,specialChars=/([.*+?\^=!:${}()|\[\]\/\\])/g,simple=/^(\*|[a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,attr=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,pseudo=/:([\w\-]+)(\(['"]?([^()]+)['"]?\))?/,easy=new RegExp(idOnly.source+"|"+tagOnly.source+"|"+classOnly.source),dividers=new RegExp("("+splitters.source+")"+splittersMore.source,"g"),tokenizr=new RegExp(splitters.source+splittersMore.source),chunker=new RegExp(simple.source+"("+attr.source+")?"+"("+pseudo.source+")?"),walker={" ":function(node){return node&&node!==html&&node.parentNode},">":function(node,contestant){return node&&node.parentNode==contestant.parentNode&&node.parentNode},"~":function(node){return node&&node.previousSibling},"+":function(node,contestant,p1,p2){return node?(p1=previous(node))&&(p2=previous(contestant))&&p1==p2&&p1:!1}};cache.prototype={g:function(k){return this.c[k]||undefined},s:function(k,v,r){v=r?new RegExp(v):v;return this.c[k]=v}};var classCache=new cache,cleanCache=new cache,attrCache=new cache,tokenCache=new cache,isAncestor="compareDocumentPosition"in html?function(element,container){return(container.compareDocumentPosition(element)&16)==16}:"contains"in html?function(element,container){container=container[nodeType]===9||container==window?html:container;return container!==element&&container.contains(element)}:function(element,container){while(element=element.parentNode)if(element===container)return 1;return 0},getAttr=function(){var e=doc.createElement("p");return(e.innerHTML='x')&&e.firstChild.getAttribute("href")!="#x"?function(e,a){return a==="class"?e.className:a==="href"||a==="src"?e.getAttribute(a,2):e.getAttribute(a)}:function(e,a){return e.getAttribute(a)}}(),hasByClass=!!doc[byClass],hasQSA=doc.querySelector&&doc[qSA],selectQSA=function(selector,root){var result=[],ss,e;try{if(root[nodeType]===9||!splittable.test(selector))return arrayify(root[qSA](selector));each(ss=selector.split(","),collectSelector(root,function(ctx,s){e=ctx[qSA](s);e.length==1?result[result.length]=e.item(0):e.length&&(result=result.concat(arrayify(e)))}));return ss.length>1&&result.length>1?uniq(result):result}catch(ex){}return selectNonNative(selector,root)},selectNonNative=function(selector,root){var result=[],items,m,i,l,r,ss;selector=selector.replace(normalizr,"$1");if(m=selector.match(tagAndOrClass)){r=classRegex(m[2]);items=root[byTag](m[1]||"*");for(i=0,l=items.length;i1&&result.length>1?uniq(result):result},configure=function(options){typeof options[useNativeQSA]!="undefined"&&(select=options[useNativeQSA]?hasQSA?selectQSA:selectNonNative:selectNonNative)};configure({useNativeQSA:!0});qwery.configure=configure;qwery.uniq=uniq;qwery.is=is;qwery.pseudos={};return qwery});provide("qwery",module.exports);(function($){var q=function(){var r;try{r=require("qwery")}catch(ex){r=require("qwery-mobile")}finally{return r}}();$.pseudos=q.pseudos;$._select=function(s,r){return($._select=function(){var b;if(typeof $.create=="function")return function(s,r){return/^\s* 0) {
+ self._completeHandlers.shift()(resp)
+ }
+ }
+
+ function success(resp) {
+ var r = resp.responseText
+ if (r) {
+ switch (type) {
+ case 'json':
+ try {
+ resp = win.JSON ? win.JSON.parse(r) : eval('(' + r + ')')
+ } catch (err) {
+ return error(resp, 'Could not parse JSON in response', err)
+ }
+ break;
+ case 'js':
+ resp = eval(r)
+ break;
+ case 'html':
+ resp = r
+ break;
+ case 'xml':
+ resp = resp.responseXML;
+ break;
+ }
+ }
+
+ self._responseArgs.resp = resp
+ self._fulfilled = true
+ fn(resp)
+ while (self._fulfillmentHandlers.length > 0) {
+ self._fulfillmentHandlers.shift()(resp)
+ }
+
+ complete(resp)
+ }
+
+ function error(resp, msg, t) {
+ self._responseArgs.resp = resp
+ self._responseArgs.msg = msg
+ self._responseArgs.t = t
+ self._erred = true
+ while (self._errorHandlers.length > 0) {
+ self._errorHandlers.shift()(resp, msg, t)
+ }
+ complete(resp)
+ }
+
+ this.request = getRequest(o, success, error)
}
- return (related != this && related.prefix != 'xul' && !/document/.test(this.toString()) && !isDescendant(this, related));
- }
-
- var customEvents = {
- mouseenter: { base: 'mouseover', condition: check },
- mouseleave: { base: 'mouseout', condition: check },
- mousewheel: { base: /Firefox/.test(navigator.userAgent) ? 'DOMMouseScroll' : 'mousewheel' }
- };
-
- var bean = { add: add, remove: remove, clone: clone, fire: fire };
-
- var clean = function (el) {
- var uid = remove(el).__uid;
- if (uid) {
- delete collected[uid];
- delete registry[uid];
+
+ Reqwest.prototype = {
+ abort: function () {
+ this.request.abort()
+ }
+
+ , retry: function () {
+ init.call(this, this.o, this.fn)
+ }
+
+ /**
+ * Small deviation from the Promises A CommonJs specification
+ * http://wiki.commonjs.org/wiki/Promises/A
+ */
+
+ /**
+ * `then` will execute upon successful requests
+ */
+ , then: function (success, fail) {
+ if (this._fulfilled) {
+ success(this._responseArgs.resp)
+ } else if (this._erred) {
+ fail(this._responseArgs.resp, this._responseArgs.msg, this._responseArgs.t)
+ } else {
+ this._fulfillmentHandlers.push(success)
+ this._errorHandlers.push(fail)
+ }
+ return this
+ }
+
+ /**
+ * `always` will execute whether the request succeeds or fails
+ */
+ , always: function (fn) {
+ if (this._fulfilled || this._erred) {
+ fn(this._responseArgs.resp)
+ } else {
+ this._completeHandlers.push(fn)
+ }
+ return this
+ }
+
+ /**
+ * `fail` will execute when the request fails
+ */
+ , fail: function (fn) {
+ if (this._erred) {
+ fn(this._responseArgs.resp, this._responseArgs.msg, this._responseArgs.t)
+ } else {
+ this._errorHandlers.push(fn)
+ }
+ return this
+ }
}
- };
-
- if (context[attachEvent]) {
- add(context, 'unload', function () {
- for (var k in collected) {
- collected.hasOwnProperty(k) && clean(collected[k]);
+
+ function reqwest(o, fn) {
+ return new Reqwest(o, fn)
+ }
+
+ // normalize newline variants according to spec -> CRLF
+ function normalize(s) {
+ return s ? s.replace(/\r?\n/g, '\r\n') : ''
+ }
+
+ function serial(el, cb) {
+ var n = el.name
+ , t = el.tagName.toLowerCase()
+ , optCb = function (o) {
+ // IE gives value="" even where there is no value attribute
+ // 'specified' ref: http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-862529273
+ if (o && !o.disabled)
+ cb(n, normalize(o.attributes.value && o.attributes.value.specified ? o.value : o.text))
+ }
+
+ // don't serialize elements that are disabled or without a name
+ if (el.disabled || !n) return;
+
+ switch (t) {
+ case 'input':
+ if (!/reset|button|image|file/i.test(el.type)) {
+ var ch = /checkbox/i.test(el.type)
+ , ra = /radio/i.test(el.type)
+ , val = el.value;
+ // WebKit gives us "" instead of "on" if a checkbox has no value, so correct it here
+ (!(ch || ra) || el.checked) && cb(n, normalize(ch && val === '' ? 'on' : val))
+ }
+ break;
+ case 'textarea':
+ cb(n, normalize(el.value))
+ break;
+ case 'select':
+ if (el.type.toLowerCase() === 'select-one') {
+ optCb(el.selectedIndex >= 0 ? el.options[el.selectedIndex] : null)
+ } else {
+ for (var i = 0; el.length && i < el.length; i++) {
+ el.options[i].selected && optCb(el.options[i])
+ }
+ }
+ break;
}
- context.CollectGarbage && CollectGarbage();
- });
- }
-
- var oldBean = context.bean;
- bean.noConflict = function () {
- context.bean = oldBean;
- return this;
- };
-
- (typeof module !== 'undefined' && module.exports) ?
- (module.exports = bean) :
- (context['bean'] = bean);
-
-}(this);!function ($) {
- var b = bean.noConflict(),
- integrate = function (method, type, method2) {
- var _args = type ? [type] : [];
- return function () {
- for (var args, i = 0, l = this.length; i < l; i++) {
- args = [this[i]].concat(_args, Array.prototype.slice.call(arguments, 0));
- args.length == 4 && args.push($);
- !arguments.length && method == 'add' && type && (method = 'fire');
- b[method].apply(this, args);
+ }
+
+ // collect up all form elements found from the passed argument elements all
+ // the way down to child elements; pass a '