Показать сообщение отдельно
  #10 (permalink)  
Старый 02.01.2018, 00:24
Аватар для рони
Профессор
Отправить личное сообщение для рони Посмотреть профиль Найти все сообщения от рони
 
Регистрация: 27.05.2010
Сообщений: 33,075

Exhaust_,
добавлено отсюда highlight-bookmarklet
javascript:(function(){ var style = document.createElement("style"), styleContent = document.createTextNode("body{ counter-reset: resultat !important; } h3.r::before{ counter-increment: resultat !important; content: counter(resultat) \". \" !important; } "); style.appendChild(styleContent ); var caput = document.getElementsByTagName("head"); caput[0].appendChild(style);var count=0, text, dv;text=document.querySelector("#lst-ib").value.trim();if(text==null || text.length==0)return;dv=document.defaultView;function searchWithinNode(node, te, len){var pos, skip, spannode, middlebit, endbit, middleclone;skip=0;if( node.nodeType==3 ){pos=node.data.toUpperCase().indexOf(te);if(pos>=0){spannode=document.createElement("SPAN");spannode.style.backgroundColor="yellow";middlebit=node.splitText(pos);endbit=middlebit.splitText(len);middleclone=middlebit.cloneNode(true);spannode.appendChild(middleclone);middlebit.parentNode.replaceChild(spannode,middlebit);++count;skip=1;}}else if( node.nodeType==1&& node.childNodes && node.tagName.toUpperCase()!="SCRIPT" && node.tagName.toUpperCase!="STYLE"){for (var child=0; child < node.childNodes.length; ++child){child=child+searchWithinNode(node.childNodes[child], te, len);}}return skip;}window.status="Searching for '"+text+"'...";searchWithinNode(document.body, text.toUpperCase(), text.length);window.status="Found "+count+" occurrence"+(count==1?"":"s")+" of '"+text+"'.";})();
Ответить с цитированием