bartrk adlı üyeden alıntı: mesajı görüntüle
Merhaba, aşağıda vereceğim mobil uzantıyı kaldırmak için kullanılan kodu bir siteden kopyaladım, istediğim gibi çalışıyor fakat içinde başka alakasız kodlarda var sanırım. Bu kodun temiz halini paylaşabilecek biri varsa sevinirim.

<script>/*<![CDATA[*/ function darkMode(){localStorage.setItem("mode","darkmode"===localStorage.getItem("mode")?"light":"darkmode"),"darkmode"===localStorage.getItem("mode")?document.querySelector("#mainCont").classList.add("drK"):document.querySelector("#mainCont").classList.remove("drK")}; function headScroll() {const distanceY = window.pageYOffset || document.documentElement.scrollTop, shrinkOn = 40, commentEl = document.getElementById('header');if (distanceY > shrinkOn) {commentEl.classList.add("stick");} else {commentEl.classList.remove("stick");} } window.addEventListener('scroll', headScroll);
/* service worker */ if('serviceWorker' in navigator){navigator.serviceWorker .register('/sw.js') .then(function(){console.log("Service Worker Registered")})}
/* adblock */ var mql=window.matchMedia("screen and (min-width:0em)");mql.matches&&function(e,t){var a=e.document,n=typeof t;function d(){function d(e,t){var d=a.createElement("div"),o=a.body,r=o.style,s=o.childNodes.length;typeof t!=n&&(d.setAttribute("id",t),r.margin=r.padding=0,r.height="auto",s=Math.floor(Math.random()*s)+1),d.innerHTML=e,o.insertBefore(d,o.childNodes[s-1])}function o(e,t){return t?a.getElementsByTagName(t):a.getElementById(e)}function r(e){o("adBl")||d('<input class="adBll hidden" id="forNoaD" type="checkbox"/><div class="adBl" data-text="Lütfen reklam engelleyicinizi kapatın."><a class="cls" data-text="Nasıl kapatılır?" href="https://www.buradakodualdığımsiteninismivar.com/sayfa/adblock"/><label for="forNoaD"/></div>',"adBl")}var s,i,l;!function(){var t,n,s=["ad_300x250_m_c","hp-store-ad","inner-top-ads","mod_ad","ps-vertical-ads","row2AdContainer","systemad_background","ad","ads","adsense"],i=s.length,l="";for(t=0;t<i;t++)o(s[t])||(l+='<a id="'+s[t]+'"></a>');d(l),i=s.length,setTimeout(function(){for(t=0;t<i;t++)if(null==(n=o(s[t])).offsetParent||"none"==(e.getComputedStyle?a.defaultView.getComputedStyle(n,null).getPropertyValue("display"):n.currentStyle.display))return r()},250)}(),i=o(0,"img"),l=["/adcde.js","/admez/ad","/adsales/ad","/adsenceSearch.","/adtools2.","/adv2.","/partner_ads_","/rcolads1.","_ads.html",".468x60-"],typeof i[0]!=n&&typeof i[0].src!=n&&((s=new Image).onload=function(){this.onload=n,this.onerror=function(){r(this.src)},this.src=i[0].src+"#"+l.join("")},s.src=i[0].src),function(){var d,s,i,l,c,h={"http://pagead2.googlesyndication.com/pagead/show_ads.js":"google_ad_client","http://js.adscale.de/getads.js":"adscale_slot_id","http://get.mirando.de/mirando.js":"adPlaceId"},u=o(0,"script"),f=u.length-1;for(a.write=null,i=f;i>=0;--i)if(typeof h[(c=u[i]).src]!=n){(d=a.createElement("script")).type="text/javascript",d.src=c.src,l=h[c.src],e[l]=t,s=u[0],d.onload=d.onreadystatechange=function(){typeof e[l]!=n||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(d.onload=d.onreadystatechange=null,s.parentNode.removeChild(d),e[l]=null)},s.parentNode.insertBefore(d,s),setTimeout(function(){e[l]===t&&r(d.src)},2e3);break}}()}a.addEventListener?e.addEventListener("load",d,!1):e.attachEvent("onload",d)}(window);
/* cookie */ cookieOptions={msg:"Bu site, trafiği analiz etmek için Google çerezlerinden yararlanıyor.",link:"https://www.blogger.com/go/blogspot-cookies",close:"Tamam, Anladım.",learn:"Daha Fazla Bilgi."};
/* remove m=1 */ function rmurl(t,r){var e=new RegExp(/\?m=0|&m=0|\?m=1|&m=1/g);return e.test(t)&&(t=t.replace(e,""),r&&window.history.replaceState({},document.title,t)),t}const currentUrl=rmurl(location.toString(),!0);
/* lightbox image script */ for (var imageslazy = document.querySelectorAll('.pS .separator img, .pS .tr-caption-container img, .pS .psImg >img, .pS .btImg >img'), i = 0; i < imageslazy.length; i++) imageslazy[i].setAttribute('onclick', 'return false'); function wrap(o, t, e) {for (var i = document.querySelectorAll(t), c = 0; c < i.length; c++) {var a = o + i[c].outerHTML + e; i[c].outerHTML = a} } wrap('<div class="zmImg">', '.pS .separator >a', '</div>'); wrap('<div class="zmImg">', '.pS .tr-caption-container td >a', '</div>'); wrap('<div class="zmImg">', '.pS .separator >img', '</div>'); wrap('<div class="zmImg">', '.pS .tr-caption-container td >img', '</div>'); wrap('<div class="zmImg">', '.pS .psImg >img', '</div>'); wrap('<div class="zmImg">', '.pS .btImg >img', '</div>'); for (var containerimg = document.getElementsByClassName('zmImg'), i = 0; i < containerimg.length; i++) containerimg[i].onclick = function() {this.classList.toggle('s');};
Defer.dom('.lazy', 100, 'loaded', null, {rootMargin:'1px'}),'undefined'!=typeof infinite_scroll&&infinite_scroll.on('load',function(){Defer.dom('.lazy', 100, 'loaded', null, {rootMargin:'1px'}) }); /*]]>*/</script>
Merhaba, buyrun.
/* remove m=1 */
function rmurl(t, r) {
  var e = new RegExp(/\?m=0|&m=0|\?m=1|&m=1/g);
  return e.test(t) && (t = t.replace(e, ""), r && window.history.replaceState({}, document.title, t)), t
}
const currentUrl = rmurl(location.toString(), !0);
Edit: <script>/*<![CDATA[*/ ve /*]]>*/</script> etiketi içine almayı unutmayın.