Exemplo n.º 1
0
Arquivo: js.php Projeto: ruucla/mwf
        $loadarr = array_merge(explode(' ', $_GET['touch_libs']), $loadarr);
    }
    foreach ($loadarr as $load) {
        JS::import_library($load, 'standard');
    }
}
/**
 * Load all full (and webkit_lib for compat) libraries specified in the URI.
 */
if (User_Agent::is_full() && (isset($_GET['full_libs']) || isset($_GET['webkit_libs']))) {
    $loadarr = isset($_GET['full_libs']) ? explode(' ', $_GET['full_libs']) : array();
    if (isset($_GET['webkit_libs'])) {
        $loadarr = array_merge(explode(' ', $_GET['webkit_libs']), $loadarr);
    }
    foreach ($loadarr as $load) {
        JS::import_library($load, 'full');
    }
}
/**
 * Load custom JS files (minified) based on user agent.
 */
if (isset($_GET['basic'])) {
    foreach (explode(' ', $_GET['basic']) as $file) {
        if (Path_Validator::is_safe($file, 'css') && ($contents = Path::get_contents($file))) {
            echo ' ' . JSMin::minify($contents);
        }
    }
}
if (User_Agent::is_standard() && isset($_GET['standard'])) {
    foreach (explode(' ', $_GET['standard']) as $file) {
        if (Path_Validator::is_safe($file, 'css') && ($contents = Path::get_contents($file))) {