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
Justpaste
Search
Shume
April 25, 2013
Programming
0
300
Justpaste
A convenient image uploader
Shume
April 25, 2013
Tweet
Share
More Decks by Shume
See All by Shume
Git
ciffel
2
550
Other Decks in Programming
See All in Programming
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
今から始めるClaude Code超入門
448jp
8
8.5k
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
120
CSC307 Lecture 04
javiergs
PRO
0
660
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
600
Fluid Templating in TYPO3 14
s2b
0
130
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
Data-Centric Kaggle
isax1015
2
760
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2k
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
130
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
5
340
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
55
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
110
Building a Scalable Design System with Sketch
lauravandoore
463
34k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
280
Crafting Experiences
bethany
1
48
Practical Orchestrator
shlominoach
191
11k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Transcript
Justpaste A convenient image uploader http://justpaste.shume.in Shu-Ming Chang @ CNA
micro conf.
Who am I • Shu-Ming Chang (ciffel) • Full time
student at NTHU CSIE • CCU alumnus • Love web development and ruby • But work with Python... • Hate duplication (DRY)
今天要分享的是 JavaScript
今天要分享的是萌圖
聊聊圖⽚片分享
以前如何截圖? 1. PrintScreen
以前如何分享截圖? 2. 開啟⼩小畫家
以前如何分享截圖? 3. 貼上
以前如何分享截圖? 4. 存檔
以前如何分享截圖? 5. 上傳
以前如何分享截圖? 6. 取得連結
Why Justpaste • 分享圖⽚片,特別是截圖 • 簡化處理的步驟 • 圖床 (imgur)
Justpaste 1. PrintScreen or Ctrl-C
Justpaste 2. 貼上
Justpaste 3. 取得連結
實況看動畫 Live Demo
實作細節
More Detail • HTML • Canvas • CSS • Bootstrap
• Javascript (jQuery) • DOM traversal • Cross domain AJAX
Clipboard與Browser的 愛恨情仇 • ⼤大多Browser都限制Clipboard的存取權限 • Firefox, Chrome可讀取 • 但不能”寫⼊入” (Read-only)
Chrome讀取Clipboard • Google Chrome • window.Clipboard • window.addEventListener("paste", pasteHandler); •
從event.item[]中可以取得內容
Firefox讀取Clipboard • Mozilla Firefox • <div contenteditable="true"></div> (hide) • 要確保focus在此
• window.addEventListener("paste", pasteHandler); • 在DOM中取得children node (img)
寫⼊入Clipboard • Flash • ZeroClipboard • 但是還是要有click的⾏行為,無法隨⼼心所 欲的寫⼊入
談談圖床吧 • imgur • RESTful API • Free: 1250 uploads
per day • 有⼈人上傳糟糕圖,不會被報警處理
Justpaste純Front-end • 曾經有個Ruby+Sinatra back-end • 現在純JavaScript • Cross domain AJAX呼叫RESTful
API • 需要Server⽀支援 • http://www.html5rocks.com/en/ tutorials/cors/
為什麼要做Web App? • 其實我也做過Native App直到我...... • Web App的好處 • ⽐比較潮
• 不需要安裝 • 版本永遠是最新的
Future Works • Drag and Drop (current working) • Browser
extension • History • Album
Source Code https://github.com/ciffel/justpaste