mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Resolve #1489
This commit is contained in:
parent
d04f2166d9
commit
c18ae6477d
2 changed files with 42 additions and 0 deletions
13
plugins/attachments-force-open/extension.js
Normal file
13
plugins/attachments-force-open/extension.js
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
(() => {
|
||||||
|
|
||||||
|
const dom = document.getElementById('MailMessageView').content;
|
||||||
|
|
||||||
|
dom.querySelector('.attachmentsControls').dataset.bind = '';
|
||||||
|
|
||||||
|
let ds = dom.querySelector('.attachmentsPlace').dataset;
|
||||||
|
ds.bind = ds.bind.replace('showAttachmentControls', 'true');
|
||||||
|
|
||||||
|
ds = dom.querySelector('.controls-handle').dataset;
|
||||||
|
ds.bind = ds.bind.replace('allowAttachmentControls', 'false');
|
||||||
|
|
||||||
|
})();
|
||||||
29
plugins/attachments-force-open/index.php
Normal file
29
plugins/attachments-force-open/index.php
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use RainLoop\Model\Account;
|
||||||
|
use MailSo\Imap\ImapClient;
|
||||||
|
use MailSo\Imap\Settings as ImapSettings;
|
||||||
|
use MailSo\Sieve\SieveClient;
|
||||||
|
use MailSo\Sieve\Settings as SieveSettings;
|
||||||
|
use MailSo\Smtp\SmtpClient;
|
||||||
|
use MailSo\Smtp\Settings as SmtpSettings;
|
||||||
|
use MailSo\Mime\Message as MimeMessage;
|
||||||
|
|
||||||
|
class AttachmentsForceOpenPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
|
{
|
||||||
|
const
|
||||||
|
NAME = 'Attachments force open',
|
||||||
|
AUTHOR = 'SnappyMail',
|
||||||
|
URL = 'https://github.com/the-djmaze/snappymail/pull/1489',
|
||||||
|
VERSION = '0.1',
|
||||||
|
RELEASE = '2024-03-15',
|
||||||
|
REQUIRED = '2.14.0',
|
||||||
|
CATEGORY = 'General',
|
||||||
|
LICENSE = 'MIT',
|
||||||
|
DESCRIPTION = '';
|
||||||
|
|
||||||
|
public function Init() : void
|
||||||
|
{
|
||||||
|
$this->addJs('extension.js'); // add js file
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue