Move browser detection to the extension
ClosedPublic

Authored by fvogt on Jul 14 2017, 8:20 PM.

Details

Summary

It's much easier to detect the browser there, so let the extension write
a message with the browser name (mapped to Settings::Environment) to the
native host. Also add support for Vivaldi.

Test Plan

Installed the extension in Firefox 52, Opera 40 and Vivaldi 1.91,
the icons in krunner appear as expected.

Diff Detail

Repository
R856 Plasma Browser Integration
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
fvogt created this revision.Jul 14 2017, 8:20 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 14 2017, 8:20 PM
fvogt added a comment.Jul 14 2017, 8:22 PM

I noticed that the correct dir for the firefox native messaging host is not /usr/lib/mozilla/native-messaging-hosts/org.kde.plasma.browser_integration.json, but rather /usr/lib64/mozilla/native-messaging-hosts/org.kde.plasma.browser_integration.json. I'm not 100% sure whether that's the case everywhere with a /usr/lib64 dir.

BTW: There's a typo in the author's mail address in manifest.json

broulik accepted this revision.Jul 14 2017, 8:31 PM

Very nice!

This revision is now accepted and ready to land.Jul 14 2017, 8:31 PM
broulik added inline comments.Jul 14 2017, 8:33 PM
extension/extension.js
55 ↗(On Diff #16724)

Please use braces also for one line statements

fvogt marked an inline comment as done.Jul 14 2017, 9:45 PM
This revision was automatically updated to reflect the committed changes.