Skip to content

Instantly share code, notes, and snippets.

@wagurano
Last active August 29, 2015 14:17
Show Gist options
  • Save wagurano/641c96627a24c1b110ff to your computer and use it in GitHub Desktop.
Save wagurano/641c96627a24c1b110ff to your computer and use it in GitHub Desktop.
1thing.kr 배너 담기
var OneThingBar=function() {
// 1thing.kr - Let's start with one thing.
var styl = document.createElement('style')
styl.innerHTML = "div#notification-banner { background: rgba(255, 51, 0, 1); border-radius: 0 0 6px 6px; color: rgba(255, 255, 255, 1); cursor: pointer; font-weight: bold; font-family: Open Sans; left: 0%; line-height: 25px; margin-left: 0px; position: fixed; text-align: center; top: 0; width: 100%; } div#notification-banner span { padding: 3px 10px; }"
document.body.appendChild(styl)
var banner = document.createElement("div")
banner.id = "notification-banner"
banner.onclick = (function () { return function() {this.style.display='none'} })()
banner.title="누르면 사라집니다.(click to hide)"
banner.innerHTML = '뭐라도 해야겠는데 그저 막막하신가요? 작은 것 하나를 <a href="http://1thing.kr/" target=_blank>시작</a>해봐요.'
document.body.appendChild(banner)
};
<body>
.....
<script type="text/javascript" src="https://gist.githubusercontent.com/wagurano/641c96627a24c1b110ff/raw/30f96b0ab97d7da41b65ef89a295b25f7eeb7e5d/1thingbar.js"></script>
<script type="text/javascript">
new OneThingBar();
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment