Skip to content

Instantly share code, notes, and snippets.

View hiroprotagonist's full-sized avatar

Stefan Gebhardt hiroprotagonist

View GitHub Profile
@hiroprotagonist
hiroprotagonist / .gitignore
Created April 11, 2012 08:32
abas-eB .gitignore for GitHub
*.swp
*.class
*.war
*.log
*.desktop
manual/
rollbackBackupDirectory
workbench/
uninstall
function sendSigning() {
var xhr = new XMLHttpRequest();
// Install progress bar / Upload status update
xhr.upload.addEventListener( 'progress', function(e) {
if ( e.lengthComputable ) {
var percentage = Math.round( (e.loaded *100) /e.total );
$('div#log').text( "Upload Status: " + percentage + "%");
}
});
@hiroprotagonist
hiroprotagonist / gist:993325
Created May 26, 2011 15:02
An Instant Search like widget
(function($, window, undefined) {
$.widget("mobile.instantsearch", $.mobile.widget, {
si: undefined, //search inupt
rd: undefined, //result div
timeout: undefined,
options: {
delay: 500
},
_init: function() {
this.rd= $("<div>");
// force certain pages to be refreshed every time. mark such pages with
// 'data-cache="never"'
//
jQuery('div').live('pagehide', function(event, ui){
var page = jQuery(event.target);
if(page.attr('data-cache') == 'never'){
page.remove();
};
});