HOME


Mini Shell 1.0
DIR:/usr/local/cwpsrv/var/services/roundcube/plugins/hide_blockquote/
Upload File :
Current File : //usr/local/cwpsrv/var/services/roundcube/plugins/hide_blockquote/hide_blockquote.min.js
/**
 * Hide Blockquotes plugin script
 *
 * @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.
 */
window.rcmail&&rcmail.addEventListener("init",function(){hide_blockquote()});
function hide_blockquote(){var d=rcmail.env.blockquote_limit;0>=d||$("div.message-part div.pre > blockquote",$("#messagebody")).each(function(){var b=$(this);$("blockquote").before(document.createTextNode("\n"));var a=$.trim(b.text()).split(/\n/);a.length<=d&&b.height()<=15*d||(a=$('<blockquote class="blockquote-header">').css({"white-space":"nowrap",overflow:"hidden",position:"relative"}).text(a[0]),$('<span class="blockquote-link"></span>').css({position:"absolute","z-Index":2}).text(rcmail.get_label("hide_blockquote.show")).data("parent",
a).click(function(){var f=$(this),e=f.data("parent"),c=e.is(":visible");f.text(rcmail.get_label(c?"hide":"show","hide_blockquote")).detach().appendTo(c?b:e).toggleClass("collapsed");e[c?"hide":"show"]();b[c?"show":"hide"]()}).appendTo(a),b.hide().css({position:"relative"}).before(a))})};