Pendigard's picture
Upload folder using huggingface_hub (part 13)
5893f8f verified
Raw History Blame Contribute Delete
1.48 kB
// Controls the transitions between main tabs.
// Should be no effect there.
$(document).bind('pageinit', function(){
$("a[data-role=tab]").each(function () {
var anchor = $(this);
anchor.bind("click", function () {
$.mobile.changePage(anchor.attr("href"), {
transition: "none",
changeHash: true
});
return false;
});
});
// Controls the swipe distance.
var swipeDistance = screen.width * 2/5;
$.event.special.swipe.horizontalDistanceThreshold = swipeDistance;
});
// Avoid presenting the error twice.
var chromeErrorShown = false;
$(document).bind('pageshow', function() {
// Focus the first input in the page.
$($('.ui-page-active form :input:visible')[0]).focus();
// Display an error message, for Google Chrome for local files.
var addressBar = window.location.href;
if ( window.chrome && addressBar.indexOf('file://') === 0 && !chromeErrorShown){
$.mobile.showPageLoadingMsg(
$.mobile.pageLoadErrorMessageTheme,
"Please move the generated WebHelp output to a web server, "+
"or use another browser. Google Chrome does not handle this " +
"kind of output stored locally on the file system.", true);
chromeErrorShown = true;
}
});
// Declare the function for open and highlight, but disable it.
function openAndHighlight(){
return true;
}