// ==UserScript== // @name Naver Main Remapper // @namespace http://onedge.pe.kr // @description Remap Naver main page // @include http://naver.com/* // @include http://www.naver.com/* // ==/UserScript== var CustomizeNaver = { // add arbitrary CSS styles to page addGlobalStyle: function(css) { style = document.createElement("style"); style.type = "text/css"; style.innerHTML = css; document.getElementsByTagName('head')[0].appendChild(style); }, removeAds: function() { // tags to hide var hideme = new Array('iframe'); // loop thru the hidden tags array for ( x = 0; x < hideme.length; x++ ) { // get all tags of that name var tags = document.getElementsByTagName(hideme[x]); // loop thru those tags and set them not to show for ( y = 0; y < tags.length; y++ ) { if (tags[y].src.indexOf('http://nv') != -1) { tags[y].style['display'] = 'none'; continue; } } } this.addGlobalStyle('#loginbox { left: -11px; width: 177px }'); this.addGlobalStyle('#ll { width: 177px }'); this.addGlobalStyle('#lc { width: 0px; display: none ! important }'); this.addGlobalStyle('#lr { width: 0px; display: none ! important }'); this.addGlobalStyle('#crstj { display: none ! important }'); this.addGlobalStyle('#lwd2 { display: none ! important }'); var beforeEl = document.getElementById('tmap'); var parentEl = beforeEl.parentNode; var childEl = document.getElementById('loginbox'); parentEl.insertBefore(childEl, beforeEl); this.addGlobalStyle('#ll2 { position:relative; margin-top: -79px }'); this.addGlobalStyle('div[id="container"] { display: none ! important }'); this.addGlobalStyle('div[id="servicemap"] { display: none ! important }'); this.addGlobalStyle('div[id="footer"] { display: none ! important }'); this.addGlobalStyle('#gnb { top: 360px; }'); this.addGlobalStyle('#schbox, #loginbox, #servicemap, #copyright { top: 200px; }'); } }; CustomizeNaver.removeAds();