Server IP : 23.254.227.96 / Your IP : 216.73.216.7 Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64 User : viralblo ( 1001) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/local/cwpsrv/var/services/roundcube/public_html/plugins/markasjunk/ |
Upload File : |
/** * Mark-as-Junk plugin script * * @licstart The following is the entire license notice for the * JavaScript code in this file. * * Copyright (c) The Roundcube Dev Team * Copyright (C) Philip Weir * * 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. */ rcube_webmail.prototype.markasjunk_mark=function(a){var c=this.env.uid?[this.env.uid]:this.message_list.get_selection();if(c){var b=this.set_busy(!0,"loading");this.http_post("plugin.markasjunk."+(a?"junk":"not_junk"),this.selection_post_data({_uid:c}),b)}}; rcube_webmail.prototype.markasjunk_move=function(a,c){var b=this.env.uid;this.message_list&&1==c.length&&!this.message_list.in_selection(c[0])&&(this.env.uid=c[0]);a?this.move_messages(a):1==this.env.markasjunk_permanently_remove?this.permanently_remove_messages():this.delete_messages();this.env.uid=b}; rcube_webmail.prototype.markasjunk_toggle_button=function(){var a=$("a.junk"),c=$("a.notjunk"),b={spam:!0,ham:!0};this.env.markasjunk_spam_only?b.ham=!1:!this.is_multifolder_listing()&&this.env.markasjunk_spam_mailbox&&(this.env.mailbox!=this.env.markasjunk_spam_mailbox?b.ham=!1:b.spam=!1);$.each(a,function(f){var e=a.eq(f),d=c.eq(f);f=a.eq(f).index();0<e.parent("li").length&&(e=e.parent(),d=d.parent());var g=rcmail.triggerEvent("markasjunk-update",{objs:{spamobj:e,hamobj:d},disp:b});g&&g.abort|| (b=g?g.disp:b,b.spam?e.show():e.hide(),b.ham?d.show():d.hide(),b.spam&&!b.ham?f<d.index()&&e.insertAfter(d):f>d.index()&&d.insertAfter(e))})};rcube_webmail.prototype.markasjunk_is_spam_mbox=function(){return!this.is_multifolder_listing()&&this.env.mailbox==this.env.markasjunk_spam_mailbox}; window.rcmail&&(rcmail.addEventListener("init",function(){rcmail.register_command("plugin.markasjunk.junk",function(){rcmail.markasjunk_mark(!0)},!rcmail.markasjunk_is_spam_mbox()&&rcmail.env.uid);rcmail.register_command("plugin.markasjunk.not_junk",function(){rcmail.markasjunk_mark(!1)},rcmail.env.uid);rcmail.message_list&&rcmail.message_list.addEventListener("select",function(a){rcmail.enable_command("plugin.markasjunk.junk",!rcmail.markasjunk_is_spam_mbox()&&0<a.get_selection(!1).length);rcmail.enable_command("plugin.markasjunk.not_junk", 0<a.get_selection(!1).length)});rcmail.markasjunk_toggle_button()}),rcmail.addEventListener("listupdate",function(){rcmail.markasjunk_toggle_button()}),rcmail.addEventListener("beforemove",function(a){a&&"object"===typeof a&&(a=a.id);if(a){var c=null;rcmail.env.markasjunk_move_spam&&a==rcmail.env.markasjunk_spam_mailbox&&a!=rcmail.env.mailbox?c=!0:rcmail.env.markasjunk_move_ham&&a==rcmail.env.markasjunk_ham_mailbox&&rcmail.env.mailbox==rcmail.env.markasjunk_spam_mailbox&&(c=!1);if(null!==c)return rcmail.markasjunk_mark(c), !1}}));