{"id":213481,"date":"2014-02-21T20:41:03","date_gmt":"2014-02-21T16:41:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=213481"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=213481","title":{"rendered":"<span class=\"post_title\">\u0410 \u0442\u0430\u043a\u0438 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0438\u0441\u0435\u043c \u0414\u044f\u0434\u0438 \u0424\u0435\u0434\u043e\u0440\u0430!<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/5d8\/4b0\/726\/5d84b072607e16e6901529b08da51f47.png\" alt=\"image\" align=\"left\"\/><br \/>  \u0427\u0438\u0442\u0430\u044e \u044f \u0432\u0447\u0435\u0440\u0430\u0448\u043d\u0438\u0439 \u043f\u043e\u0441\u0442 <a href=\"http:\/\/habrahabr.ru\/post\/213263\">\u043f\u0440\u043e\u0441\u0442\u043e\u043a\u0432\u0430\u0448\u0438\u043d\u043e \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0438\u043b\u0438 \u043f\u0438\u0441\u044c\u043c\u043e \u0414\u044f\u0434\u0438 \u0424\u0435\u0434\u043e\u0440\u0430<\/a>. \u041c\u044b\u0441\u043b\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f, \u043d\u043e. <\/p>\n<p>  \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043f\u0443\u0433\u0430\u044e\u0442.<\/p>\n<p>  \u041f\u043e\u044f\u0441\u043d\u044e \u043f\u043e\u0447\u0435\u043c\u0443.<\/p>\n<p>  \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0442\u0430\u043c \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0434\u0432\u0430 \u0432\u0438\u0434\u0430 <\/p>\n<ul>\n<li><s>\u00ab\u043a\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0430\u043d\u0433\u0435\u043b\u043e\u0432 \u043d\u0430 \u043a\u043e\u043d\u0446\u0435 \u0438\u0433\u043b\u044b\u00bb<\/s> \u00ab\u043e \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0435 \u0434\u0430\u0442\u00bb,<\/li>\n<li><s>\u00ab\u043a\u0430\u043a \u0437\u0430\u0431\u0438\u0432\u0430\u0442\u044c \u0433\u0432\u043e\u0437\u0434\u0438 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u043c \u043c\u0438\u043a\u0440\u043e\u0441\u043a\u043e\u043f\u043e\u043c\u00bb<\/s> \u00ab\u043c\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432 <i>\u044d\u043d\u0442\u0435\u0440\u043f\u0440\u0430\u0439\u0437\u043d\u0435\u043d\u044c\u043a\u043e\u043c \u0441\u0442\u0438\u043b\u0435<\/i>\u00bb.<\/li>\n<\/ul>\n<p>  \u0414\u0443\u0448\u0430 \u043f\u043e\u044d\u0442\u0430 \u043d\u0435 \u0432\u044b\u0434\u0435\u0440\u0436\u0430\u043b\u0430, \u043d\u0430\u0448\u0435\u043b \u043f\u043e\u043b\u0447\u0430\u0441\u0430, \u0438 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043b <a href=\"http:\/\/userscripts.org\/scripts\/show\/394417\">userscript<\/a>.<\/p>\n<p>  \u0421\u043a\u0440\u0438\u043f\u0442 \u043f\u0440\u043e\u0441\u0442 \u0434\u043e \u0443\u0436\u0430\u0441\u0430 \u2014 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0441\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u0430. \u0415\u0441\u043b\u0438 \u043c\u0430\u0440\u043a\u0435\u0440 \u043d\u0430\u0439\u0434\u0435\u043d \u2014 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0441 \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u043c \u0432\u043e \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u043c \u043e\u043a\u043e\u0448\u043a\u0435. <\/p>\n<p>  \u0412\u0441\u0435\u043c \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u043c \u043f\u043e\u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0438 \u2014 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c, \u0442\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u0442\u044c <i>\u043e\u0442\u043a\u0430\u0442\u0430\u0435\u043c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e<\/i>. \u0415\u0441\u043b\u0438 \u0432\u0430\u0448 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u043e\u0441\u0442 \u2014 \u043f\u0438\u0448\u0438\u0442\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u0432\u043e\u0442 \u0442\u0430\u043a <b>[also]<\/b>. \u0410 \u044f \u043a\u0430\u043a \u0438\u043d\u0438\u0446\u0438\u0430\u0442\u043e\u0440 \u044d\u0442\u043e\u0433\u043e \u0431\u0435\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u044f \u2014 \u043f\u043e \u043c\u0435\u0440\u0435 \u0441\u0438\u043b \u0431\u0443\u0434\u0443 \u0432\u0430\u0448\u0438 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f \u0432 \u043f\u043e\u0441\u0442 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c. \u0418 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u2014 \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0442\u043e\u0436\u0435.<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043b\u0438\u0440\u0438\u043a\u0443 \u043f\u043e\u0431\u043e\u043a\u0443, \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u0436\u0435 \u043c\u044b \u0442\u0443\u0442 \u0442\u0430\u043a\u043e\u0435 \u0434\u0435\u043b\u0430\u0435\u043c.<\/p>\n<p>  \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u2014 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u043c Greasemonkey \u0447\u0442\u043e \u044d\u0442\u043e \u0438 \u0434\u043b\u044f \u0447\u0435\u0433\u043e. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0432\u043e\u0434\u0438\u043c \u043f\u0430\u0440\u043e\u0447\u043a\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u2014 \u0434\u043b\u044f \u043e\u043a\u043e\u0448\u0435\u0447\u043a\u0430 \u0438 \u0434\u043b\u044f \u043c\u0430\u0440\u043a\u0435\u0440\u0430.<\/p>\n<pre><code class=\"javascript\">\/\/ ==UserScript== \/\/ @name           Prostokvashino \/\/ @namespace      habrahabr.ru \/\/ @description    habrahabr.ru\/post\/213263 \/\/ @include        http:\/\/*.habrahabr.ru\/post\/* \/\/ @include        http:\/\/habrahabr.ru\/post\/*  var MARKER = '[also]'; var floatingDiv = null; <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u2014 \u0431\u043b\u0430\u0433\u043e \u043e\u043d \u043f\u0440\u043e\u0441\u0442 \u043a\u0430\u043a \u043f\u044f\u0442\u044c \u043a\u043e\u043f\u0435\u0435\u043a. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0439\u0434\u0435\u043c \u0433\u0434\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0447\u0438\u043a \u0434\u043b\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 (found):<\/p>\n<pre><code class=\"javascript\">function showMarkedComments () { \tvar commentsBlock = document.getElementById('comments'); \tvar eltList = commentsBlock.getElementsByTagName('div'); \tvar found = []; <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u043f\u0435\u0440\u0435\u0431\u0435\u0440\u0435\u043c \u0432\u0441\u0435 div, \u0441 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0442\u0435\u043a\u0441\u0442\u0430\u043c\u0438.<\/p>\n<pre><code class=\"javascript\">\tfor(var j=0; j&lt;eltList.length; ++j) { \t\tvar elt = eltList[j]; \t\tif(elt.className != 'comment_body' ) continue;  \/\/ now elt has two sub-divs - info with author and div with text \/\/ in version 0.1 we're ignoring authors and other technical stuff - just use div with text  \t\tfor(var k=0; k &lt; elt.childNodes.length; ++k) { \t\t\tif(elt.childNodes[k].nodeName.toLowerCase() == &quot;div&quot;) { ...  \t\t\t} \t\t} \t} <\/code><\/pre>\n<p>  \u041d\u0435 \u0432\u0435\u0440\u0445 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u043e\u0431\u043e\u0439\u0434\u0435\u0442 \u0432\u0441\u044e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e \u0441 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438 \u043d\u0430 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u043f\u0440\u0438\u0447\u0435\u043c \u0432 \u0442\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435. \u0412\u0443\u0430\u043b\u044f \u2014 \u043e \u0434\u0430\u0442\u0430\u0445 \u0434\u0443\u043c\u0430\u0442\u044c \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b (\u0438 \u0442\u0430\u043a \u0436\u0435 \u043d\u0435\u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b), \u0447\u0442\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0443\u0442 \u043d\u0435\u0447\u0435\u0433\u043e:<\/p>\n<pre><code class=\"javascript\">\t\t\t\tdivtxt = elt.childNodes[k].innerHTML; \t\t\t\tif(divtxt.indexOf(MARKER) &lt; 0) continue; \t\t\t\tfound.push(divtxt); <\/code><\/pre>\n<p>  \u041e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u043c\u0435\u043b\u043e\u0447\u044c \u2014 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u043e\u043a\u043e\u0448\u043a\u043e. \u042f \u043a\u0430\u043a \u0441\u0442\u0430\u0440\u044b\u0439 \u0445\u0430\u0440\u0434\u043a\u043e\u0440\u0449\u0438\u043a \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043b \u0440\u0430\u0448\u043f\u0438\u043b\u0435\u043c \u0438\u0437 \u0442\u0440\u0430\u043a\u0442\u043e\u0440\u0430, \u0442\u0430\u043a \u0447\u0442\u043e <s>\u043d\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 jQuery \u2014 \u0441\u0430\u043c\u043e\u0435 \u0442\u043e<\/s> \u0442\u0443\u0442 \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0440 \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0435\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u044f.<\/p>\n<pre><code class=\"javascript\">\/\/ in found, we have list of HTML texts together with marker.  \/\/ All we need is to place it in floating div and make it visible \tif(found.length &lt; 1) return; \t \tvar buf = new StringBuffer(); \tfor(var j = 0; j &lt; found.length; ++j) { \t\tbuf.append('&lt;div id=&quot;comment_&quot;'+j+' class=&quot;comment_item&quot;&gt;\\n'); \t\tbuf.append('&lt;div class=&quot;comment_body&quot;&gt;'); \t\tbuf.append('&lt;div class=&quot;message html_format &quot;&gt;&lt;hr\/&gt;'); \t\tbuf.append(found[j]); \t\tbuf.append('&lt;\/div&gt;'); \t\tbuf.append('&lt;\/div&gt;\\n'); \t\tbuf.append('&lt;\/div&gt;\\n'); \t} \tbuf.append('&lt;hr\/&gt;'); \tfloatingDiv.innerHTML = buf.toString(); \tfloatingDiv.style.top = (window.pageYOffset + 10) + 'px'; \tfloatingDiv.style.display = ''; } <\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u0438\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0448\u043f\u0438\u043b\u0435\u043c \u044f \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0435\u0431\u044f \u043e\u0437\u0430\u0431\u043e\u0442\u0438\u043b\u0441\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u0431\u044b\u0441\u0442\u0440\u0435\u043d\u044c\u043a\u043e \u0440\u043e\u0434\u0438\u0432 \u043d\u0430 \u043a\u043e\u043b\u0435\u043d\u043a\u0435 \u0430\u043d\u0430\u043b\u043e\u0433 StringBuffer \/ StringBuilder. \u0412\u043e\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u044d\u0442\u0430 <i>\u0437\u0430\u043f\u0447\u0430\u0441\u0442\u044c<\/i>:<\/p>\n<pre><code class=\"javascript\">\/\/ simple string buffer function StringBuffer() {      this.buffer = [];  }   StringBuffer.prototype.append = function append(string) {      this.buffer.push(string);      return this;  };   StringBuffer.prototype.toString = function toString() {      return this.buffer.join(&quot;&quot;);  };  <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0435\u0435 \u043e\u0442\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0434\u0430\u0439\u0442\u0435 \u043a\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u043d\u0430\u0442\u044c. \u041f\u043e \u043c\u043d\u0435 \u0442\u0430\u043a \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u043d\u043e \u043c\u0430\u043b\u043e \u043b\u0438. \u041f\u044f\u0442\u043d\u0438\u0446\u0430, \u0432\u0435\u0447\u0435\u0440, \u043d\u0430\u043a\u0430\u043d\u0443\u043d\u0435 23 \u0444\u0435\u0432\u0440\u0430\u043b\u044f\u2026<\/p>\n<p>  \u041e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u043c\u0435\u043b\u043e\u0447\u0438 \u2014 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043e\u043a\u043e\u0448\u0435\u0447\u043a\u043e, \u043f\u043e\u0432\u0435\u0441\u0438\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f<s>, \u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0437\u0430 \u0441\u043e\u043a\u043e\u043c<\/s>, \u0438 \u0432\u043e\u0442 \u043e\u043d \u2014 \u0441\u043a\u0440\u0438\u043f\u0442.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0432\u0441\u044f\u043a\u0438\u0439 \u0443\u0442\u0438\u043b\u044c<\/b><\/p>\n<div class=\"spoiler_text\">\u041d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0445\u0430\u0440\u0434\u043a\u043e\u0440\u043d\u043e, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0440\u0430\u0448\u043f\u0438\u043b\u044f, \u044f \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043b \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u043e\u043a\u043e\u0448\u0435\u0447\u043a\u043e. <s>\u0414\u0430, \u044f \u0437\u043d\u0430\u044e \u2014 \u0442\u0430\u043a \u043f\u0438\u0448\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0440\u043f\u0435\u0440\u044b, \u043f\u043e\u043c\u043d\u044f\u0449\u0438\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 <i>\u0436\u0430\u0432\u0430\u0448\u043a\u0440\u0438\u043f\u0430 \u0432 \u043d\u0435\u0442\u0448\u043a\u0430\u0444\u0435 3.0<\/i><\/s>. <\/p>\n<pre><code class=\"javascript\">function makeFloatingDiv() {     if(!floatingDiv) {         floatingDiv = document.createElement('div');                  floatingDiv.style.position = &quot;absolute&quot;;         \/\/floatingDiv.style.height = '600px';         floatingDiv.style.width = '800px';         floatingDiv.style.backgroundColor = '#f2f2f2';         floatingDiv.style.borderColor = 'red';         floatingDiv.style.borderWidth = '2px';         floatingDiv.style.borderStyle = 'groove';         floatingDiv.style.padding = '2px';         floatingDiv.valign = 'top';         floatingDiv.align = 'left';         floatingDiv.style.display = 'none';  \t    floatingDiv.textAlign = 'left'; \t    floatingDiv.style.overflow = 'auto'; \t    floatingDiv.style.left = '10px';             floatingDiv.style.top = '10px';          document.getElementsByTagName('body')[0].appendChild(floatingDiv);         floatingDiv.style.display = '';         floatingDiv.innerHTML = &quot;...&quot;;     } }  function makeDivWExtraLinks() {     var xdiv = document.createElement('span');     xdiv.appendChild(document.createElement('br'));     xdiv.appendChild(document.createElement('br'));     xdiv.appendChild(mk_Link(1, 'See additions to post'));     return xdiv; }  function goHide(event) {     if(event.target.style.display != 'none')      \tevent.target.style.display = 'none'; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041d\u0443 \u0438 \u0435\u0449\u0435 \u043f\u0430\u0440\u043e\u0447\u043a\u0430 \u0442\u0430\u043a\u0438\u0445 \u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 \u0442\u043e\u043c \u0436\u0435 \u0441\u0442\u0438\u043b\u0435:<\/p>\n<pre><code class=\"javascript\">function mk_Link(code, label) {     var newElt = document.createElement('a');     newElt.appendChild(document.createTextNode('[' + label + ']'));     newElt.href= 'javascript:void(-' + code + ')';     return newElt; } <\/code><\/pre>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0443\u0432\u0438\u0434\u0438\u0442 \u0441\u0442\u0440\u0430\u0448\u043d\u0443\u044e \u0435\u0440\u0435\u0441\u044c. \u041c\u0430\u043b\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u043a\u0443\u0441\u043a\u0438 HTML \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0430\u043c\u0438 \u0438\u0437 \u043a\u0443\u0441\u043e\u0447\u043a\u043e\u0432! \u0422\u0430\u043c \u0435\u0449\u0435 \u0438 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u0445\u0430\u043a\u0438 \u0432\u0441\u0442\u0440\u043e\u0438\u043b\u0438\u0441\u044c. \u0412\u043e\u0442 \u0442\u0430\u043a\u0438\u0435<\/p>\n<blockquote><p><b>newElt.href= &#8216;javascript:void(-&#8216; + code + &#8216;)&#8217;;<\/b><\/p><\/blockquote>\n<p>  \u0421\u0430\u043c \u0432 \u0448\u043e\u043a\u0435! \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0441\u043b\u043e\u043f\u0430\u043d\u043d\u044b\u0439 \u0442\u043e\u0440\u0442\u0438\u043a \u043a\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043c\u0435\u0448\u0430\u043b \u043a\u043e\u043d\u043e\u043f\u043b\u044e\u2026 <\/p>\n<p>  \u0418\u0434\u0435\u044f \u0442\u0443\u0442 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u2014 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043b\u0438\u043d\u043a \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438, \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430. \u0421\u0434\u0435\u043b\u0430\u043d\u043e \u044d\u0442\u043e \u0432\u043e\u0442 \u0437\u0430\u0447\u0435\u043c \u2014 \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 \u0438 \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438, \u043f\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0410 \u0440\u0430\u0437 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u043a \u043d\u0430\u043c \u043f\u0440\u0438\u0435\u0445\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u0436\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u00ab\u043f\u043e\u0441\u043b\u0435\u00bb \u2014 \u0442\u043e \u0438 \u043d\u0430\u0448 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043c\u0435\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043b\u044e\u0431\u043e\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>  \u0410 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u0432\u0441\u0435 \u0431\u044b\u043b\u043e \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043d\u043e \u043d\u0430 \u043a\u043e\u043b\u0435\u043d\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u0442\u0443\u043a\u0430\u0442\u044c\u0441\u044f \u043b\u0431\u043e\u043c \u0441 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430\u043c\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0438\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043b\u0430\u043c\u0438, \u0442\u043e \u0441\u0441\u044b\u043b\u043a\u0443 \u044f \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0438 \u043a\u043e\u0434 \u0441\u0430\u0439\u0442\u0430 \u043d\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043e \u0441\u0441\u044b\u043b\u043a\u043e\u0439 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442. \u041d\u043e \u0432 \u0441\u0432\u043e\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0435 \u044f \u043b\u0435\u0433\u043a\u043e \u0441\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u044e\u0441\u044c \u0447\u0442\u043e \u0441 \u044d\u0442\u0438\u043c \u0434\u0435\u043b\u0430\u0442\u044c. \u041c\u043e\u0436\u043d\u043e \u0445\u043e\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u043c\u0430\u0442\u0435\u0440\u043d\u044b\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c, \u043b\u0438\u0448\u044c \u0431\u044b \u044d\u0442\u043e <b>\u043d\u0435<\/b> \u0431\u044b\u043b\u043e \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0439 \u043b\u0438\u043d\u043a\u043e\u0439 \u0438\u043b\u0438 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c.<\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u044b\u0432\u043e\u043a! <s>\u041d\u0438\u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u043a\u0438 \u043d\u0435 \u043f\u043e\u043c\u0435\u0448\u0430\u044e\u0442\u2026 \u0438\u043a!<\/s> \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u0430\u0440\u0443 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u2014 \u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0438 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0443\u0436\u0430\u0441\u043d\u043e\u0433\u043e \u0445\u0430\u043a\u0430:<\/p>\n<pre><code class=\"javascript\">window.addEventListener(&quot;load&quot;, goLoad, true); document.addEventListener('click', goClick, true); <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0438, \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043f\u0435\u0446-\u0441\u0441\u044b\u043b\u043a\u0443. \u041f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043d\u0435\u0435 \u0438 \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0432\u0441\u044e \u0440\u0430\u0431\u043e\u0442\u0443:<\/p>\n<pre><code class=\"javascript\">function goLoad() { \t\/\/ starting here: extra links plus other stuff \tvar commentsBlock = document.getElementById('comments'); \tcommentsBlock.parentNode.insertBefore(makeDivWExtraLinks(), commentsBlock); \tmakeFloatingDiv(); \tfloatingDiv.addEventListener('click', goHide, true); } <\/code><\/pre>\n<p>  \u0438 \u0432\u043e\u0442 \u2014 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043d\u0430 \u044d\u0442\u0443 \u0441\u0441\u044b\u043b\u043a\u0443:<\/p>\n<pre><code class=\"javascript\">function goClick(event) {     if(event.target.href) {         var j = event.target.href.indexOf('javascript:void(-');         if( j &gt;=0 ) { \/\/ kind is group of operations' prefix: 0..9             var kind = event.target.href.substring(j + 16, j + 18);             if(kind == '-1') showMarkedComments();         }     } } <\/code><\/pre>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/213481\/\"> http:\/\/habrahabr.ru\/post\/213481\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/5d8\/4b0\/726\/5d84b072607e16e6901529b08da51f47.png\" alt=\"image\" align=\"left\"\/><br \/>  \u0427\u0438\u0442\u0430\u044e \u044f \u0432\u0447\u0435\u0440\u0430\u0448\u043d\u0438\u0439 \u043f\u043e\u0441\u0442 <a href=\"http:\/\/habrahabr.ru\/post\/213263\">\u043f\u0440\u043e\u0441\u0442\u043e\u043a\u0432\u0430\u0448\u0438\u043d\u043e \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0438\u043b\u0438 \u043f\u0438\u0441\u044c\u043c\u043e \u0414\u044f\u0434\u0438 \u0424\u0435\u0434\u043e\u0440\u0430<\/a>. \u041c\u044b\u0441\u043b\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f, \u043d\u043e. <\/p>\n<p>  \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043f\u0443\u0433\u0430\u044e\u0442.<\/p>\n<p>  \u041f\u043e\u044f\u0441\u043d\u044e \u043f\u043e\u0447\u0435\u043c\u0443.<\/p>\n<p>  \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0442\u0430\u043c \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0434\u0432\u0430 \u0432\u0438\u0434\u0430 <\/p>\n<ul>\n<li><s>\u00ab\u043a\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0430\u043d\u0433\u0435\u043b\u043e\u0432 \u043d\u0430 \u043a\u043e\u043d\u0446\u0435 \u0438\u0433\u043b\u044b\u00bb<\/s> \u00ab\u043e \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0435 \u0434\u0430\u0442\u00bb,<\/li>\n<li><s>\u00ab\u043a\u0430\u043a \u0437\u0430\u0431\u0438\u0432\u0430\u0442\u044c \u0433\u0432\u043e\u0437\u0434\u0438 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u043c \u043c\u0438\u043a\u0440\u043e\u0441\u043a\u043e\u043f\u043e\u043c\u00bb<\/s> \u00ab\u043c\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432 <i>\u044d\u043d\u0442\u0435\u0440\u043f\u0440\u0430\u0439\u0437\u043d\u0435\u043d\u044c\u043a\u043e\u043c \u0441\u0442\u0438\u043b\u0435<\/i>\u00bb.<\/li>\n<\/ul>\n<p>  \u0414\u0443\u0448\u0430 \u043f\u043e\u044d\u0442\u0430 \u043d\u0435 \u0432\u044b\u0434\u0435\u0440\u0436\u0430\u043b\u0430, \u043d\u0430\u0448\u0435\u043b \u043f\u043e\u043b\u0447\u0430\u0441\u0430, \u0438 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043b <a href=\"http:\/\/userscripts.org\/scripts\/show\/394417\">userscript<\/a>.<\/p>\n<p>  \u0421\u043a\u0440\u0438\u043f\u0442 \u043f\u0440\u043e\u0441\u0442 \u0434\u043e \u0443\u0436\u0430\u0441\u0430 \u2014 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0441\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u0430. \u0415\u0441\u043b\u0438 \u043c\u0430\u0440\u043a\u0435\u0440 \u043d\u0430\u0439\u0434\u0435\u043d \u2014 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0441 \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u043c \u0432\u043e \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u043c \u043e\u043a\u043e\u0448\u043a\u0435. <\/p>\n<p>  \u0412\u0441\u0435\u043c \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u043c \u043f\u043e\u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0438 \u2014 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c, \u0442\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u0442\u044c <i>\u043e\u0442\u043a\u0430\u0442\u0430\u0435\u043c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e<\/i>. \u0415\u0441\u043b\u0438 \u0432\u0430\u0448 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u043e\u0441\u0442 \u2014 \u043f\u0438\u0448\u0438\u0442\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u0432\u043e\u0442 \u0442\u0430\u043a <b>[also]<\/b>. \u0410 \u044f \u043a\u0430\u043a \u0438\u043d\u0438\u0446\u0438\u0430\u0442\u043e\u0440 \u044d\u0442\u043e\u0433\u043e \u0431\u0435\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u044f \u2014 \u043f\u043e \u043c\u0435\u0440\u0435 \u0441\u0438\u043b \u0431\u0443\u0434\u0443 \u0432\u0430\u0448\u0438 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f \u0432 \u043f\u043e\u0441\u0442 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c. \u0418 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u2014 \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0442\u043e\u0436\u0435.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-213481","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/213481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=213481"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/213481\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=213481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=213481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=213481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}