mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
clipboard: add cl copy --download option for images/videos
- offers application/vnd.portal.filetransfer and text/uri-list
This commit is contained in:
@@ -870,6 +870,26 @@ Singleton {
|
||||
return null;
|
||||
}
|
||||
|
||||
function getPluginPasteArgs(pluginId, item) {
|
||||
if (typeof PluginService === "undefined")
|
||||
return null;
|
||||
|
||||
const instance = PluginService.pluginInstances[pluginId];
|
||||
if (!instance)
|
||||
return null;
|
||||
|
||||
if (typeof instance.getPasteArgs === "function")
|
||||
return instance.getPasteArgs(item);
|
||||
|
||||
if (typeof instance.getPasteText === "function") {
|
||||
const text = instance.getPasteText(item);
|
||||
if (text)
|
||||
return ["dms", "cl", "copy", text];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function searchPluginItems(query) {
|
||||
if (typeof PluginService === "undefined")
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user