JS Bookmarklet для SEO: маленький інструмент — велика користь

30
JS bookmarklet

У сучасному цифровому середовищі ефективна пошукова оптимізація (SEO) вимагає швидких рішень, автоматизації рутинних дій та доступу до корисної інформації без зайвих кліків. Один із найзручніших інструментів для фахівців у цій галузі — це JS bookmarklet. Попри складну назву, цей інструмент є надзвичайно простим у використанні й може істотно полегшити щоденну роботу SEO-спеціаліста, маркетолога або розробника.

JS bookmarklet — це невеликий JavaScript-скрипт, який зберігається у вигляді закладки у вашому браузері. Один клік — і ви отримуєте миттєвий доступ до функцій, які зазвичай вимагають декілька кроків або зовнішніх сервісів.

Що таке JS bookmarklet?

JS bookmarklet — це фрагмент JavaScript-коду, що запускається напряму з панелі закладок браузера. Він працює без встановлення додаткових розширень чи програм і виконує певну дію на активній вебсторінці.

Простіше кажучи, це «розумна закладка», яка перетворює браузер на інструмент аналізу чи автоматизації.

Які задачі вирішує bookmarklet для SEO?

  • Перевірка мета-тегів. Миттєвий вивід заголовку (title), опису (description), ключових слів (keywords) і канонічного URL.
  • Аналіз заголовків H1–H6. Швидке візуальне виділення всіх заголовків на сторінці для аналізу структури контенту.
  • Перевірка ALT-текстів зображень. Виведення списку всіх зображень із зазначенням наявності або відсутності ALT-атрибутів.
  • Показ nofollow-посилань. Підсвічування посилань, які мають атрибут rel=”nofollow” — важливо для аудиту зовнішніх посилань.
  • Аналіз швидкості завантаження. Ініціація Lighthouse або PageSpeed Insights без відкриття нової вкладки.
  • Інтеграція з Ahrefs, Serpstat, SEMrush. Автоматичне формування URL-запиту до популярних SEO-сервісів на основі поточного сайту.

Переваги використання JS bookmarklet:

  • Миттєвий запуск. Жодних додаткових інструментів або розширень. Просто натискаєте закладку.
  • Швидкість у роботі. Замість десятків кліків — одна дія.
  • Мінімальне навантаження на браузер. Не впливає на продуктивність, на відміну від плагінів.
  • Кастомізація. Можна редагувати код під себе — додати логотипи, змінити стиль, мову або логіку роботи.
  • Безпека. Скрипт не передає дані стороннім сервісам, працює лише у вашому браузері.
Читайте також:  Огляд бірж посилань

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;

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:

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);

Читайте також:  Накрутка підписників у Telegram: як працює і наслідки

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)});

Індексація УРЛ:

javascript:(function(){var s=document.createElement(‘script’);s.type=’text/javascript’;s.src=’https://tools.arsenkin.ru/bm/robots.js’;s.setAttribute(‘charset’,’utf-8′);document.getElementsByTagName(‘body’)[0].appendChild(s)})();void(0);

Теги документа:

javascript:(function(){var s=document.createElement(‘script’);s.type=’text/javascript’;s.src=’https://tools.arsenkin.ru/bm/meta.js’;s.setAttribute(‘charset’,’utf-8′);document.getElementsByTagName(‘body’)[0].appendChild(s)})();void(0);

На що звернути увагу?

  • Сумісність з браузером. Найкраще працює в Chrome, Firefox, Edge. Safari іноді блокує виконання JS у закладках.
  • Оновлення сторінок. Деякі bookmarklet не працюють на сайтах з динамічним контентом (SPA), якщо DOM ще не повністю завантажений.
  • HTTPS-захист. Певні сайти можуть обмежувати виконання скриптів — це залежить від політики безпеки (CSP).

Висновок

JS bookmarklet — це потужний, простий і безкоштовний інструмент, який дозволяє SEO-фахівцям виконувати базовий аналіз сайту за лічені секунди. Він ідеально підходить для щоденної роботи, економить час і робить процес аудиту інтуїтивним та зручним. Якщо ви ще не додали такий інструмент у свою SEO-рутинну — саме час почати.

ЗАЛИШИТИ КОМЕНТАР

Введіть свій коментар!
Введіть тут своє ім'я