forked from skyisle/nendic-ext
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* develop: (26 commits) 피드백 경로 추가 피드백 페이지 만들기 빌드 코드 정리 지표 코드 추가 사전 선택 동작 튜닝 (드래그 + 더블클릭) 의존 모듈 정의하기 애널리틱스 코드 추가 글자크기 옵션 추가 단어 선택 옵션 적용하기 옵션 페이지 및 단어 선택 옵션 추가 팝업에서 검색 버튼 클릭 시 사전 노출 - 사전 결과가 프레임으로 추가되는 방식 - 엔터를 입력하면 다시 갱신됨 팝업 설정 버튼 크기 조절 팝업 마크업 추가 웹폰트 변경 오디오 듣기, 사전 전환 등 기존 기능 복원하기 뷰 로드 사용성 개선 드래그로 사전 선택할 수 있게 하기 유효한 단어인지 확인하기 (영어만, 3단어 이내) 사전 렌더링 후에 iframe 크기 자동 조절하기 백그라운드에서 iframe 으로 사전 데이터 보내기 사전 iframe 렌더링하기 ...
- Loading branch information
Showing
66 changed files
with
4,330 additions
and
3,596 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
## TODO | ||
|
||
설정 정보에 이후 개선 내용에 대한 슬라이드 추가하기 | ||
|
||
창이 열려있는 상태에서 렌더링 시 창 크기 변경하기 | ||
|
||
페이스북 페이지 임베드하기 | ||
단축키 입력 시 사전 동작하게 하기 (백그라운드로 메시지 보내기) | ||
단어장 페이지 만들기 | ||
- 꿀벌 단어장 | ||
- 사전 익스텐션에서 단어장으로 보내기 | ||
- 특정 페이지에 들어갔을 때, 내가 찾았던 단어를 하이라이트해서 보여주는 아이디어 | ||
|
||
|
||
## DOING | ||
개선 내용에 대한 엑셀 파일을 설정 페이지에 추가하기 | ||
- https://docs.google.com/spreadsheets/d/19eSjHMtyF_RsF8EYa655SPjYB8EQFplfmPA_dozfIB0/edit#gid=0 | ||
- 앵귤러에서 선택해서 컨트롤러를 변경하는 방법에 대해 알아봐야 함 | ||
|
||
|
||
## Complete | ||
더블클릭 시 백그라운드로 메시지 보내기 | ||
백그라운드에서 프레임으로 보내서 사전 iframe 띄우기 | ||
일단 선택한 단어를 iframe 에 출력하기 | ||
배경 클릭 시 iframe 닫기 | ||
백그라운드에서 사전 데이터 요청/파싱하기 | ||
백그라운드에서 iframe 으로 사전 데이터 보내기 | ||
사전 iframe 렌더링하기 | ||
사전 렌더링 후에 iframe 크기 자동 조절하기 | ||
유효한 단어인지 확인하기 (영어만, 3단어 이내) | ||
드래그로 사전 선택할 수 있게 하기 | ||
오디오 듣기, 사전 전환 등 기존 기능 복원하기 | ||
뷰 로드 시 요청이 2번 나가는 것 개선하기 | ||
웹폰트 로드하기 | ||
웹폰트 워닝 제거하기 | ||
팝업에서 마크업 추가 | ||
팝업에서 검색 버튼 클릭 시 사전 노출 | ||
- 사전 결과가 프레임으로 추가되는 방식 | ||
- 엔터를 입력하면 다시 갱신됨 | ||
옵션 페이지 만들기 | ||
사전 글자 크기 설정하기 | ||
애널리틱스 추가하기 | ||
의존 모듈 정의하기 | ||
애널리틱스에 분석이 필요한 데이터가 무엇인지 정의하기 | ||
더블클릭과 마우스 드래그를 명확하게 나누기 | ||
지표 코드 추가하기 | ||
사용하지 않는 파일 정리하기 | ||
빌드 코드 정리하기 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
### | ||
애널리틱스 수집 모듈 | ||
모든 애널리틱스 지표는 백그라운드에서 처리한다. | ||
뷰어나 다른 모듈에서는 바로 수집하는 대신 백그라운드로 메시지를 보낸다. | ||
### | ||
@define 'analyticsTracker', ($$constant, $$uuid, $$storage, $$message) -> | ||
|
||
whenTrackingRequested = $$message.createListenerToExtension 'A:trackingRequested' | ||
|
||
startTracking = (clientId) -> | ||
# @ga_debug = true | ||
# ` | ||
# (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ||
# (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | ||
# m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | ||
# })(window,document,'script','https://www.google-analytics.com/analytics_debug.js','ga'); | ||
# ` | ||
|
||
` | ||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | ||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | ||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); | ||
` | ||
@ga 'create', $$constant.ANALYTICS_ID, | ||
'storage': 'none' | ||
'clientId': clientId | ||
@ga 'set', 'forceSSL', true # 익스텐션은 모두 SSL로 보내야 한다. | ||
@ga 'set', 'checkProtocolTask', null # 프로토콜 체킹 없이 보낸다. | ||
@ga 'send', 'pageview', useBeacon: true | ||
|
||
# 이벤트를 전송한다. | ||
# @param {String} eventString 이벤트 문자열 '카테고리:액션:레이블' | ||
track = (eventString) -> | ||
[category, action, label] = eventString.split(':') | ||
@ga 'send', 'event', category, action, label, useBeacon: true | ||
|
||
$$storage.get('clientId') | ||
.then (clientId) -> | ||
return clientId if clientId | ||
|
||
$$storage.set('clientId', $$uuid.generateGuid()).then () -> | ||
$$storage.get('clientId') | ||
|
||
.then (clientId) -> | ||
startTracking clientId | ||
whenTrackingRequested track |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
### | ||
각 프레임과의 메시지 수신을 담당한다. | ||
### | ||
@define 'background', ($$message, $$wordSearcher) -> | ||
#-------------------- | ||
# Functions | ||
#-------------------- | ||
whenWordSelected = $$message.createListenerToTab 'T:wordSelected' | ||
whenOutsideClicked = $$message.createListenerToTab 'T:outsideClicked' | ||
whenViewerInitialized = $$message.createListenerToTab 'T:viewerInitialized' | ||
whenViewerRendered = $$message.createListenerToTab 'T:viewerRendered' | ||
whenDicTypeToggled = $$message.createListenerToTab 'T:dicTypeToggled' | ||
|
||
whenDicTypeToggledOnPopup = $$message.createListenerToPopup 'P:dicTypeToggled' | ||
whenQuerySubmitted = $$message.createListenerToPopup 'P:querySubmitted' | ||
|
||
sendWordSearched = $$message.createSenderToTab 'B:wordSearched' | ||
sendOutsideClicked = $$message.createSenderToTab 'B:outsideClicked' | ||
sendViewerRendered = $$message.createSenderToTab 'B:viewerRendered' | ||
|
||
sendWordSearchedToPopup = $$message.createSenderToPopup 'P:wordSearched' | ||
|
||
#-------------------- | ||
# Main Tasks | ||
#-------------------- | ||
whenViewerRendered sendViewerRendered | ||
whenOutsideClicked sendOutsideClicked | ||
|
||
whenWordSelected (word) -> | ||
$$wordSearcher.searchWord(word, sendWordSearched) | ||
whenDicTypeToggled (isEE) -> | ||
$$wordSearcher.toggleDicType(isEE, sendWordSearched) | ||
|
||
whenViewerInitialized -> | ||
$$wordSearcher.searchWordWithRecentQuery(sendWordSearched) | ||
|
||
whenQuerySubmitted (word) -> | ||
$$wordSearcher.searchWord(word, sendWordSearchedToPopup) | ||
whenDicTypeToggledOnPopup (isEE) -> | ||
$$wordSearcher.toggleDicType(isEE, sendWordSearchedToPopup) |
Oops, something went wrong.