Skip to content

Commit

Permalink
Resolve #1489
Browse files Browse the repository at this point in the history
  • Loading branch information
the-djmaze committed Mar 15, 2024
1 parent d04f216 commit c18ae64
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
13 changes: 13 additions & 0 deletions plugins/attachments-force-open/extension.js
Original file line number Diff line number Diff line change
@@ -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 changes: 29 additions & 0 deletions plugins/attachments-force-open/index.php
Original file line number Diff line number Diff line change
@@ -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
}
}

0 comments on commit c18ae64

Please sign in to comment.