Use window.postMessage instead of creating a wrapper item
ClosedPublic

Authored by broulik on Jun 20 2019, 1:40 PM.

Details

Summary

This should make it less invasive by not messing with the website DOM.

Test Plan

Still get album art, artist info, and callbacks on both Chrome and Firefox

Diff Detail

Repository
R856 Plasma Browser Integration
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Jun 20 2019, 1:40 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 20 2019, 1:40 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Jun 20 2019, 1:40 PM
broulik added inline comments.Jun 20 2019, 2:57 PM
extension/content-script.js
639

Oops :)

fvogt requested changes to this revision.Jun 20 2019, 5:22 PM

Also do some more sanity checks on the input data.

Are those even necessary at that point? Considering that the referenced payload properties can still be literally anything and now even direct objects instead of just stuff converted to JSON and back.

extension/content-script.js
637

Whitespace

639

Yeah, let's keep it "family friendly" ;-)

658

Whitespace

This revision now requires changes to proceed.Jun 20 2019, 5:22 PM
broulik updated this revision to Diff 60186.Jun 21 2019, 8:50 AM
broulik edited the summary of this revision. (Show Details)
  • Cleanup
fvogt accepted this revision.Jul 2 2019, 7:41 AM
This revision is now accepted and ready to land.Jul 2 2019, 7:41 AM
This revision was automatically updated to reflect the committed changes.