Skip to content

Commit

Permalink
0.2.1
Browse files Browse the repository at this point in the history
theme import from web available
  • Loading branch information
krynen committed Sep 6, 2017
1 parent 8a0b154 commit 05d4adf
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
9 changes: 8 additions & 1 deletion lib/browserified.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ configDefault = {
theme에서 제한 가능 */
badgeVisible : false, /* 구독, 비트 등 뱃지를 표시할지
theme에서 제한 가능 */
themeURI : "", /* 불러올 테마 Uri.
로컬 테마를 이용할 경우 공백으로 둔다. */
theme : "default", // 사용할 테마. theme\테마\*의 파일을 사용
themeName : "", /* 테마의 이름
theme로부터 import */
Expand Down Expand Up @@ -311,9 +313,14 @@ if ( (configData.replaceMsgs) && (configData.replaceMsgs.length>0) ) {
var loadCss = function() {

document.head.appendChild( function() {
if (configData.themeURI == "") { configData.themeURI = "./theme/"; }
else if (configData.themeURI[configData.themeURI.length-1] != "/") {
configData.themeURI += "/";
}

var ret = document.createElement("link");
ret.rel = "stylesheet";
ret.href = "theme/" + configData.theme + "/theme.css";
ret.href = configData.themeURI + configData.theme + "/theme.css";
ret.onload = function() {
debugLog(configData.themeName + " 테마를 적용했습니다.");
checkComplete();
Expand Down
1 change: 1 addition & 0 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ configData = {
numChatMax : 20,
personalColor : /*false*/true,
badgeVisible : true,
themeURI : "",
theme : "default",
themeName : "",
msgExistDuration : 0,
Expand Down
15 changes: 13 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
* ★badgeVisible 왕관 등 뱃지를 표시할지 *
* true, false *
* *
* ☆themeUri 테마를 불러올 주소 *
* "a.b/"일 경우 a.b/테마 이름/theme.css *
* 자신의 pc에서 불러올 경우 "" *
* *
* ★theme 사용할 테마 *
* theme 폴더 안의 폴더명 입력 *
* "테마 이름" *
Expand Down Expand Up @@ -105,7 +109,14 @@
*********************** Version Info ***********************
* *
* ********************************************** *
* * 2.0.0 : 5th Sep 2017 * *
* * 0.2.1 : 6th Sep 2017 * *
* ********************************************** *
* 추가된 기능 *
* - CSS 테마 웹에서 불러오기 지원 *
* *
* *
* ********************************************** *
* * 0.2.0 : 5th Sep 2017 * *
* ********************************************** *
* 추가된 기능 *
* - 채팅 내 구독콘 및 디씨콘 이용 가능 *
Expand All @@ -120,7 +131,7 @@
* *
* *
* ********************************************** *
* * 1.0.0 : 29th Aug 2017 (Pre released) * *
* * 0.1.0 : 29th Aug 2017 (Pre released) * *
* ********************************************** *
* 제공된 기능 *
* - 핵심 기능: 트위치 채팅에 접속해 *
Expand Down
9 changes: 8 additions & 1 deletion source/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ configDefault = {
theme에서 제한 가능 */
badgeVisible : false, /* 구독, 비트 등 뱃지를 표시할지
theme에서 제한 가능 */
themeURI : "", /* 불러올 테마 Uri.
로컬 테마를 이용할 경우 공백으로 둔다. */
theme : "default", // 사용할 테마. theme\테마\*의 파일을 사용
themeName : "", /* 테마의 이름
theme로부터 import */
Expand Down Expand Up @@ -310,9 +312,14 @@ if ( (configData.replaceMsgs) && (configData.replaceMsgs.length>0) ) {
var loadCss = function() {

document.head.appendChild( function() {
if (configData.themeURI == "") { configData.themeURI = "./theme/"; }
else if (configData.themeURI[configData.themeURI.length-1] != "/") {
configData.themeURI += "/";
}

var ret = document.createElement("link");
ret.rel = "stylesheet";
ret.href = "theme/" + configData.theme + "/theme.css";
ret.href = configData.themeURI + configData.theme + "/theme.css";
ret.onload = function() {
debugLog(configData.themeName + " 테마를 적용했습니다.");
checkComplete();
Expand Down

0 comments on commit 05d4adf

Please sign in to comment.