Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
emacs helm likeな WebExtensions を作った話
Search
Hiroki Kumamoto
February 22, 2018
Programming
0
140
emacs helm likeな WebExtensions を作った話
tech talk about
https://github.com/kumabook/bebop/
Hiroki Kumamoto
February 22, 2018
Tweet
Share
More Decks by Hiroki Kumamoto
See All by Hiroki Kumamoto
How to implement timetable view on iOS
kumabook
0
86
Promiseを実装してみよう
kumabook
0
280
bff_tips.pdf
kumabook
0
61
Tips of server-side rendering with react + redux
kumabook
0
67
プロトコルを使って複数サービスを跨いだmusic playerを実装する
kumabook
2
540
merges sort
kumabook
0
77
lightweight introducing with reactive cocoa
kumabook
0
53
basic_sort
kumabook
0
70
git_peco_tips
kumabook
0
26
Other Decks in Programming
See All in Programming
週次リリースを実現するための グローバルアプリ開発
tera_ny
1
1.2k
歴史と現在から考えるスケーラブルなソフトウェア開発のプラクティス
i10416
0
300
asdf-ecspresso作って 友達が増えた話 / Fujiwara Tech Conference 2025
koluku
0
1.4k
情報漏洩させないための設計
kubotak
5
1.3k
HTML/CSS超絶浅い説明
yuki0329
0
190
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
770
ecspresso, ecschedule, lambroll を PipeCDプラグインとして動かしてみた (プロトタイプ) / Running ecspresso, ecschedule, and lambroll as PipeCD Plugins (prototype)
tkikuc
2
1.8k
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
1k
선언형 UI에서의 상태관리
l2hyunwoo
0
270
QA環境で誰でも自由自在に現在時刻を操って検証できるようにした話
kalibora
1
140
『改訂新版 良いコード/悪いコードで学ぶ設計入門』活用方法−爆速でスキルアップする!効果的な学習アプローチ / effective-learning-of-good-code
minodriven
28
4.1k
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.2k
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
570
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Six Lessons from altMBA
skipperchong
27
3.6k
The Pragmatic Product Professional
lauravandoore
32
6.4k
It's Worth the Effort
3n
183
28k
We Have a Design System, Now What?
morganepeng
51
7.3k
Scaling GitHub
holman
459
140k
Speed Design
sergeychernyshev
25
730
Mobile First: as difficult as doing things right
swwweet
222
9k
Transcript
EMACS HELM LIKEͳ WEBEXTENSIONS Λ࡞ͬͨ@KUMABOOK WE’RE JAVASCRIPTERS@16TH
▸ Hiroki Kumamoto ▸ github, twitter @kumabook ▸ Software engineer
@ Spincoaster, Inc ▸ JavaScript, Swift, Ruby (rails), rust ࣗݾհ
TEXT ࠓ͢͜ͱ ▸ WebExtensionsͱ ▸ ࣗ࡞WebExtensions: bebopͷհ ▸ WebExtensionsͷϕετϓϥΫςΟε
TEXT WebExtensionsͱ ▸ ϒϥβͷػೳΛ֦ு͢Δͷ ▸ HTML+JavaScript+CSSͰ։ൃͰ͖Δ ▸ Ϋϩεϒϥβ ▸ extension
API ͕ඪ४༷ ▸ ϒϥβؒͷࠩҟ݁ߏ͋Δ
TEXT WebExtensionsͰͰ͖Δ͜ͱ ▸ WebϖʔδͷίϯςϯπΛมߋ ▸ AdBlock ▸ πʔϧόʔʹϝχϡʔɾΟδΣοτΛՃ ▸ QR
Code Image Generator
TEXT ࠓճ࡞ͬͨͷ ▸ Emacs helm on WebExtensions ▸ incremental completion
and selection narrowing framework ▸ Spotlightͱ͔pecoͱ͔ ▸ github.com/kumabook/bebop ▸ firefox bebop, chrome bebopͱ͔Ͱݕࡧ
TEXT ࠓճ࡞ͬͨͷ ▸ ΫΤϦͰީิΛߜΓࠐΜͰɺΞΫγϣϯΛ࣮ߦ ▸ ཤྺͷݕࡧɾআ ▸ ϒοΫϚʔΫͷݕࡧɾআ ▸ λϒͷҰׅআ
▸ Ϛεͳ͠Ͱ৭ʑͰ͖Δ
TEXT ࠓճ࡞ͬͨͷ ▸ Alternative to Vimperator ▸ mouseless browsing͕Ͱ͖ͨਆΞυΦϯ ▸
چΞυΦϯFirefox Quantum͔Β͓੦͖ʹ ▸ vimperatorຽ͕ଓग़ ▸ Related works: vim-vixen, tridactyl, Surfingkeys ▸ γϯϓϧʹཉ͍͠ػೳ͚ͩΛΓग़ͨ͠
TEXT WebExtensionsͷΞʔΩςΫνϟ
TEXT ΞʔΩςΫνϟ background script popup content script options ui ϝοηʔδύογϯά
TEXT ΞʔΩςΫνϟ ▸ ίϯϙʔωϯτʹΑͬͯͰ͖Δ͜ͱ͕ҧ͏ͷͰɺผίϯϙʔωϯ τʹॲཧΛҕৡ͢Δඞཁ͕͋Δ ▸ ίϯϙʔωϯτؒͷΓऔΓ ▸ ֤ίϯϙʔωϯτಠཱ࣮ͯ͠ߦɾ໊લۭؒผ ▸
֤ίϯϙʔωϯτؒͷΓऔΓϝοηʔδύογϯά ▸ PortͱݺΕ͍ͯΔ ▸ ඇಉظʹportʹϝοηʔδΛ͛߹͍ͳ͕Βॲཧ͕ਐΉ
TEXT ϕετϓϥΫςΟε ▸ WebExtensions։ൃͷ͠͞ ▸ ίʔϧόοΫhell ▸ ঢ়ଶཧͷ͠͞ ▸ react,
redux, redux-saga͕૬ੑΑ͔ͬͨ
TEXT react ▸ طଘͷίϯϙʔωϯτΛ࠶ར༻Ͱ͖Δ ▸ ϩʔΧϧ͔ΒεΫϦϓτΛಡΈࠐΉͷͰαΠζ͕Ͱ͔͍͜ͱ ؾʹͳΒͳ͍
TEXT redux ▸ popup ͱoptions uiͰreduxΛ༷ ▸ background script ͱcontent_scriptstateless
apiΛఏڙ ▸ options uiͱpopupؒstorage apiͰঢ়ଶΛڞ༗ ▸ options uiͱpopupഉଞత ▸ ด͡Δͱ͖ʹstateΛอଘͯ͠ɺ্ཱͪ͛Δͱ͖ʹϩʔυ͢Δ ▸ reduxͷinitial stateʹ͢Δ ▸ Storage apiڞ༗ͷඇಉظͳlocalStorage
TEXT Redux background script popup content script options ui STATELESSͳAPI
STORAGE APIͰ STATE ڞ༗ REDUX REDUX
TEXT redux-saga ▸ redux-sagaͷchannelΛ͏ ▸ ֎෦ͷΠϕϯτΛநԽͨ͠ͷ ▸ background scriptͷportͷϝοηʔδύογϯάΛϥοϓ ▸
ϝοηʔδͷܗࣜΛreduxͷactionͱಉ͡ܗࣜʹ͢Δ ▸ { type: String, payload: Any } ▸ ࣗಈతʹmessage͔Βactionʹม ▸ ಁաతʹbackground script͔ΒΞΫγϣϯΛdispatchͰ͖Δ
TEXT Redux background script popup REDUX-SAGA CHANNEL MESSAGE ACTION
TEXT ·ͱΊ ▸ WebExtensionsͷ։ൃʹ͍ͭͯͷ֓ཁ ▸ ࣗ࡞WebExtensions bebopͷհ ▸ ྑ͔ͬͨΒελʔΛΒ͑Δͱتͼ·͢ ▸
WebExtensions։ൃͰීஈͷWeb։ൃͷϑϨʔϜϫʔΫ ͑Δ ▸ react, redux, redux-saga