#1515 Clipboard WIP

This commit is contained in:
GrzegorzZajac000 2024-03-18 22:49:42 +01:00
parent de019a7aae
commit 120f7c1770
2 changed files with 12 additions and 2 deletions

View File

@ -67,6 +67,10 @@ const initBEAction = (url, tab, storageData) => {
});
})
.then(channel => channel.connect())
.then(() => {
// @TODO: Ask content script for activeElement
// checkActiveElement
})
.then(() => {
if (!storage[`tabData-${tab?.id}`]?.lastFocusedInput) {
return TwoFasNotification.show(config.Texts.Success.PushSentClipboard, tab?.id);

View File

@ -19,7 +19,7 @@
const config = require('../../config');
const loadFromLocalStorage = require('../../localStorage/loadFromLocalStorage');
const { notification, inputToken, getTokenInput, showNotificationInfo, loadFonts, isInFrame, pageLoadComplete } = require('../functions');
const { notification, inputToken, getTokenInput, showNotificationInfo, loadFonts, isInFrame } = require('../functions');
const storeLog = require('../../partials/storeLog');
const contentOnMessage = async (request, tabData) => {
@ -66,8 +66,14 @@ const contentOnMessage = async (request, tabData) => {
}
}
case 'checkActiveElement': {
// const activeElement = document.activeElement;
return { status: 'todo' };
}
case 'pageLoadComplete': {
return { status: 'ok' } // Possibly for future use
return { status: 'ok' }; // Possibly for future use
}
case 'notification':