broulik created this revision. broulik added reviewers: Plasma, fvogt, davidedmundson, nicolasfella, apol. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. broulik requested review of this revision.
REVISION SUMMARY This implements Web Share API Level 1 [1] through Purpose and also adds a generic "Share..." context menu entry. It can be tested on [2]. [1] https://w3c.github.io/web-share/ [2] https://w3c.github.io/web-share/demos/share.html TEST PLAN - Successfully shared a tweet via E-Mail on Twitter's mobile site (unfortunately the Desktop site doesn't make use of it) - Sending to KDE Connect works - Verified that calling it without user interaction isn't possible F7246859: Screenshot_20190814_131126.png <https://phabricator.kde.org/F7246859> F7246860: Screenshot_20190814_131148.png <https://phabricator.kde.org/F7246860> I couldn't figure out how to pass both a title and contents simultaneously to it since it seems to abuse the "urls" field for all kinds of random purposes like email *body*. The browser context menu also gets a "Share..." entry where you can share whatever page, link, image, video, etc you're pointing at. Unfortunately, when both this and KDE Connect Devices are present, you now get a "Plasma Browser Integration" sub menu with both entries in it. REPOSITORY R856 Plasma Browser Integration REVISION DETAIL https://phabricator.kde.org/D23151 AFFECTED FILES CMakeLists.txt extension/_locales/en/messages.json extension/constants.js extension/content-script.js extension/extension-purpose.js extension/manifest.json extension/options.html host/CMakeLists.txt host/main.cpp host/purposeplugin.cpp host/purposeplugin.h To: broulik, #plasma, fvogt, davidedmundson, nicolasfella, apol Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart