// 버튼 클릭 했을 때
function onClick_clipboard(){
	/* Get the text field */
	var copyText = document.getElementById("clipboard");

	var isIOS = (UserAgent.match(/i(Phone|Pod)/i) != null ) true : false;
	if(isIOS){
    	// ios 일때
		iosCopyToClipboard(copyText);
	}else{
    	// ios가 아닐때
		copyToClipboard(copyText);
	}


	/* Alert the copied text */
	alert("copy 되었습니다.");
	return false;
}

// ios가 아닐 때
function copyToClipboard(copyText){
	/* Select the text field */
	copyText.select();

	/* Copy the text inside the text field */
	document.execCommand("copy");
}

// ios 일때
function iosCopyToClipboard(el) {
	var oldContentEditable = el.contentEditable,
		oldReadOnly = el.readOnly,
		range = document.createRange();

	el.contentEditable = true;
	el.readOnly = false;
	range.selectNodeContents(el);

	var s = window.getSelection();
	s.removeAllRanges();
	s.addRange(range);

	// A big number, to cover anything that could be inside the element.
	el.setSelectionRange(0, 999999); 

	el.contentEditable = oldContentEditable;
	el.readOnly = oldReadOnly;

	document.execCommand('copy');
}
Posted by august5pm
,

1. 터미널에서 npm 으로  node-sass 설치

npm install node-sass –g

 

 

 

2. 웹스톰에서 node-sass 설정

1) Program

C:\Users\DF-125_USER\AppData\Roaming\npm\node-sass

 

2) Arguments

--source-map true --output-style compressed $FilePathRelativeToProjectRoot$ $FileParentDir$/css/$FileNameWithoutExtension$.css

 

3) Output paths to refresh

$FileParentDir$/css/$FileNameWithoutExtension$.css:$FileParentDir$/css/$FileNameWithoutExtension$.css.map

 

4)  Working directory
$ProjectFileDir$

 

Posted by august5pm
,
/**
 *	페이지 이름 가져오기
 *	@return pageName 현재 페이지 이름
 */
function getPageName(){
	var pageName = "";

	var tempPageName = window.location.href;
	var strPageName = tempPageName.split("/");
	pageName = strPageName[strPageName.length-1].split("?")[0];

	return pageName;
}
Posted by august5pm
,