SEO js bookmarklet

Букмарклет — небольшая JavaScript-программа, оформленная как javascript: URL и сохраняемая как браузерная закладка. Альтернативное название букмарклетов — «favelets». В русском языке иногда используется вариант «закладурки».

Букмарклет

info:

javascript:(function(){window.open('https://www.google.ru/search?q=info%3A'+encodeURIComponent(location.href))})();

cache:

javascript:void((function(){var a=location.href.replace(/^http%5C:%5C/%5C/(.*)$/,"$1");location.href="http://webcache.googleusercontent.com/search?q=cache%3A"+escape(a);})())

site:

javascript:void((function(){window.open('https://www.google.com.ua/search?hl=ru&nfpr=1&num=10&q='+'site:'+window.location.href+'%'+'26','_blank')})());

google serp NUM

javascript:var num=10,start=0,s_num=location.search.match(new RegExp("[\\?|&]num=([^&]*)"));null!==s_num?num=parseInt(s_num[1]):(s_num=document.cookie.match(new RegExp("NR=([^:]*)")),null!==s_num&&(num=parseInt(s_num[1])));var cur=document.getElementsByClassName("cur")[0];if("undefined"!=typeof cur)cur=parseInt(document.all?cur.innerText:cur.textContent),start=(cur-1)*num;else{var s_start=location.search.match(new RegExp("(\\?|&)start=([^&]*)"));null!==s_start&&(start=parseInt(s_start[1]))}[].forEach.call(document.getElementsByClassName("g"),function(t){if(-1==t.parentElement.className.search(/_xse/)&&-1==t.className.search(/tpo|_Nn|no-sep|mnr-c/)){var e=document.createElement("span");e.setAttribute("style","float:left;margin-left:-40px;line-height:21.6px"),e.innerHTML=start+1+".",t.insertBefore(e,t.firstChild),start++}})

google serp URL

javascript:var b=window.open("","w"+String(Math.random()).slice(-6));b.document.writeln("<pre>");[].forEach.call(document.querySelectorAll(".g:not(#imagebox_bigimages)"),function(a){(a=a.querySelector(".r > a"))&&(a.hasAttribute("data-href")?b.document.writeln(a.getAttribute("data-href")):a.hasAttribute("href")&&b.document.writeln(a.getAttribute("href")))});

PageSpeed Insight

javascript:(function(){window.open('https://developers.google.com/speed/pagespeed/insights/?url='+encodeURIComponent(location.href))})();

ahrefs АНКОРЫ

javascript:(function(){ window.open('https://ahrefs.com/site-explorer/backlinks/v2/anchors/exact/fresh/phrases/all/1/refdomains_dofollow_desc?target='+encodeURIComponent(location.href))})();

ahrefs ДОМЕНЫ

javascript:(function(){ window.open('https://ahrefs.com/site-explorer/referring/v2/domains/exact/fresh/all/all/1/backlinks_dofollow_desc?target='+encodeURIComponent(location.href))})();

WebArchive

javascript:location.href='http://web.archive.org/web/*/'+window.location.href;

bertal.ru

javascript:(function() {var validator='http://www.bertal.ru/index.php?a',randKey=Math.floor(Math.random()*(-2e5+1))+21e5;validator=validator+randKey+'/',uri=window.location.href,window.open(validator+uri+'#h');})();

SimilarWeb

javascript:(function(){%20var%20url%20=%20document.location.hostname;%20var%20newwin%20=%20'http://www.similarweb.com/website/'%20+%20url;%20window.open(newwin);%20})();

Whois  Reg.ru

javascript:(function(){window.open('https://www.reg.ru/whois/?dname='+location.host)})();

robots.txt

javascript:void(window.open(location.protocol + '//' + location.host + '/robots.txt'))

Подсчет символов

javascript:(function(){function f(d){var t;if(d.getSelection)t=d.getSelection();else if(d.selection)t=d.selection.createRange();if(t.text!=undefined)t=t.text;if(!t||t==''){var a=d.getElementsByTagName('textarea');for(var i=0;i<a.length;++i){if(a[i].selectionStart!=undefined&&a[i].selectionStart!=a[i].selectionEnd){t=a[i].value.substring(a[i].selectionStart,a[i].selectionEnd);break;}}} return t;};function g(d){var t;try{t=f(d);}catch(e){};if(!t||t==''){var fs=d.getElementsByTagName('frame');for(var i=0;i<fs.length;++i){t=g(fs[i].contentDocument);if(t&&t.toString()!='')break;} if(!t||t.toString()==''){fs=d.getElementsByTagName('iframe');for(var i=0;i<fs.length;++i){t=g(fs[i].contentDocument);if(t&&t.toString()!='')break;}}}return t;};var t=g(document);if(!t||t=='')alert('please select some text');else alert('%D0%A1%D0%B8%D0%BC%D0%B2%D0%BE%D0%BB%D0%BE%D0%B2: '+t.toString().length+'\n%D0%A1%D0%B8%D0%BC%D0%B2%D0%BE%D0%BB%D0%BE%D0%B2 %D0%B1%D0%B5%D0%B7 %D0%BF%D1%80%D0%BE%D0%B1%D0%B5%D0%BB%D0%BE%D0%B2: '+t.toString().replace(/\s+/g, '','').length+'\n%D0%A1%D0%BB%D0%BE%D0%B2: '+t.toString().match(/(\S+)/g).length);})()

h1-h6, strong, em

javascript:(function(){var style=document.getElementById('bstrongemhighlight');if(style){style.remove();}else{var bStngEm=document.createElement('style');bStngEm.setAttribute('type','text/css');bStngEm.setAttribute('id','bstrongemhighlight');bStngEm.innerHTML='strong:before {content: \u0022stng - \u0022 !important;} b:before {content: \u0022b - \u0022 !important;} em:before {content: \u0022em - \u0022 !important;} strong {background-color: #690 !important; border: solid !important; padding: 2px !important; color: black !important;} b {background-color: #77D7FF !important; border: solid !important; padding: 2px !important; color: black !important;} em {background-color: #b798f5 !important; border: solid !important; padding: 2px !important; color: black !important;} h1:before {content: \u0022H1 - \u0022 !important;} h2:before {content: \u0022H2 - \u0022 !important;} h3:before {content: \u0022H3 - \u0022 !important;} h4:before {content: \u0022H4 - \u0022 !important;} h5:before {content: \u0022H5 - \u0022 !important;} h6:before {content: \u0022H6 - \u0022 !important;} h1 {background-color: pink !important; border: solid !important; padding: 2px !important; color: black !important;} h2 {background-color: orange !important; border: solid !important; padding: 2px !important; color: black !important;} h3 {background-color: yellow !important; border: solid !important; padding: 2px !important; color: black !important;} h4 {background-color: aquamarine !important; border: solid !important; padding: 2px !important; color: black !important;} h5 {background-color: lightskyblue !important; border: solid !important; padding: 2px !important; color: black !important;} h6 {background-color: plum !important; border: solid !important; padding: 2px !important; color: black !important;}';document.getElementsByTagName('body')[0].appendChild(bStngEm);}})();void(0);

Get links

javascript:var%20b=location.host.toLowerCase().replace(/^www\./i,""),d={local:[],external:[]},e=window.open("","links_"+String(Math.random()).slice(-6));[].forEach.call(document.getElementsByTagName("a"),function(a){var%20c=a.host.toLowerCase().replace(/^www\./i,""),c=b==c?"local":"external";a=a.href;-1==d[c].indexOf(a)&&d[c].push(a)});e.document.writeln("<pre>");for(var%20f%20in%20d)e.document.writeln("<br><b>"+f+"</b>"),d[f].forEach(function(a){e.document.writeln(a)});

Table

javascript:open('').document.write(document.querySelector('table').outerHTML)

SERP100

javascript:(()=>{const u=new URL(location);u.searchParams.set('num',100);location.href=u.href})()

Антиплагиат

javascript:(function(){window.open('http://be1.ru/antiplagiat-online/?url=%27+location)})();

Переделать картинки в альт

javascript:(function(){function toArray (c){var a, k;a=new Array;for (k=0; k < c.length; ++k)a[k]=c[k];return a;}var images, img, altText;images=toArray(document.images);for (var i=0; i < images.length; ++i){img=images[i];altText=document.createTextNode(img.alt);img.parentNode.replaceChild(altText, img)}})();

Комментарии