Upgrade to Pro — share decks privately, control downloads, hide ads and more …

emacs helm likeな WebExtensions を作った話

emacs helm likeな WebExtensions を作った話

Hiroki Kumamoto

February 22, 2018
Tweet

More Decks by Hiroki Kumamoto

Other Decks in Programming

Transcript

  1. ▸ Hiroki Kumamoto ▸ github, twitter @kumabook ▸ Software engineer

    @ Spincoaster, Inc ▸ JavaScript, Swift, Ruby (rails), rust ࣗݾ঺հ
  2. TEXT ࠓճ࡞ͬͨ΋ͷ ▸ Emacs helm on WebExtensions ▸ incremental completion

    and selection narrowing framework ▸ Spotlightͱ͔pecoͱ͔ ▸ github.com/kumabook/bebop ▸ firefox bebop, chrome bebopͱ͔Ͱݕࡧ
  3. TEXT ࠓճ࡞ͬͨ΋ͷ ▸ Alternative to Vimperator ▸ mouseless browsing͕Ͱ͖ͨਆΞυΦϯ ▸

    چΞυΦϯ͸Firefox Quantum͔Β͓੦͖ʹ ▸ vimperator೉ຽ͕ଓग़ ▸ Related works: vim-vixen, tridactyl, Surfingkeys ▸ γϯϓϧʹཉ͍͠ػೳ͚ͩΛ੾Γग़ͨ͠
  4. TEXT redux ▸ popup ͱoptions uiͰreduxΛ࢓༷ ▸ background script ͱcontent_script͸stateless

    apiΛఏڙ ▸ options uiͱpopupؒ͸storage apiͰঢ়ଶΛڞ༗ ▸ options uiͱpopup͸ഉଞత ▸ ด͡Δͱ͖ʹstateΛอଘͯ͠ɺ্ཱͪ͛Δͱ͖ʹϩʔυ͢Δ ▸ reduxͷinitial stateʹ͢Δ ▸ Storage api͸ڞ༗ͷඇಉظͳlocalStorage
  5. TEXT redux-saga ▸ redux-sagaͷchannelΛ࢖͏ ▸ ֎෦ͷΠϕϯτΛந৅Խͨ͠΋ͷ ▸ background scriptͷportͷϝοηʔδύογϯάΛϥοϓ ▸

    ϝοηʔδͷܗࣜΛreduxͷactionͱಉ͡ܗࣜʹ͢Δ ▸ { type: String, payload: Any } ▸ ࣗಈతʹmessage͔Βactionʹม׵ ▸ ಁաతʹbackground script͔ΒΞΫγϣϯΛdispatchͰ͖Δ
  6. TEXT ·ͱΊ ▸ WebExtensionsͷ։ൃʹ͍ͭͯͷ֓ཁ ▸ ࣗ࡞WebExtensions bebopͷ঺հ ▸ ྑ͔ͬͨΒελʔΛ΋Β͑Δͱتͼ·͢ ▸

    WebExtensions։ൃͰ΋ීஈͷWeb։ൃͷϑϨʔϜϫʔΫ ͸࢖͑Δ ▸ react, redux, redux-saga