티스토리 툴바

튜닝의 끝은 순정이지만, 그래도 튜닝이 조금 필요한 티스토리.

 티스토리 압축

<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>


 티스토리 다음모바일 광고 없애기

<style>#daumAd{width:0; height:0px; display:none !important;}</style>


 티스토리 단축설정

<script type="text/javascript"> 
<!--
var key = new Array();
/*********** 단축키 정의 **************/
key['n'] = "/owner/entry/post";
key['i'] = "/login"; 
key['b'] = "/466";
key['h'] = "/";
key['l'] = "/location";
key['t'] = "/tag";
key['m'] = "/media";
key['g'] = "/guestbook";
key['a'] = "/owner/center/dashboard";
key['w'] = "/admin/entry/post/";

function getKey(keyStroke) {
 if ((event.srcElement.tagName != 'INPUT') && (event.srcElement.tagName != 'TEXTAREA')){
  isNetscape=(document.layers);
  eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
  which = String.fromCharCode(eventChooser).toLowerCase();
  for (var i in key)
   if (which == i) window.location = key[i];
 }
}
document.onkeypress = getKey;
//--> 
</script>

 

  

 구글맞춤광고 DIV출력

 <!-- Google CSE -->
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
    var customSearchControl = null;
    function executeQuery() {
        var textNode = document.getElementById(' 자신의 ID ');
        if (textNode.value == '') {
            customSearchControl.clearAllResults();
            document.getElementById('cse').style.display = "none";
        } else {
            customSearchControl.execute(textNode.value);
            document.getElementById('cse').style.display = "block";
        }
    }
    google.load('search', '1', {language : 'ko'});
    google.setOnLoadCallback(function() {
        customSearchControl = new google.search.CustomSearchControl(' 구글 맞춤 ID ');
        customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
        var options = new google.search.DrawOptions();
        options.enableSearchResultsOnly();
        customSearchControl.draw('cse', options);
    }, true);
</script>


 <!-- 맞춤 검색 결과가 표시 될 부분 (CSE) -->
<div id="cse" style="width:100%; display:none;"></div> 


 <!-- Google CSE 검색창 -->

<input id="searchText" class="SearchBoxInput" type="text" name="" value="" onfocus="this.name=''" onkeypress="if (event.keyCode == 13) { executeQuery() }"/>

<!-- Google CSE 검색창 부분 끝 -->


 <a class="iframe cboxElement" href="http://www.google.co.kr/">구글 홈페이지</a>

구글 홈페이지 구글