assets/js/uncompressed/ace.js
(开头部分) 67KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
Required. Ace's Basic File to Initiliaze Different Parts & Some Variables.
*/
if( !('ace' in window) ) window['ace'] = {}
if( !('helper' in window['ace']) ) window['ace'].helper = {}
if( !('options' in window['ace']) ) window['ace'].options = {}
if( !('vars' in window['ace']) ) {
window['ace'].vars = {
'icon' : ' ace-icon ',
'.icon' : '.ace-icon'
}
}
ace.vars['touch'] = 'ontouchstart' in document.documentElement;
jQuery(function($) {
//sometimes we try to use 'tap' event instead of 'click' if jquery mobile plugin is available
ace.click_event = ace.vars['touch'] && $.fn.tap ? 'tap' : 'click';
//sometimes the only good way to work around browser's pecularities is to detect them using user-agents
//though it's not accurate
var agent = navigator.userAgent
ace.vars['webkit'] = !!agent.match(/AppleWebKit/i)
ace.vars['safari'] = !!agent.match(/Safari/i) && !agent.match(/Chrome/i);
ace.vars['android'] = ace.vars['safari'] && !!agent.match(/Android/i)
ace.vars['ios_safari'] = !!agent.match(/OS ([4-9])(_\d)+ like Mac OS X/i) && !agent.match(/CriOS/i)
ace.vars['old_ie'] = document.all && !document.addEventListener;
ace.vars['non_auto_fixed'] = ace.vars['android'] || ace.vars['ios_safari'];
// for android and ios we don't use "top:auto" when breadcrumbs is fixed
if(ace.vars['non_auto_fixed']) {
$('body').addClass('mob-safari');
}
var docStyle = document.documentElement.style;
ace.vars['transition'] = 'transition' in docStyle || 'WebkitTransition' in docStyle || 'MozTransition' in docStyle || 'OTransition' in docStyle
/////////////////////////////
//a list of available functions with their arguments
// >>> null means enable
// >>> false means disable
// >>> other means function arguments (object)
var available_functions = {
'general_vars' : null,//general_vars should come first
'add_touch_drag' : null,
'general_things' : null,
'handle_side_menu' : null,
'sidebar_scrollable' : {
//'only_fixed': true, //enable only if sidebar is fixed , for 2nd approach only
'scroll_to_active': true, //scroll to selected item? (one time only on page load)
'include_shortcuts': true, //true = include shortcut buttons in the scrollbars
'include_toggle': false || ace.vars['safari'] || ace.vars['ios_safari'], //true = include toggle button in the scrollbars
'smooth_scroll': 200, //> 0 means smooth_scroll, time in ms, used in first approach only, better to be almost the same amount as submenu transition time
'outside': false//true && ace.vars['touch'] //used in first approach only, true means the scrollbars should be outside of the sidebar
},
'sidebar_hoverable' : {'sub_scroll': false},
后面还有 2041 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
