HEX
Server: Apache
System: Linux s1 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: gerold (1018)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals
Upload Files
File: /home/gerold/public_html/mail/plugins/newmail_notifier/newmail_notifier.min.js
/**
 * New Mail Notifier plugin script
 *
 * @author Aleksander Machniak <alec@alec.pl>
 *
 * @licstart  The following is the entire license notice for the
 * JavaScript code in this file.
 *
 * Copyright (c) The Roundcube Dev Team
 *
 * The JavaScript code in this page is free software: you can redistribute it
 * and/or modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation, either version 3 of
 * the License, or (at your option) any later version.
 *
 * @licend  The above is the entire license notice
 * for the JavaScript code in this file.
 */
function newmail_notifier_run(i){i.basic&&newmail_notifier_basic(),i.sound&&newmail_notifier_sound(),i.desktop&&newmail_notifier_desktop(rcmail.get_label("body","newmail_notifier"))}function newmail_notifier_stop(i){!rcmail.env.favicon_href||!rcmail.env.favicon_changed||i&&"check-recent"==i.action||($('<link rel="shortcut icon" href="'+rcmail.env.favicon_href+'"/>').replaceAll('link[rel="shortcut icon"]'),rcmail.env.favicon_changed=0);try{window.external.msIsSiteMode()&&window.external.msSiteModeClearIconOverlay()}catch(i){}}function newmail_notifier_basic(){var i=rcmail.is_framed()?window.parent:window,e=rcmail.assets_path("plugins/newmail_notifier");i.focus();var n=$('<link rel="shortcut icon">').attr("href",e+"/favicon.ico"),i=$('link[rel="shortcut icon"]',i.document);rcmail.env.favicon_href||(rcmail.env.favicon_href=i.attr("href")),rcmail.env.favicon_changed=1,n.replaceAll(i);try{window.external.msIsSiteMode()&&window.external.msSiteModeSetIconOverlay(e+"/overlay.ico",rcmail.get_label("title","newmail_notifier"))}catch(i){}}function newmail_notifier_sound(){var e=rcmail.assets_path("plugins/newmail_notifier/sound"),i=navigator.mimeTypes?navigator.mimeTypes["audio/mp3"]:{};e+=bw.ie||i&&i.enabledPlugin?".mp3":".wav";try{$("<audio>").attr("src",e).get(0).play()}catch(i){$('<embed id="sound" src="'+e+'" hidden=true autostart=true loop=false />').appendTo($("body")),setTimeout("$('#sound').remove()",5e3)}}function newmail_notifier_desktop(n,t){var a=rcmail.env.newmail_notifier_timeout||10,o=rcmail.assets_path("plugins/newmail_notifier/mail.png");try{return window.Notification.requestPermission(function(i){var e;"granted"==i?((e=new window.Notification(rcmail.get_label("title","newmail_notifier"),{dir:"auto",lang:"",body:n,tag:"newmail_notifier",icon:o})).onclick=function(){this.close()},setTimeout(function(){e.close()},1e3*a)):"denied"==i&&t&&t()}),!0}catch(i){return!1}}function newmail_notifier_test_desktop(){newmail_notifier_desktop(rcmail.get_label("testbody","newmail_notifier"),function(){rcmail.display_message(rcmail.get_label("desktopdisabled","newmail_notifier"),"error")})||rcmail.display_message(rcmail.get_label("desktopunsupported","newmail_notifier"),"error")}function newmail_notifier_test_basic(){newmail_notifier_basic()}function newmail_notifier_test_sound(){newmail_notifier_sound()}window.rcmail&&"mail"==rcmail.env.task&&rcmail.addEventListener("plugin.newmail_notifier",newmail_notifier_run).addEventListener("actionbefore",newmail_notifier_stop).addEventListener("init",function(){rcmail.message_list&&rcmail.message_list.addEventListener("select",newmail_notifier_stop)});