0.7.12.4
This commit is contained in:
@@ -71,6 +71,10 @@ function alert($string, $title = "Warning") {
|
||||
echo "\nALERT:".$title."|".$string."\n";
|
||||
}
|
||||
|
||||
function notification($string) {
|
||||
echo "\nNOTIFICATION:".$string."\n";
|
||||
}
|
||||
|
||||
function askMulti($string, $buttons) {
|
||||
$buttonstring = "buttons {\\\"".implode("\\\", \\\"",$buttons)."\\\"} default button ".count($buttons);
|
||||
$result = exec("osascript -e \"display dialog \\\"".$string."\\\" ".$buttonstring."\" | cut -f2 -d':'");
|
||||
@@ -155,10 +159,6 @@ function human_filesize($bytes, $decimals = 2) {
|
||||
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$size[$factor];
|
||||
}
|
||||
|
||||
function ncenter($string, $title = "Skim") {
|
||||
exec("osascript -e 'display notification \"".$string."\" with title \"".$title."\"'");
|
||||
}
|
||||
|
||||
function utf8_for_xml($string) {
|
||||
return preg_replace ('/[^\x{0009}\x{000a}\x{000d}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}]+/u', ' ', $string);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user